[Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"

Rob Clark robdclark at gmail.com
Fri Nov 25 14:30:35 UTC 2016


This breaks a whole bunch of gles2 glmark2 "tests"..

This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
---
 src/compiler/glsl/link_interface_blocks.cpp |  7 ++-----
 src/compiler/glsl/linker.cpp                | 10 +---------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/glsl/link_interface_blocks.cpp b/src/compiler/glsl/link_interface_blocks.cpp
index 4e91abc..abcc841 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
        * don't force their types to match.  They might mismatch due to the two
        * shaders using different GLSL versions, and that's ok.
        */
-      if ((a->data.how_declared != ir_var_declared_implicitly ||
-           b->data.how_declared != ir_var_declared_implicitly) &&
-          (!prog->IsES || prog->Version != 310 ||
-           interstage_member_mismatch(prog, a->get_interface_type(),
-                                      b->get_interface_type())))
+      if (a->data.how_declared != ir_var_declared_implicitly ||
+          b->data.how_declared != ir_var_declared_implicitly)
          return false;
    }
 
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index cc28b26..e925d79 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program *prog,
             return;
          }
 
-         /* Only in GLSL ES 3.10, the precision qualifier should not match
-          * between block members defined in matched block names within a
-          * shader interface.
-          *
-          * In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
-          * member should match.
-          */
-         if (prog->IsES && (prog->Version != 310 || !var->get_interface_type()) &&
-             existing->data.precision != var->data.precision) {
+         if (prog->IsES && existing->data.precision != var->data.precision) {
             linker_error(prog, "declarations for %s `%s` have "
                          "mismatching precision qualifiers\n",
                          mode_string(var), var->name);
-- 
2.7.4



More information about the mesa-dev mailing list