st/glsl_to_tgsi: ir_load_ubo always has a second index
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 23 Aug 2017 15:09:09 +0000 (17:09 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 4 Sep 2017 11:43:49 +0000 (13:43 +0200)
Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 95c2f85b4ccfae902051e32d7bcd103cfc217146..58cae30166039c51c22fb773c2afc2b4fad40b53 100644 (file)
@@ -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))