Module: Mesa
Branch: master
Commit: 00a1bd13b5c6b565b5d15409a6f814b0df2fbe29
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=00a1bd13b5c6b565b5d15409a6f814b0df2fbe29

Author: Timothy Arceri <timothy.arc...@collabora.com>
Date:   Mon Feb 15 14:06:04 2016 +1100

glsl: warn in GL as well as ES when varying not written

Reviewed-by: Iago Toral Quiroga <ito...@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93339

---

 src/compiler/glsl/link_varyings.cpp | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/compiler/glsl/link_varyings.cpp 
b/src/compiler/glsl/link_varyings.cpp
index 590de17..05cc1a2 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -1739,22 +1739,7 @@ assign_varying_locations(struct gl_context *ctx,
 
          if (var && var->data.mode == ir_var_shader_in &&
              var->data.is_unmatched_generic_inout) {
-            if (prog->IsES) {
-               /*
-                * On Page 91 (Page 97 of the PDF) of the GLSL ES 1.0 spec:
-                *
-                *     If the vertex shader declares but doesn't write to a
-                *     varying and the fragment shader declares and reads it,
-                *     is this an error?
-                *
-                *     RESOLUTION: No.
-                */
-               linker_warning(prog, "%s shader varying %s not written "
-                              "by %s shader\n.",
-                              _mesa_shader_stage_to_string(consumer->Stage),
-                              var->name,
-                              _mesa_shader_stage_to_string(producer->Stage));
-            } else if (prog->Version <= 120) {
+            if (!prog->IsES && prog->Version <= 120) {
                /* On page 25 (page 31 of the PDF) of the GLSL 1.20 spec:
                 *
                 *     Only those varying variables used (i.e. read) in
@@ -1772,6 +1757,12 @@ assign_varying_locations(struct gl_context *ctx,
                             _mesa_shader_stage_to_string(consumer->Stage),
                            var->name,
                             _mesa_shader_stage_to_string(producer->Stage));
+            } else {
+               linker_warning(prog, "%s shader varying %s not written "
+                              "by %s shader\n.",
+                              _mesa_shader_stage_to_string(consumer->Stage),
+                              var->name,
+                              _mesa_shader_stage_to_string(producer->Stage));
             }
          }
       }

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

Reply via email to