summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parser.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-09-10 15:04:24 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-09-10 15:04:24 -0700
commit81722c5d7e8e93d837510b9e6e5d014ec64cf4b3 (patch)
tree354cdf68d823182ce0c313c13b58ac3964eb2db6 /src/mesa/shader/program_parser.h
parentcdb719399438194c5e9d5bc1bae3458398fe4e54 (diff)
NV fp parser: Add support for condition codes
Conditional write masks and the condition-code based KIL instruction are all supported. The specific behavior of KIL in the following shader may or may not match the behavior of other implementations: !!ARBfp1.0 TEMP GT; MOVC GT, fragment.texcoord[0]; KIL GT.x; END Should be it interpreted as 'KIL srcReg' or as 'KIL ccTest'? The current parser will interpret it as 'KIL srcReg'.
Diffstat (limited to 'src/mesa/shader/program_parser.h')
-rw-r--r--src/mesa/shader/program_parser.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index 497891f53d..bce6041381 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -278,4 +278,17 @@ extern int _mesa_ARBfp_parse_option(struct asm_parser_state *state,
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);
+
/*@}*/