[Mesa-dev] [PATCH 14/16] mesa/st: hack const index
Timothy Arceri
tarceri at itsqueeze.com
Tue Jun 20 01:50:43 UTC 2017
This is wrong fix me, just set to 4 to reduce piglit failures for now.
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 8cb6b16..22112c5 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5792,21 +5792,21 @@ src_register(struct st_translate *t, const st_src_reg *reg)
MIN2(shift + 3, 3));
}
case PROGRAM_UNIFORM:
assert(reg->index >= 0);
return reg->index < t->num_constants ?
t->constants[reg->index] : ureg_imm4f(t->ureg, 0, 0, 0, 0);
case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT: /* ie, immediate */
if (reg->has_index2)
- return ureg_src_register(TGSI_FILE_CONSTANT, reg->index);
+ return ureg_src_register(TGSI_FILE_CONSTANT, reg->index * 4);
else
return reg->index >= 0 && reg->index < t->num_constants ?
t->constants[reg->index] : ureg_imm4f(t->ureg, 0, 0, 0, 0);
case PROGRAM_IMMEDIATE:
assert(reg->index >= 0 && reg->index < t->num_immediates);
return t->immediates[reg->index];
case PROGRAM_INPUT:
/* GLSL inputs are 64-bit containers, so we have to
--
2.9.4
More information about the mesa-dev
mailing list