Module: Mesa
Branch: asm-shader-rework-3
Commit: a6ee2c08a659ead9257a0cd4fd864b14fdbee67f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6ee2c08a659ead9257a0cd4fd864b14fdbee67f

Author: Ian Romanick <[email protected]>
Date:   Wed Sep 30 22:02:04 2009 -0700

NV vp3 parser: Support instructions modifying CC0 or CC1

---

 src/mesa/shader/program_lexer.l       |    2 +-
 src/mesa/shader/program_parse_extra.c |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index a115a6b..4324a4e 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -150,7 +150,7 @@ dot    "."[ \t]*
 
 sz     [HRX]?
 szf    [HR]?
-cc     C?
+cc     (C[01]?)?
 sat    (_SAT)?
 
 %option bison-bridge bison-locations reentrant noyywrap
diff --git a/src/mesa/shader/program_parse_extra.c 
b/src/mesa/shader/program_parse_extra.c
index 57da169..8126fae 100644
--- a/src/mesa/shader/program_parse_extra.c
+++ b/src/mesa/shader/program_parse_extra.c
@@ -74,6 +74,13 @@ _mesa_parse_instruction_suffix(const struct asm_parser_state 
*state,
         inst->CondUpdate = 1;
         suffix++;
       }
+
+      if (state->option.NV_vertex3) {
+        if ((suffix[0] == '0') || (suffix[0] == '1')) {
+           inst->CondDst = suffix[0] - '0';
+           suffix++;
+        }
+      }
    }
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to