The glmark tests are broken and not our problem. The spec has always required that precision qualifiers match. This patch is required to pass conformance. We absolutely cannot revert it.

On November 25, 2016 6:37:47 AM Rob Clark <robdcl...@gmail.com> wrote:

hmm, actually looks like we need to revert
259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
on ES if uniform precision qualifiers don't match") too

On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark <robdcl...@gmail.com> wrote:
fwiw, issue is that a bunch (all) have "precision mediump float;" in
frag shader, and list some uniforms in both frag and vert shader.  I'm
not a spec lawyer, but pretty sure we should allow that.

note that these are all gles2 shaders (not glsl 300 or 310)

BR,
-R

On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark <robdcl...@gmail.com> wrote:
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



_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to