aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r--src/compiler/glsl/builtin_variables.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index cc32990fc2f..ff8a7e2db5e 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -302,7 +302,7 @@ public:
const glsl_type *construct_interface_instance() const;
private:
- glsl_struct_field fields[10];
+ glsl_struct_field fields[11];
unsigned num_fields;
};
@@ -678,6 +678,11 @@ builtin_variable_generator::generate_constants()
add_const("gl_MaxClipDistances", state->Const.MaxClipPlanes);
add_const("gl_MaxVaryingComponents", state->ctx->Const.MaxVarying * 4);
}
+ if (state->is_version(450, 0) || state->ARB_cull_distance_enable) {
+ add_const("gl_MaxCullDistances", state->Const.MaxClipPlanes);
+ add_const("gl_MaxCombinedClipAndCullDistances",
+ state->Const.MaxClipPlanes);
+ }
if (state->has_geometry_shader()) {
add_const("gl_MaxVertexOutputComponents",
@@ -1249,6 +1254,10 @@ builtin_variable_generator::generate_varyings()
add_varying(VARYING_SLOT_CLIP_DIST0, array(float_t, 0),
"gl_ClipDistance");
}
+ if (state->is_version(450, 0) || state->ARB_cull_distance_enable) {
+ add_varying(VARYING_SLOT_CULL_DIST0, array(float_t, 0),
+ "gl_CullDistance");
+ }
if (compatibility) {
add_varying(VARYING_SLOT_TEX0, array(vec4_t, 0), "gl_TexCoord");