Browse Source

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>
tags/10.3-branchpoint
Chris Forbes 11 years ago
parent
commit
b2c1f3a019
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/glsl/builtin_variables.cpp

+ 5
- 0
src/glsl/builtin_variables.cpp View File

@@ -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");
}
}



Loading…
Cancel
Save