[Mesa-dev] [PATCH 1/5] st/mesa: don't ignore const buf index in src_register()

Brian Paul brianp at vmware.com
Tue Jul 1 07:53:44 PDT 2014


Otherwise, if we were creating a const buffer src register for a UBO
the index into the UBO was always zero.
---
 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 cac1e0f..3391a14 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4396,7 +4396,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;
-- 
1.7.10.4



More information about the mesa-dev mailing list