Mesa (master): st/glsl_to_tgsi: ir_load_ubo always has a second index

Nicolai Hähnle nh at kemper.freedesktop.org
Mon Sep 4 11:52:09 UTC 2017


Module: Mesa
Branch: master
Commit: 42b444ca1836633cc0791b7d65577e0bbfddcc6a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=42b444ca1836633cc0791b7d65577e0bbfddcc6a

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Wed Aug 23 17:09:09 2017 +0200

st/glsl_to_tgsi: ir_load_ubo always has a second index

Acked-by: Roland Scheidegger <sroland at vmware.com>
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 95c2f85b4c..58cae30166 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2186,14 +2186,13 @@ glsl_to_tgsi_visitor::visit_expression(ir_expression* ir, st_src_reg *op)
       if (const_uniform_block) {
          /* Constant constant buffer */
          cbuf.reladdr2 = NULL;
-         cbuf.has_index2 = true;
       }
       else {
          /* Relative/variable constant buffer */
          cbuf.reladdr2 = ralloc(mem_ctx, st_src_reg);
          memcpy(cbuf.reladdr2, &op[0], sizeof(st_src_reg));
-         cbuf.has_index2 = true;
       }
+      cbuf.has_index2 = true;
 
       cbuf.swizzle = swizzle_for_size(ir->type->vector_elements);
       if (glsl_base_type_is_64bit(cbuf.type))




More information about the mesa-commit mailing list