summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_label.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-23 09:36:29 -0700
committerBrian <[email protected]>2007-02-23 09:36:29 -0700
commitd8d07b2a8aa5cf9c5ce877b20351983b1aa8d01d (patch)
tree9956a9fe11d312caa204bd59890d61692338090b /src/mesa/shader/slang/slang_label.h
parent0cc941963197fcdf8913462dbb225bc2bfca9d85 (diff)
label routines for implementing branches, jumps
Diffstat (limited to 'src/mesa/shader/slang/slang_label.h')
-rw-r--r--src/mesa/shader/slang/slang_label.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_label.h b/src/mesa/shader/slang/slang_label.h
new file mode 100644
index 00000000000..661624f173b
--- /dev/null
+++ b/src/mesa/shader/slang/slang_label.h
@@ -0,0 +1,42 @@
+#ifndef SLANG_LABEL_H
+#define SLANG_LABEL_H 1
+
+#include "imports.h"
+#include "mtypes.h"
+#include "prog_instruction.h"
+
+
+struct slang_label_
+{
+ char *Name;
+ GLint Location;
+ /**
+ * List of instruction references (numbered starting at zero) which need
+ * their BranchTarget field filled in with the location eventually
+ * assigned to the label.
+ */
+ GLuint NumReferences;
+ GLuint *References; /** Array [NumReferences] */
+};
+
+typedef struct slang_label_ slang_label;
+
+
+extern slang_label *
+_slang_label_new(const char *name);
+
+extern void
+_slang_label_delete(slang_label *l);
+
+extern void
+_slang_label_add_reference(slang_label *l, GLuint inst);
+
+extern GLint
+_slang_label_get_location(const slang_label *l);
+
+extern void
+_slang_label_set_location(slang_label *l, GLint location,
+ struct gl_program *prog);
+
+
+#endif /* SLANG_LABEL_H */