gsdx ogl: of course some driver don't work with GL_ARB_enhanced_layouts

Windows and (AMD or Intel)
This commit is contained in:
Gregory Hainaut 2016-10-23 12:24:59 +02:00
parent 885ef7a46f
commit e80ca0fa92
4 changed files with 10 additions and 8 deletions

View File

@ -218,6 +218,8 @@ std::string GSShaderOGL::GenGlslHeader(const std::string& entry, GLenum type, co
} else {
header += "#define DISABLE_GL42_image\n";
}
if (GLLoader::fglrx_buggy_driver || GLLoader::intel_buggy_driver)
header += "#define BROKEN_DRIVER as_usual\n";
// Stupid GL implementation (can't use GL_ES)
// AMD/nvidia define it to 0

View File

@ -26,7 +26,7 @@
#ifdef FRAGMENT_SHADER
#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
layout(location = 0)
#endif
in SHADER

View File

@ -9,7 +9,7 @@ layout(location = 5) in uint i_z;
layout(location = 6) in uvec2 i_uv;
layout(location = 7) in vec4 i_f;
#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
layout(location = 0)
#endif
out SHADER
@ -64,7 +64,7 @@ void vs_main()
#ifdef GEOMETRY_SHADER
#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
layout(location = 0)
#endif
in SHADER
@ -75,7 +75,7 @@ in SHADER
flat vec4 fc;
} GSin[];
#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts
layout(location = 0)
#endif
out SHADER

View File

@ -749,7 +749,7 @@ static const char* const tfx_vgs_glsl =
"layout(location = 6) in uvec2 i_uv;\n"
"layout(location = 7) in vec4 i_f;\n"
"\n"
"#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"layout(location = 0)\n"
"#endif\n"
"out SHADER\n"
@ -804,7 +804,7 @@ static const char* const tfx_vgs_glsl =
"\n"
"#ifdef GEOMETRY_SHADER\n"
"\n"
"#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"layout(location = 0)\n"
"#endif\n"
"in SHADER\n"
@ -815,7 +815,7 @@ static const char* const tfx_vgs_glsl =
" flat vec4 fc;\n"
"} GSin[];\n"
"\n"
"#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"layout(location = 0)\n"
"#endif\n"
"out SHADER\n"
@ -1025,7 +1025,7 @@ static const char* const tfx_fs_all_glsl =
"\n"
"#ifdef FRAGMENT_SHADER\n"
"\n"
"#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"#if !defined(BROKEN_DRIVER) && defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n"
"layout(location = 0)\n"
"#endif\n"
"in SHADER\n"