Mesa (master): glsl: allow conservative depth qualifiers in GLSL 420
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sun Apr 3 22:30:22 UTC 2016
Module: Mesa
Branch: master
Commit: 87906cbc37cb99089caa0be4346ebfbe2b7e2d3e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87906cbc37cb99089caa0be4346ebfbe2b7e2d3e
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Apr 2 21:08:25 2016 -0400
glsl: allow conservative depth qualifiers in GLSL 420
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Dave Airlie <airlied at redhat.com>
---
src/compiler/glsl/ast_to_hir.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 3fe9007..7c9be81 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
More information about the mesa-commit
mailing list