tgsi: Add a ugly fix for CONSTANT problems
authorJakob Bornecrantz <jakob@tungstengraphics.com>
Wed, 17 Sep 2008 16:11:35 +0000 (18:11 +0200)
committerJakob Bornecrantz <jakob@tungstengraphics.com>
Wed, 17 Sep 2008 16:13:17 +0000 (18:13 +0200)
src/mesa/state_tracker/st_mesa_to_tgsi.c

index 49abee1..ff0bc04 100644 (file)
@@ -241,6 +241,15 @@ compile_instruction(
          immediateMapping,
          indirectAccess );
 
+      /**
+       * This not at all the correct solution.
+       * FIXME: Roll this up in the above map functions
+       */
+      if (fullsrc->SrcRegister.File == TGSI_FILE_IMMEDIATE && fullsrc->SrcRegister.Index == ~0) {
+         fullsrc->SrcRegister.File = TGSI_FILE_CONSTANT;
+         fullsrc->SrcRegister.Index = inst->SrcReg[i].Index;
+      }
+
       /* swizzle (ext swizzle also depends on negation) */
       {
          GLuint swz[4];