From: Courtney Goeltzenleuchter Date: Wed, 13 Nov 2013 18:11:39 +0000 (-0700) Subject: glsl: Add gl_ViewportIndex built-in variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2eefb06aa3522920548046ee0c1be59428649ed;p=mesa.git glsl: Add gl_ViewportIndex built-in variable v2 (idr): Fix copy-and-paste bug... s/LAYER/VIEWPORT/ Signed-off-by: Courtney Goeltzenleuchter Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index f630923eda4..d6bc3c07316 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -780,6 +780,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_VIEWPORT, 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