diff options
author | Ilia Mirkin <[email protected]> | 2016-09-16 13:59:27 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-09-22 20:42:30 -0400 |
commit | 70aef97f9e22323200eb8d1a02a9b35f4f4d5fe8 (patch) | |
tree | b1a172759aefa571502c1d830b817756a5b75586 /src/compiler/glsl/builtin_variables.cpp | |
parent | 411a72d4a2eb69e45701c5e19049f6c543a78f24 (diff) |
glsl: add OES_viewport_array enables and use them to expose gl_ViewportIndex
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index b66ad00d7ad..36a8667e2af 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -876,7 +876,8 @@ builtin_variable_generator::generate_constants() } if (state->is_version(410, 0) || - state->ARB_viewport_array_enable) + state->ARB_viewport_array_enable || + state->OES_viewport_array_enable) add_const("gl_MaxViewports", state->Const.MaxViewports); if (state->has_tessellation_shader()) { @@ -1096,7 +1097,8 @@ builtin_variable_generator::generate_gs_special_vars() var = add_output(VARYING_SLOT_LAYER, int_t, "gl_Layer"); var->data.interpolation = INTERP_MODE_FLAT; - if (state->is_version(410, 0) || state->ARB_viewport_array_enable) { + if (state->is_version(410, 0) || state->ARB_viewport_array_enable || + state->OES_viewport_array_enable) { var = add_output(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex"); var->data.interpolation = INTERP_MODE_FLAT; } @@ -1226,7 +1228,8 @@ builtin_variable_generator::generate_fs_special_vars() } if (state->is_version(430, 0) || - state->ARB_fragment_layer_viewport_enable) { + state->ARB_fragment_layer_viewport_enable || + state->OES_viewport_array_enable) { var = add_input(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex"); var->data.interpolation = INTERP_MODE_FLAT; } |