Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
degasus committed Aug 6, 2013
1 parent 88212fb commit dc23a07
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
Expand Up @@ -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);
}

}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dc23a07

Please sign in to comment.