diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index 530b3d4f7b..2a93599f87 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -26,6 +26,9 @@ #ifdef FRAGMENT_SHADER +#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts +layout(location = 0) +#endif in SHADER { vec4 t_float; diff --git a/plugins/GSdx/res/glsl/tfx_vgs.glsl b/plugins/GSdx/res/glsl/tfx_vgs.glsl index f4a43d81b7..d83ee6ff84 100644 --- a/plugins/GSdx/res/glsl/tfx_vgs.glsl +++ b/plugins/GSdx/res/glsl/tfx_vgs.glsl @@ -9,6 +9,9 @@ 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 +layout(location = 0) +#endif out SHADER { vec4 t_float; @@ -61,6 +64,9 @@ void vs_main() #ifdef GEOMETRY_SHADER +#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts +layout(location = 0) +#endif in SHADER { vec4 t_float; @@ -69,6 +75,9 @@ in SHADER flat vec4 fc; } GSin[]; +#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts +layout(location = 0) +#endif out SHADER { vec4 t_float; diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index 6d1906702e..d075a3a6b9 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -749,6 +749,9 @@ 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" + "layout(location = 0)\n" + "#endif\n" "out SHADER\n" "{\n" " vec4 t_float;\n" @@ -801,6 +804,9 @@ static const char* const tfx_vgs_glsl = "\n" "#ifdef GEOMETRY_SHADER\n" "\n" + "#if defined(GL_ARB_enhanced_layouts) && GL_ARB_enhanced_layouts\n" + "layout(location = 0)\n" + "#endif\n" "in SHADER\n" "{\n" " vec4 t_float;\n" @@ -809,6 +815,9 @@ 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" + "layout(location = 0)\n" + "#endif\n" "out SHADER\n" "{\n" " vec4 t_float;\n" @@ -1016,6 +1025,9 @@ 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" + "layout(location = 0)\n" + "#endif\n" "in SHADER\n" "{\n" " vec4 t_float;\n"