summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parser.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-28 11:33:51 -0600
committerBrian Paul <brianp@vmware.com>2009-10-28 11:33:51 -0600
commit7d56caabe45e91a67096804c7e341d04d01db7aa (patch)
tree1632cea88f33bf4fe39d198185596d05d44d83bb /src/mesa/shader/program_parser.h
parent182ff3e47a2d18917cdf3344c2ce95bd0a460784 (diff)
parent0219cd0961e6b47761fe6984dc6c0a8bfa6057d8 (diff)
Merge branch 'mesa_7_6_branch'
Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l
Diffstat (limited to 'src/mesa/shader/program_parser.h')
-rw-r--r--src/mesa/shader/program_parser.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index bce6041381..25b413918a 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -38,6 +38,13 @@ enum asm_type {
at_output,
};
+/**
+ * \note
+ * Objects of this type are allocated as the object plus the name of the
+ * symbol. That is, malloc(sizeof(struct asm_symbol) + strlen(name) + 1).
+ * Alternately, asm_symbol::name could be moved to the bottom of the structure
+ * and declared as 'char name[0];'.
+ */
struct asm_symbol {
struct asm_symbol *next; /**< List linkage for freeing. */
const char *name;
@@ -158,6 +165,15 @@ struct asm_parser_state {
/**
+ * Buffer to hold strings transfered from the lexer to the parser
+ */
+ /*@{*/
+ char *string_dumpster; /**< String data transfered. */
+ size_t dumpster_size; /**< Total size, in bytes, of the buffer. */
+ /*@}*/
+
+
+ /**
* Selected limits copied from gl_constants
*
* These are limits from the GL context, but various bits in the program