[Mesa-dev] [PATCH] centroid affects interpolation

Kevin Rogovin kevin.rogovin at intel.com
Tue Feb 4 14:01:54 CET 2014


Place centroid keyword as an interpolation qualifier.
Previously was a storage qualifier. Fixes front end
to accept input of the form "centroid in type variable"

---
 src/glsl/glsl_parser.yy | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 928c57e..265fc57 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1353,6 +1353,11 @@ interpolation_qualifier:
       memset(& $$, 0, sizeof($$));
       $$.flags.q.flat = 1;
    }
+   | CENTROID
+   {
+      memset(& $$, 0, sizeof($$));
+      $$.flags.q.centroid = 1;
+   }
    | NOPERSPECTIVE
    {
       memset(& $$, 0, sizeof($$));
@@ -1501,13 +1506,7 @@ type_qualifier:
    }
    ;
 
-auxiliary_storage_qualifier:
-   CENTROID
-   {
-      memset(& $$, 0, sizeof($$));
-      $$.flags.q.centroid = 1;
-   }
-   | SAMPLE
+auxiliary_storage_qualifier:SAMPLE
    {
       memset(& $$, 0, sizeof($$));
       $$.flags.q.sample = 1;
-- 
1.8.1.2



More information about the mesa-dev mailing list