summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_operation.h
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-03 17:24:24 -0700
committerBrian <brian@yutani.localnet.net>2007-02-03 17:24:24 -0700
commit93b975a1d9fcc4a10987676f7368809522f27d71 (patch)
treeebf408cfd8fbca10dea39eb594346e4fe03636b9 /src/mesa/shader/slang/slang_compile_operation.h
parent5ee684cba9b1f63090e184125e5890da4fc1d28c (diff)
Add literal_size field to slang_operation.
Used to track the number of components in a float/int/bool literal. Helps with some typechecking things. Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))"
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_operation.h')
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h
index 121b5832ef..3f5b1bb8f3 100644
--- a/src/mesa/shader/slang/slang_compile_operation.h
+++ b/src/mesa/shader/slang/slang_compile_operation.h
@@ -117,6 +117,7 @@ typedef struct slang_operation_
struct slang_operation_ *children;
GLuint num_children;
GLfloat literal[4]; /**< Used for float, int and bool values */
+ GLuint literal_size; /**< 1, 2, 3, or 4 */
slang_atom a_id; /**< type: asm, identifier, call, field */
slang_variable_scope *locals; /**< local vars for scope */
struct slang_function_ *fun; /**< If type == slang_oper_call */