From: Brian Paul Date: Tue, 1 Jul 2014 13:53:16 +0000 (-0600) Subject: st/mesa: don't ignore const buf index in src_register() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f11e3dc122d6fba23bf01f0ec2d27cd8e26cf534;p=mesa.git 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 --- 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;