summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-05-24 19:57:47 -0400
committerIlia Mirkin <[email protected]>2016-05-25 09:50:07 -0400
commit601a5195ebab77220c4d1447c3e734bc5f769e7a (patch)
treebc1af859aaf880742a3e201d6d522e9cd6af1f53 /src/compiler/glsl/builtin_variables.cpp
parent9690ab0cdf3cdbcdabce4858fd84711b3afbb9aa (diff)
glsl: add GL_EXT_clip_cull_distance define, add helpers
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r--src/compiler/glsl/builtin_variables.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index c6668e86517..d8b6f6edf97 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -674,14 +674,13 @@ builtin_variable_generator::generate_constants()
state->Const.MaxProgramTexelOffset);
}
- if (state->is_version(130, 0) || state->EXT_clip_cull_distance_enable) {
+ if (state->has_clip_distance()) {
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 ||
- state->EXT_clip_cull_distance_enable) {
+ if (state->has_cull_distance()) {
add_const("gl_MaxCullDistances", state->Const.MaxClipPlanes);
add_const("gl_MaxCombinedClipAndCullDistances",
state->Const.MaxClipPlanes);
@@ -1253,12 +1252,11 @@ builtin_variable_generator::generate_varyings()
}
}
- if (state->is_version(130, 0) || state->EXT_clip_cull_distance_enable) {
+ if (state->has_clip_distance()) {
add_varying(VARYING_SLOT_CLIP_DIST0, array(float_t, 0),
"gl_ClipDistance");
}
- if (state->is_version(450, 0) || state->ARB_cull_distance_enable ||
- state->EXT_clip_cull_distance_enable) {
+ if (state->has_cull_distance()) {
add_varying(VARYING_SLOT_CULL_DIST0, array(float_t, 0),
"gl_CullDistance");
}