summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-04-02 21:08:25 -0400
committerIlia Mirkin <[email protected]>2016-04-03 18:06:35 -0400
commit87906cbc37cb99089caa0be4346ebfbe2b7e2d3e (patch)
tree32b0b8ef6d2d45f09365093c51dfd8ce53639093
parentd50ffb5e464e18894eaf8cb779df3a74f5836ef9 (diff)
glsl: allow conservative depth qualifiers in GLSL 420
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 3fe90079420..7c9be8171b6 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -3326,6 +3326,7 @@ apply_layout_qualifier_to_variable(const struct ast_type_qualifier *qual,
+ qual->flags.q.depth_less
+ qual->flags.q.depth_unchanged;
if (depth_layout_count > 0
+ && !state->is_version(420, 0)
&& !state->AMD_conservative_depth_enable
&& !state->ARB_conservative_depth_enable) {
_mesa_glsl_error(loc, state,
@@ -3708,7 +3709,8 @@ get_variable_being_redeclared(ir_variable *var, YYLTYPE loc,
earlier->data.interpolation = var->data.interpolation;
/* Layout qualifiers for gl_FragDepth. */
- } else if ((state->AMD_conservative_depth_enable ||
+ } else if ((state->is_version(420, 0) ||
+ state->AMD_conservative_depth_enable ||
state->ARB_conservative_depth_enable)
&& strcmp(var->name, "gl_FragDepth") == 0
&& earlier->type == var->type