Signed-off-by: Courtney Goeltzenleuchter <court...@lunarg.com> --- src/glsl/builtin_variables.cpp | 2 ++ src/glsl/glsl_parser_extras.h | 1 + 2 files changed, 3 insertions(+)
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 4d44104..862d255 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -778,6 +778,8 @@ void builtin_variable_generator::generate_gs_special_vars() { add_output(VARYING_SLOT_LAYER, int_t, "gl_Layer"); + if (state->ARB_viewport_array_enable) + add_output(VARYING_SLOT_LAYER, int_t, "gl_ViewportIndex"); /* Although gl_PrimitiveID appears in tessellation control and tessellation * evaluation shaders, it has a different function there than it has in diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index d232bb3..5257a84 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -356,6 +356,7 @@ struct _mesa_glsl_parse_state { bool EXT_shader_integer_mix_warn; bool ARB_shader_atomic_counters_enable; bool ARB_shader_atomic_counters_warn; + bool ARB_viewport_array_enable; /*@}*/ /** Extensions supported by the OpenGL implementation. */ -- 1.8.1.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev