summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_operation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_operation.h')
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h
index 4f92aa9a08..37af5d617c 100644
--- a/src/mesa/shader/slang/slang_compile_operation.h
+++ b/src/mesa/shader/slang/slang_compile_operation.h
@@ -94,6 +94,7 @@ typedef enum slang_operation_type_
SLANG_OPER_SUBSCRIPT, /* [expr] "[" [expr] "]" */
SLANG_OPER_CALL, /* [func name] [param] [param] [...] */
SLANG_OPER_NON_INLINED_CALL, /* a real function call */
+ SLANG_OPER_METHOD, /* method call, such as v.length() */
SLANG_OPER_FIELD, /* i.e.: ".next" or ".xzy" or ".xxx" etc */
SLANG_OPER_POSTINCREMENT, /* [var] "++" */
SLANG_OPER_POSTDECREMENT /* [var] "--" */
@@ -115,10 +116,17 @@ typedef struct slang_operation_
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_atom a_obj; /**< object in a method call */
slang_variable_scope *locals; /**< local vars for scope */
struct slang_function_ *fun; /**< If type == SLANG_OPER_CALL */
struct slang_variable_ *var; /**< If type == slang_oper_identier */
struct slang_label_ *label; /**< If type == SLANG_OPER_LABEL */
+ /** If type==SLANG_OPER_CALL and we're calling an array constructor,
+ * for which there's no real function, we need to have a flag to
+ * indicate such. num_children indicates number of elements.
+ */
+ GLboolean array_constructor;
+ double x;
} slang_operation;