summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-19 13:04:52 +0200
committerJakob Bornecrantz <[email protected]>2008-09-19 13:04:52 +0200
commit0576e837f18ad9925d732f883f4922c907d7bafb (patch)
treeec242db18a1aba5833cb7fd531a83c26aecc28eb /src/mesa/state_tracker
parent866a2c3ccb6b62966ce1da796498a62e276570d1 (diff)
mesa: Fix arb parse constants
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index b9807bb8074..524d8890b5c 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -77,6 +77,7 @@ map_register_file(
case PROGRAM_CONSTANT:
if (indirectAccess)
return TGSI_FILE_CONSTANT;
+ assert(immediateMapping[index] != ~0);
return TGSI_FILE_IMMEDIATE;
case PROGRAM_INPUT:
return TGSI_FILE_INPUT;
@@ -118,6 +119,7 @@ map_register_file_index(
case TGSI_FILE_IMMEDIATE:
if (indirectAccess)
return index;
+ assert(immediateMapping[index] != ~0);
return immediateMapping[index];
default:
@@ -242,14 +244,6 @@ 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) */
{