tgsi: properly parse indirect dimension references (e.g. for UBOs)
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 9 Jul 2014 06:27:36 +0000 (02:27 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 9 Jul 2014 16:40:07 +0000 (12:40 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_text.c

index 7e50d8d0ce3f725eaf4ecc6296c31b28279e2f27..e424d99702d50429115744731737fd6b59d72a7a 100644 (file)
@@ -804,6 +804,13 @@ parse_src_operand(
       src->Dimension.Indirect = 0;
       src->Dimension.Dimension = 0;
       src->Dimension.Index = bracket[0].index;
+      if (bracket[0].ind_file != TGSI_FILE_NULL) {
+         src->Dimension.Indirect = 1;
+         src->DimIndirect.File = bracket[0].ind_file;
+         src->DimIndirect.Index = bracket[0].ind_index;
+         src->DimIndirect.Swizzle = bracket[0].ind_comp;
+         src->DimIndirect.ArrayID = bracket[0].ind_array;
+      }
       bracket[0] = bracket[1];
    }
    src->Register.Index = bracket[0].index;