[Mesa-dev] [PATCH 27/37] glsl: Add gl_ViewportIndex built-in variable
Ian Romanick
idr at freedesktop.org
Fri Jan 17 17:03:47 PST 2014
From: Courtney Goeltzenleuchter <courtney at LunarG.com>
v2 (idr): Fix copy-and-paste bug... s/LAYER/VIEWPORT/
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/builtin_variables.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index f630923..d6bc3c0 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
--
1.8.1.4
More information about the mesa-dev
mailing list