summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-07-01 07:53:16 -0600
committerBrian Paul <[email protected]>2014-07-01 09:42:44 -0600
commitf11e3dc122d6fba23bf01f0ec2d27cd8e26cf534 (patch)
treeb1653464c5601df18916c95c1d26718b7b061734 /src
parent5e04526399ca5d249cc5ec600aa6546356abccbb (diff)
st/mesa: don't ignore const buf index in src_register()
Otherwise, if we were creating a const buffer src register for a UBO the index into the UBO was always zero. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 13de2be4039..256f356623b 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4400,7 +4400,7 @@ src_register(struct st_translate *t,
case PROGRAM_CONSTANT: /* ie, immediate */
if (index2D) {
struct ureg_src src;
- src = ureg_src_register(TGSI_FILE_CONSTANT, 0);
+ src = ureg_src_register(TGSI_FILE_CONSTANT, index);
src.Dimension = 1;
src.DimensionIndex = index2D;
return src;