aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/builtin_variables.cpp')
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index f630923ed..d6bc3c073 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/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