diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 3e4fd2e7be..8e8d1fdb37 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -430,10 +430,7 @@ void GSDeviceOGL::DrawIndexedPrimitive(int offset, int count) void GSDeviceOGL::ClearRenderTarget(GSTexture* t, const GSVector4& c) { -#ifdef ENABLE_OGL_DEBUG - std::string help = format("Clear RT %d", static_cast(t)->GetID()); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("Clear RT %d", static_cast(t)->GetID()).c_str()); // TODO: check size of scissor before toggling it glDisable(GL_SCISSOR_TEST); @@ -462,10 +459,7 @@ void GSDeviceOGL::ClearRenderTarget(GSTexture* t, uint32 c) void GSDeviceOGL::ClearRenderTarget_i(GSTexture* t, int32 c) { -#ifdef ENABLE_OGL_DEBUG - std::string help = format("Clear RTi %d", static_cast(t)->GetID()); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("Clear RTi %d", static_cast(t)->GetID()).c_str()); // Keep SCISSOR_TEST enabled on purpose to reduce the size // of clean in DATE (impact big upscaling) @@ -481,10 +475,7 @@ void GSDeviceOGL::ClearRenderTarget_i(GSTexture* t, int32 c) void GSDeviceOGL::ClearDepth(GSTexture* t, float c) { -#ifdef ENABLE_OGL_DEBUG - std::string help = format("Clear Depth %d", static_cast(t)->GetID()); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("Clear Depth %d", static_cast(t)->GetID()).c_str()); OMSetFBO(m_fbo); OMAttachDs(static_cast(t)->GetID()); @@ -505,10 +496,7 @@ void GSDeviceOGL::ClearDepth(GSTexture* t, float c) void GSDeviceOGL::ClearStencil(GSTexture* t, uint8 c) { -#ifdef ENABLE_OGL_DEBUG - std::string help = format("Clear Stencil %d", static_cast(t)->GetID()); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("Clear Stencil %d", static_cast(t)->GetID()).c_str()); // Keep SCISSOR_TEST enabled on purpose to reduce the size // of clean in DATE (impact big upscaling) @@ -686,8 +674,7 @@ void GSDeviceOGL::CopyRect(GSTexture* st, GSTexture* dt, const GSVector4i& r) const GLuint& did = static_cast(dt)->GetID(); #ifdef ENABLE_OGL_DEBUG - string helper = format("CopyRect from %d to %d", sid, did); - GL_PUSH(helper.c_str()); + GL_PUSH(format("CopyRect from %d to %d", sid, did).c_str()); #endif if (GLLoader::found_GL_ARB_copy_image) { diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 3928426af0..42c12ebd37 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -92,9 +92,8 @@ public: } #ifdef ENABLE_OGL_DEBUG - if (m_bogus) { - GL_INS("!!! Bogus blending effect !!!"); - fprintf(stderr, "Bogus blending effect used : %s (%d)\n", (m_bogus > 2) ? "impossible effect" : "clear effect", m_bogus); + if (m_bogus > 2) { + GL_INS(format("!!! Bogus blending effect used (%d) !!!", m_bogus).c_str()); } #endif if (m_enable) { diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 3e315f29fd..383782937d 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -317,10 +317,7 @@ void GSRendererHW::Draw() s_n += 3; // Keep it sync with SW renderer return; } -#ifdef ENABLE_OGL_DEBUG - std::string help = format("HW Draw %d", s_n); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("HW Draw %d", s_n).c_str()); GSDrawingEnvironment& env = m_env; GSDrawingContext* context = m_context; diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index b4cca6e6f3..60e8bc94eb 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -212,10 +212,8 @@ void GSRendererOGL::SendDraw(bool require_barrier) void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex) { -#ifdef ENABLE_OGL_DEBUG - std::string help = format("GL Draw in (%d/%d)", static_cast(rt)->GetID(), static_cast(ds)->GetID()); - GL_PUSH(help.c_str()); -#endif + GL_PUSH(format("GL Draw in (%d/%d)", static_cast(rt)->GetID(), static_cast(ds)->GetID()).c_str()); + GSDrawingEnvironment& env = m_env; GSDrawingContext* context = m_context; diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index e7bc418938..737d2db0e3 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -254,11 +254,9 @@ void GSTextureOGL::Invalidate() bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch) { ASSERT(m_type != GSTexture::DepthStencil && m_type != GSTexture::Offscreen); + GL_PUSH(format("Upload Texture %d", m_texture_id).c_str()); + m_dirty = true; -#ifdef ENABLE_OGL_DEBUG - std::string help = format("Upload Texture %d", m_texture_id); - GL_PUSH(help.c_str()); -#endif // Note: reduce noise for gl retracers // It might introduce bug after an emulator pause so always set it in standard mode