From 961873827853891aba6bc43243c01bf70e2c1f4b Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 4 Sep 2015 23:45:35 -0500 Subject: Remove all of our workarounds for Qualcomm devices we don't support anymore. --- Source/Core/VideoBackends/OGL/PostProcessing.cpp | 38 +----------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/PostProcessing.cpp') diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index b6715ff0ff..4bb52a652d 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -41,24 +41,11 @@ OpenGLPostProcessing::OpenGLPostProcessing() : m_initialized(false) { CreateHeader(); - - m_attribute_workaround = DriverDetails::HasBug(DriverDetails::BUG_BROKENATTRIBUTELESS); - if (m_attribute_workaround) - { - glGenBuffers(1, &m_attribute_vbo); - glGenVertexArrays(1, &m_attribute_vao); - } } OpenGLPostProcessing::~OpenGLPostProcessing() { m_shader.Destroy(); - - if (m_attribute_workaround) - { - glDeleteBuffers(1, &m_attribute_vbo); - glDeleteVertexArrays(1, &m_attribute_vao); - } } void OpenGLPostProcessing::BlitFromTexture(TargetRectangle src, TargetRectangle dst, @@ -70,10 +57,7 @@ void OpenGLPostProcessing::BlitFromTexture(TargetRectangle src, TargetRectangle glViewport(dst.left, dst.bottom, dst.GetWidth(), dst.GetHeight()); - if (m_attribute_workaround) - glBindVertexArray(m_attribute_vao); - else - OpenGL_BindAttributelessVAO(); + OpenGL_BindAttributelessVAO(); m_shader.Bind(); @@ -174,9 +158,6 @@ void OpenGLPostProcessing::ApplyShader() const char* vertex_shader = s_vertex_shader; - if (m_attribute_workaround) - vertex_shader = s_vertex_workaround_shader; - // and compile it if (!ProgramShaderCache::CompileShader(m_shader, vertex_shader, code.c_str())) { @@ -192,23 +173,6 @@ void OpenGLPostProcessing::ApplyShader() m_uniform_src_rect = glGetUniformLocation(m_shader.glprogid, "src_rect"); m_uniform_layer = glGetUniformLocation(m_shader.glprogid, "layer"); - if (m_attribute_workaround) - { - GLfloat vertices[] = { - -1.f, -1.f, 0.f, 0.f, - 1.f, -1.f, 1.f, 0.f, - -1.f, 1.f, 0.f, 1.f, - 1.f, 1.f, 1.f, 1.f, - }; - - glBindBuffer(GL_ARRAY_BUFFER, m_attribute_vbo); - glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); - - glBindVertexArray(m_attribute_vao); - glEnableVertexAttribArray(SHADER_POSITION_ATTRIB); - glVertexAttribPointer(SHADER_POSITION_ATTRIB, 4, GL_FLOAT, 0, 0, nullptr); - } - for (const auto& it : m_config.GetOptions()) { std::string glsl_name = "option_" + it.first; -- cgit v1.2.3 From a8c8f52f20d388a37fa245fbb0a42ae99dcc864e Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 5 Sep 2015 10:55:36 +0200 Subject: OGL: remove unused variable --- Source/Core/VideoBackends/OGL/PostProcessing.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/PostProcessing.cpp') diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index 4bb52a652d..64eee7a0db 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -19,15 +19,6 @@ namespace OGL { -static const char s_vertex_workaround_shader[] = - "in vec4 rawpos;\n" - "out vec2 uv0;\n" - "uniform vec4 src_rect;\n" - "void main(void) {\n" - " gl_Position = vec4(rawpos.xy, 0.0, 1.0);\n" - " uv0 = rawpos.zw * src_rect.zw + src_rect.xy;\n" - "}\n"; - static const char s_vertex_shader[] = "out vec2 uv0;\n" "uniform vec4 src_rect;\n" -- cgit v1.2.3 From 95f3c956a80d880f9988fed5c4a920e436808195 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 19 Sep 2015 04:40:00 +1200 Subject: Move GL interface code out of the OpenGL video backend. --- Source/Core/VideoBackends/OGL/PostProcessing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/PostProcessing.cpp') diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index 64eee7a0db..a80fb69d16 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -6,8 +6,9 @@ #include "Common/FileUtil.h" #include "Common/StringUtil.h" +#include "Common/GL/GLUtil.h" + #include "VideoBackends/OGL/FramebufferManager.h" -#include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/PostProcessing.h" #include "VideoBackends/OGL/ProgramShaderCache.h" #include "VideoBackends/OGL/SamplerCache.h" -- cgit v1.2.3