[Mesa-dev] [PATCH 2/2] glsl: don't include system values in varyings usage

Marek Olšák maraeo at gmail.com
Tue Dec 13 16:32:07 PST 2011


---
 src/glsl/linker.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index e9298bb..1086ef7 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1811,6 +1811,13 @@ assign_varying_locations(struct gl_context *ctx,
                continue;
             }
 
+            /* System values are not varyings per-se.
+             * NOTE: gl_PointCoord does occupy a varying slot. */
+            if (var->location == FRAG_ATTRIB_WPOS ||
+                var->location == FRAG_ATTRIB_FACE) {
+               continue;
+            }
+
             /* The packing rules are used for vertex shader inputs are also
              * used for fragment shader inputs.
              */
-- 
1.7.4.1



More information about the mesa-dev mailing list