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

Author: Ian Romanick <[email protected]>
Date:   Mon Aug 31 16:57:49 2009 -0700

NV fp: Parse 'OPTION NV_fragment_program' in ARB assembly shaders

---

 src/mesa/shader/program_parse_extra.c |   11 +++++++++++
 src/mesa/shader/program_parser.h      |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/program_parse_extra.c 
b/src/mesa/shader/program_parse_extra.c
index 8e4be60..79e80c5 100644
--- a/src/mesa/shader/program_parse_extra.c
+++ b/src/mesa/shader/program_parse_extra.c
@@ -102,6 +102,17 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, 
const char *option)
            return 1;
         }
       }
+   } else if (strncmp(option, "NV_fragment_program", 19) == 0) {
+      option += 19;
+
+      /* Other NV_fragment_program strings may be supported later.
+       */
+      if (option[0] == '\0') {
+        if (state->ctx->Extensions.NV_fragment_program_option) {
+           state->option.NV_fragment = 1;
+           return 1;
+        }
+      }
    } else if (strncmp(option, "MESA_", 5) == 0) {
       option += 5;
 
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index fa47d84..be32a1b 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -202,6 +202,7 @@ struct asm_parser_state {
       unsigned Shadow:1;
       unsigned TexRect:1;
       unsigned TexArray:1;
+      unsigned NV_fragment:1;
    } option;
 
    struct {

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

Reply via email to