summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-06-18 19:08:24 -0400
committerIlia Mirkin <[email protected]>2015-06-18 20:40:22 -0400
commit5974841fd0be7e2c336f63bd9ef416723e1923dc (patch)
treee50fbefa321aff7181b260eb9c2cf700b78a875b /src
parent22af95af8316f2888a3935cdf774ff0997b3dd42 (diff)
glsl: guard gl_NumSamples enablement on ARB_sample_shading
gl_NumSamples should only be enabled when ARB_sample_shading is enabled. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/builtin_variables.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index c52b2526797..a765d35fde0 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -764,7 +764,8 @@ builtin_variable_generator::generate_constants()
void
builtin_variable_generator::generate_uniforms()
{
- add_uniform(int_t, "gl_NumSamples");
+ if (state->is_version(400, 0) || state->ARB_sample_shading_enable)
+ add_uniform(int_t, "gl_NumSamples");
add_uniform(type("gl_DepthRangeParameters"), "gl_DepthRange");
add_uniform(array(vec4_t, VERT_ATTRIB_MAX), "gl_CurrentAttribVertMESA");
add_uniform(array(vec4_t, VARYING_SLOT_MAX), "gl_CurrentAttribFragMESA");