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 <sroland@vmware.com>
This commit is contained in:
Brian Paul
2014-07-01 07:53:16 -06:00
parent 5e04526399
commit f11e3dc122
+1 -1
View File
@@ -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;