diff options
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index ff8a7e2db5e..c6668e86517 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -674,11 +674,14 @@ builtin_variable_generator::generate_constants() state->Const.MaxProgramTexelOffset); } - if (state->is_version(130, 0)) { + if (state->is_version(130, 0) || state->EXT_clip_cull_distance_enable) { add_const("gl_MaxClipDistances", state->Const.MaxClipPlanes); + } + if (state->is_version(130, 0)) { add_const("gl_MaxVaryingComponents", state->ctx->Const.MaxVarying * 4); } - if (state->is_version(450, 0) || state->ARB_cull_distance_enable) { + if (state->is_version(450, 0) || state->ARB_cull_distance_enable || + state->EXT_clip_cull_distance_enable) { add_const("gl_MaxCullDistances", state->Const.MaxClipPlanes); add_const("gl_MaxCombinedClipAndCullDistances", state->Const.MaxClipPlanes); @@ -1250,11 +1253,12 @@ builtin_variable_generator::generate_varyings() } } - if (state->is_version(130, 0)) { + if (state->is_version(130, 0) || state->EXT_clip_cull_distance_enable) { add_varying(VARYING_SLOT_CLIP_DIST0, array(float_t, 0), "gl_ClipDistance"); } - if (state->is_version(450, 0) || state->ARB_cull_distance_enable) { + if (state->is_version(450, 0) || state->ARB_cull_distance_enable || + state->EXT_clip_cull_distance_enable) { add_varying(VARYING_SLOT_CULL_DIST0, array(float_t, 0), "gl_CullDistance"); } |