r600g: add POW instruction
[mesa.git] / src / mesa / slang / slang_ir.c
index d78ba52505a8a0ab8cbcd6b305d3bb22a22993df..078c9369a89653158132d994c7e8c4d7f9b81fd4 100644 (file)
@@ -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->Index2 = 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->Index2 = 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->Index2 = 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 index2,
+                         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->Index2 = index2;
+   }
+   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->Index2 = 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->Index2 = 0;
    }
    return st;
 }