From dc23a076bef52d23cd16352b9132a491cce96ea8 Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 6 Aug 2013 10:34:30 +0200 Subject: [PATCH] disable emulate format changes on glsl120 The current shader uses bit operations which aren't supported by glsl120. A workaround with round + frac + lots of additions would be possible, but unreadable. So I think it isn't worth But this fixes the annoying shader compilation error message --- .../Plugin_VideoOGL/Src/FramebufferManager.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index b381cd2375..140dbd4d78 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -226,8 +226,13 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms " ocol0 = float4(dst6) / 63.f;\n" "}"; - ProgramShaderCache::CompileShader(m_pixel_format_shaders[0], vs, ps_rgb8_to_rgba6); - ProgramShaderCache::CompileShader(m_pixel_format_shaders[1], vs, ps_rgba6_to_rgb8); + if(g_ogl_config.eSupportedGLSLVersion != GLSL_120) + { + // HACK: This shaders aren't glsl120 compatible as glsl120 don't support bit operations + // it could be workaround by floor + frac + tons off additions, but I think it isn't worth + ProgramShaderCache::CompileShader(m_pixel_format_shaders[0], vs, ps_rgb8_to_rgba6); + ProgramShaderCache::CompileShader(m_pixel_format_shaders[1], vs, ps_rgba6_to_rgb8); + } } @@ -359,6 +364,11 @@ GLuint FramebufferManager::ResolveAndGetDepthTarget(const EFBRectangle &source_r void FramebufferManager::ReinterpretPixelData(unsigned int convtype) { + if(g_ogl_config.eSupportedGLSLVersion == GLSL_120) { + // This feature isn't supported by glsl120 + return; + } + g_renderer->ResetAPIState(); GLuint src_texture = 0;