From f11e3dc122d6fba23bf01f0ec2d27cd8e26cf534 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 1 Jul 2014 07:53:16 -0600 Subject: [PATCH] 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 --- 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 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; -- 2.30.2