From: Chris Forbes Date: Sat, 25 Jan 2014 05:29:38 +0000 (+1300) Subject: glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c;p=mesa.git glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader Signed-off-by: Chris Forbes Reviewed-by: Ian Romanick --- 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"); + } }