summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parser.h
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-10-03 19:30:48 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-10-03 19:30:48 +0200
commit6d25b9125ec1e66e0e255b0ee20fe18dfe1076fa (patch)
treec376951940eac2875567979a81e6a03a019942b7 /src/mesa/shader/program_parser.h
parent81c7561d9d3faf70ac22c6a5f3fbea18f53eed92 (diff)
parent7d2699aedc084d9cb9c2bd2f8bdb5f038271ac1e (diff)
Merge branch 'master' into r300-compiler
Diffstat (limited to 'src/mesa/shader/program_parser.h')
-rw-r--r--src/mesa/shader/program_parser.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index fa47d84565..bce6041381 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 {
@@ -263,4 +264,31 @@ extern int _mesa_ARBvp_parse_option(struct asm_parser_state *state,
extern int _mesa_ARBfp_parse_option(struct asm_parser_state *state,
const char *option);
+/**
+ * Parses and processes instruction suffixes
+ *
+ * Instruction suffixes, such as \c _SAT, are processed. The relevant bits
+ * are set in \c inst. If suffixes are encountered that are either not known
+ * or not supported by the modes and options set in \c state, zero will be
+ * returned.
+ *
+ * \return
+ * Non-zero on success, zero on failure.
+ */
+extern int _mesa_parse_instruction_suffix(const struct asm_parser_state *state,
+ const char *suffix, struct prog_instruction *inst);
+
+/**
+ * Parses a condition code name
+ *
+ * The condition code names (e.g., \c LT, \c GT, \c NE) were added to assembly
+ * shaders with the \c GL_NV_fragment_program_option extension. This function
+ * converts a string representation into one of the \c COND_ macros.
+ *
+ * \return
+ * One of the \c COND_ macros defined in prog_instruction.h on success or zero
+ * on failure.
+ */
+extern int _mesa_parse_cc(const char *s);
+
/*@}*/