diff options
Diffstat (limited to 'src/mesa/slang/slang_ir.c')
-rw-r--r-- | src/mesa/slang/slang_ir.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mesa/slang/slang_ir.c b/src/mesa/slang/slang_ir.c index d78ba52505..131093d2a7 100644 --- a/src/mesa/slang/slang_ir.c +++ b/src/mesa/slang/slang_ir.c @@ -133,6 +133,8 @@ _slang_init_ir_storage(slang_ir_storage *st, st->Swizzle = swizzle; st->Parent = NULL; st->IsIndirect = GL_FALSE; + st->Is2D = GL_FALSE; + st->Index2D = 0; } @@ -151,6 +153,8 @@ _slang_new_ir_storage(gl_register_file file, GLint index, GLint size) st->Swizzle = SWIZZLE_NOOP; st->Parent = NULL; st->IsIndirect = GL_FALSE; + st->Is2D = GL_FALSE; + st->Index2D = 0; } return st; } @@ -172,10 +176,36 @@ _slang_new_ir_storage_swz(gl_register_file file, GLint index, GLint size, st->Swizzle = swizzle; st->Parent = NULL; st->IsIndirect = GL_FALSE; + st->Is2D = GL_FALSE; + st->Index2D = 0; } return st; } +/** + * Return a new slang_ir_storage object. + */ +slang_ir_storage * +_slang_new_ir_storage_2d(gl_register_file file, + GLint index, GLint index2d, + GLint size, GLuint swizzle) +{ + slang_ir_storage *st; + st = (slang_ir_storage *) _slang_alloc(sizeof(slang_ir_storage)); + if (st) { + st->File = file; + st->Index = index; + st->Size = size; + st->Swizzle = swizzle; + st->Parent = NULL; + st->IsIndirect = GL_FALSE; + st->Is2D = GL_TRUE; + st->Index2D = index2d; + } + return st; +} + + /** * Return a new slang_ir_storage object. @@ -193,6 +223,8 @@ _slang_new_ir_storage_relative(GLint index, GLint size, st->Swizzle = SWIZZLE_NOOP; st->Parent = parent; st->IsIndirect = GL_FALSE; + st->Is2D = GL_FALSE; + st->Index2D = 0; } return st; } @@ -217,6 +249,8 @@ _slang_new_ir_storage_indirect(gl_register_file file, st->IndirectFile = indirectFile; st->IndirectIndex = indirectIndex; st->IndirectSwizzle = indirectSwizzle; + st->Is2D = GL_FALSE; + st->Index2D = 0; } return st; } |