From 4281b8630bbb2cedeede52cae4118a7ee02ffefd Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 24 Apr 2016 11:08:14 +0200 Subject: [PATCH] gsdx ogl: remove the useless shadeboost Constant Buffer --- plugins/GSdx/GSDeviceOGL.cpp | 19 +++---------------- plugins/GSdx/GSDeviceOGL.h | 1 - 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index c9bbc32465..39ec12777b 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -37,7 +37,6 @@ uint64 g_uniform_upload_byte = 0; static const uint32 g_merge_cb_index = 10; static const uint32 g_interlace_cb_index = 11; -static const uint32 g_shadeboost_cb_index = 12; static const uint32 g_fx_cb_index = 14; static const uint32 g_convert_index = 15; static const uint32 g_vs_cb_index = 20; @@ -92,13 +91,13 @@ GSDeviceOGL::~GSDeviceOGL() GL_PUSH("GSDeviceOGL destructor"); // Clean vertex buffer state - delete (m_va); + delete m_va; // Clean m_merge_obj - delete (m_merge_obj.cb); + delete m_merge_obj.cb; // Clean m_interlace - delete (m_interlace.cb); + delete m_interlace.cb; // Clean m_convert delete m_convert.dss; @@ -114,9 +113,6 @@ GSDeviceOGL::~GSDeviceOGL() // Clean m_date delete m_date.dss; - // Clean shadeboost - delete m_shadeboost.cb; - // Clean various opengl allocation glDeleteFramebuffers(1, &m_fbo); glDeleteFramebuffers(1, &m_fbo_read); @@ -318,8 +314,6 @@ bool GSDeviceOGL::Create(GSWnd* wnd) // **************************************************************** GL_PUSH("GSDeviceOGL::Shadeboost"); - m_shadeboost.cb = new GSUniformBufferOGL(g_shadeboost_cb_index, sizeof(ShadeBoostConstantBuffer)); - int ShadeBoost_Contrast = theApp.GetConfig("ShadeBoost_Contrast", 50); int ShadeBoost_Brightness = theApp.GetConfig("ShadeBoost_Brightness", 50); int ShadeBoost_Saturation = theApp.GetConfig("ShadeBoost_Saturation", 50); @@ -1311,13 +1305,6 @@ void GSDeviceOGL::DoShadeBoost(GSTexture* sTex, GSTexture* dTex) GSVector4 sRect(0, 0, 1, 1); GSVector4 dRect(0, 0, s.x, s.y); - ShadeBoostConstantBuffer cb; - - cb.rcpFrame = GSVector4(1.0f / s.x, 1.0f / s.y, 0.0f, 0.0f); - cb.rcpFrameOpt = GSVector4::zero(); - - m_shadeboost.cb->upload(&cb); - StretchRect(sTex, sRect, dTex, dRect, m_shadeboost.ps, true); GL_POP(); diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 4701f9439b..1c2fb06949 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -430,7 +430,6 @@ class GSDeviceOGL final : public GSDevice struct { GLuint ps; - GSUniformBufferOGL *cb; } m_shadeboost; GLuint m_vs[1<<3];