[Mesa-dev] [PATCH v2] glsl: enable conservative depth, ssbo based on GLSL version

Ilia Mirkin imirkin at alum.mit.edu
Fri Jul 24 22:06:20 PDT 2015


Add in missed version checks in the GLSL parser

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

v1 -> v2: drop AoA hunks to avoid conflicting with Timothy's changes

 src/glsl/glsl_parser.yy | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 4cce5b8..2b0c8bd 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1166,7 +1166,8 @@ layout_qualifier_id:
       /* Layout qualifiers for AMD/ARB_conservative_depth. */
       if (!$$.flags.i &&
           (state->AMD_conservative_depth_enable ||
-           state->ARB_conservative_depth_enable)) {
+           state->ARB_conservative_depth_enable ||
+           state->is_version(420, 0))) {
          if (match_layout_qualifier($1, "depth_any", state) == 0) {
             $$.flags.q.depth_any = 1;
          } else if (match_layout_qualifier($1, "depth_greater", state) == 0) {
@@ -1460,7 +1461,7 @@ layout_qualifier_id:
 
       if ((state->has_420pack() ||
            state->has_atomic_counters() ||
-           state->ARB_shader_storage_buffer_object_enable) &&
+           state->has_shader_storage_buffer_objects()) &&
           match_layout_qualifier("binding", $1, state) == 0) {
          $$.flags.q.explicit_binding = 1;
          $$.binding = $3;
-- 
2.3.6



More information about the mesa-dev mailing list