diff options
Diffstat (limited to 'src/mesa/shader/slang/slang_ir.h')
-rw-r--r-- | src/mesa/shader/slang/slang_ir.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index ba0735d64dd..61ff649e5cc 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -147,6 +147,11 @@ struct _slang_ir_storage GLuint Swizzle; GLint RefCount; /**< Used during IR tree delete */ GLboolean RelAddr; + + /** If Parent is non-null, Index is relative to parent. + * The other fields are ignored. + */ + struct _slang_ir_storage *Parent; }; typedef struct _slang_ir_storage slang_ir_storage; @@ -165,7 +170,6 @@ typedef struct slang_ir_node_ /** special fields depending on Opcode: */ const char *Field; /**< If Opcode == IR_FIELD */ - int FieldOffset; /**< If Opcode == IR_FIELD */ GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ @@ -193,6 +197,20 @@ extern const slang_ir_info * _slang_ir_info(slang_ir_opcode opcode); +extern slang_ir_storage * +_slang_new_ir_storage(enum register_file file, GLint index, GLint size); + + +extern slang_ir_storage * +_slang_new_ir_storage_swz(enum register_file file, GLint index, GLint size, + GLuint swizzle); + +extern slang_ir_storage * +_slang_new_ir_storage_relative(GLint index, GLint size, + slang_ir_storage *parent); + + + extern void _slang_free_ir_tree(slang_ir_node *n); |