mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: drop support of ENABLE_OGL_DEBUG
Stencil can be read by GL debugger due to correct mask configuration
This commit is contained in:
parent
8a52fdab57
commit
b65a62096f
|
@ -310,11 +310,6 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
|
|||
m_date.dss->SetStencil(GL_ALWAYS, GL_REPLACE);
|
||||
|
||||
m_date.bs = new GSBlendStateOGL();
|
||||
// FIXME impact image load?
|
||||
//#ifndef ENABLE_OGL_STENCIL_DEBUG
|
||||
// // Only keep stencil data
|
||||
// m_date.bs->SetMask(false, false, false, false);
|
||||
//#endif
|
||||
|
||||
// ****************************************************************
|
||||
// Use DX coordinate convention
|
||||
|
@ -415,20 +410,11 @@ void GSDeviceOGL::BeforeDraw()
|
|||
if (GLLoader::found_GL_ARB_buffer_storage)
|
||||
Barrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT);
|
||||
#endif
|
||||
|
||||
//#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
// if (m_date.t)
|
||||
// static_cast<GSTextureOGL*>(m_date.t)->Save(format("/tmp/date_before_%04ld.csv", g_draw_count));
|
||||
//#endif
|
||||
}
|
||||
|
||||
void GSDeviceOGL::AfterDraw()
|
||||
{
|
||||
//#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
// if (m_date.t)
|
||||
// static_cast<GSTextureOGL*>(m_date.t)->Save(format("/tmp/date_after_%04ld.csv", g_draw_count));
|
||||
//#endif
|
||||
#if defined(ENABLE_OGL_DEBUG) || defined(PRINT_FRAME_NUMBER) || defined(ENABLE_OGL_STENCIL_DEBUG)
|
||||
#if defined(ENABLE_OGL_DEBUG) || defined(PRINT_FRAME_NUMBER)
|
||||
g_draw_count++;
|
||||
#endif
|
||||
}
|
||||
|
@ -574,10 +560,6 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt)
|
|||
|
||||
ClearRenderTarget_ui(m_date.t, 0x0FFFFFFF);
|
||||
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
gl_BindTextureUnit(5, static_cast<GSTextureOGL*>(m_date.t)->GetID());
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_GLES
|
||||
gl_BindImageTexture(2, static_cast<GSTextureOGL*>(m_date.t)->GetID(), 0, false, 0, GL_READ_WRITE, GL_R32I);
|
||||
#endif
|
||||
|
@ -586,9 +568,7 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt)
|
|||
void GSDeviceOGL::RecycleDateTexture()
|
||||
{
|
||||
if (m_date.t) {
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
//static_cast<GSTextureOGL*>(m_date.t)->Save(format("/tmp/date_adv_%04ld.csv", g_draw_count));
|
||||
#endif
|
||||
|
||||
// FIXME invalidate data
|
||||
Recycle(m_date.t);
|
||||
|
@ -600,10 +580,6 @@ void GSDeviceOGL::Barrier(GLbitfield b)
|
|||
{
|
||||
#ifndef ENABLE_GLES
|
||||
gl_MemoryBarrier(b);
|
||||
//#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
// if (m_date.t)
|
||||
// static_cast<GSTextureOGL*>(m_date.t)->Save(format("/tmp/barrier_%04ld.csv", g_draw_count));
|
||||
//#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -953,13 +929,7 @@ void GSDeviceOGL::DoShadeBoost(GSTexture* st, GSTexture* dt)
|
|||
|
||||
void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* vertices, bool datm)
|
||||
{
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
const GSVector2i& size = rt->GetSize();
|
||||
GSTexture* t = CreateRenderTarget(size.x, size.y, false);
|
||||
ClearRenderTarget(t, 0);
|
||||
#else
|
||||
GSTexture* t = NULL;
|
||||
#endif
|
||||
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
|
||||
|
||||
BeginScene();
|
||||
|
@ -998,21 +968,12 @@ void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* ver
|
|||
|
||||
//
|
||||
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
DrawPrimitive();
|
||||
#else
|
||||
// normally ok without it if GL_ARB_framebuffer_no_attachments is supported (minus driver bug)
|
||||
OMSetWriteBuffer(GL_NONE);
|
||||
DrawPrimitive();
|
||||
OMSetWriteBuffer();
|
||||
#endif
|
||||
|
||||
EndScene();
|
||||
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
// FIXME invalidate data
|
||||
Recycle(t);
|
||||
#endif
|
||||
}
|
||||
|
||||
void GSDeviceOGL::EndScene()
|
||||
|
|
|
@ -329,9 +329,6 @@ std::string GSShaderOGL::GenGlslHeader(const std::string& entry, GLenum type, co
|
|||
if (GLLoader::found_GL_ARB_clip_control) {
|
||||
header += "#define ZERO_TO_ONE_DEPTH\n";
|
||||
}
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
header += "#define ENABLE_OGL_STENCIL_DEBUG 1\n";
|
||||
#endif
|
||||
#else // ENABLE_GLES
|
||||
header = "#version 310 es\n";
|
||||
header += "#extension GL_EXT_shader_io_blocks: require\n";
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
#endif
|
||||
//#define ENABLE_OGL_DEBUG_MEM_BW // compute the quantity of data transfered (debug purpose)
|
||||
|
||||
// Output stencil to a color buffer
|
||||
//#define ENABLE_OGL_STENCIL_DEBUG
|
||||
|
||||
#ifdef _WINDOWS
|
||||
//#define ENABLE_OPENCL
|
||||
#endif
|
||||
|
|
|
@ -189,10 +189,6 @@ void ps_main2()
|
|||
{
|
||||
if(sample_c().a < (127.5f / 255.0f)) // >= 0x80 pass
|
||||
discard;
|
||||
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
SV_Target0 = vec4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -203,10 +199,6 @@ void ps_main3()
|
|||
{
|
||||
if((127.5f / 255.0f) < sample_c().a) // < 0x80 pass (== 0x80 should not pass)
|
||||
discard;
|
||||
|
||||
#ifdef ENABLE_OGL_STENCIL_DEBUG
|
||||
SV_Target0 = vec4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -214,10 +214,6 @@ static const char* convert_glsl =
|
|||
"{\n"
|
||||
" if(sample_c().a < (127.5f / 255.0f)) // >= 0x80 pass\n"
|
||||
" discard;\n"
|
||||
"\n"
|
||||
"#ifdef ENABLE_OGL_STENCIL_DEBUG\n"
|
||||
" SV_Target0 = vec4(1.0f, 0.0f, 0.0f, 1.0f);\n"
|
||||
"#endif\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
|
@ -228,10 +224,6 @@ static const char* convert_glsl =
|
|||
"{\n"
|
||||
" if((127.5f / 255.0f) < sample_c().a) // < 0x80 pass (== 0x80 should not pass)\n"
|
||||
" discard;\n"
|
||||
"\n"
|
||||
"#ifdef ENABLE_OGL_STENCIL_DEBUG\n"
|
||||
" SV_Target0 = vec4(1.0f, 0.0f, 0.0f, 1.0f);\n"
|
||||
"#endif\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
|
|
Loading…
Reference in New Issue