diff options
author | Chris Forbes <[email protected]> | 2014-01-25 18:29:38 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-06-22 16:52:19 +1200 |
commit | b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c (patch) | |
tree | cbf3e31b9133ed6c6da26e485ca794ead16645de /src | |
parent | cc18b1ec2161c846109e921d7821dfeef7a06f3a (diff) |
glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-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 e22b08349b3..b9c69d23c7c 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"); + } } |