diff options
author | Chris Forbes <chrisf@ijw.co.nz> | 2014-01-25 18:29:38 +1300 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2014-06-22 16:52:19 +1200 |
commit | b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c (patch) | |
tree | cbf3e31b9133ed6c6da26e485ca794ead16645de /src/glsl | |
parent | cc18b1ec2161c846109e921d7821dfeef7a06f3a (diff) | |
download | external_mesa3d-b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c.zip external_mesa3d-b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c.tar.gz external_mesa3d-b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c.tar.bz2 |
glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/builtin_variables.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index e22b083..b9c69d2 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -938,6 +938,11 @@ builtin_variable_generator::generate_fs_special_vars() if (state->ARB_gpu_shader5_enable) { add_system_value(SYSTEM_VALUE_SAMPLE_MASK_IN, array(int_t, 1), "gl_SampleMaskIn"); } + + if (state->ARB_fragment_layer_viewport_enable) { + add_input(VARYING_SLOT_LAYER, int_t, "gl_Layer"); + add_input(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex"); + } } |