summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-10-06 17:14:46 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-10-11 23:16:56 +0200
commit541208cf138deb59204b28c56b3d37fec399778b (patch)
tree16718c3a4826a5fef737c3580bef6cd7088ca095
parent2991c0d7df898c6c3b5f5fdb66be07e63f8313e8 (diff)
st/glsl_to_tgsi: fix indirect access to 64-bit integer
Make sure we actually allocate two adjacent TGSI temporaries. The current code fails e.g. when an arithmetic operation has two operands with indirect accesses. I will send out a new piglit test (arb_gpu_shader_int64/execution/indirect-array-two-accesses.shader_test) Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 1cfc9d963dc..6a66317a219 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1269,7 +1269,7 @@ glsl_to_tgsi_visitor::reladdr_to_temp(ir_instruction *ir,
if (reg->reladdr2) emit_arl(ir, address_reg2, *reg->reladdr2);
if (*num_reladdr != 1) {
- st_src_reg temp = get_temp(reg->type == GLSL_TYPE_DOUBLE ? glsl_type::dvec4_type : glsl_type::vec4_type);
+ st_src_reg temp = get_temp(glsl_type::get_instance(reg->type, 4, 1));
emit_asm(ir, TGSI_OPCODE_MOV, st_dst_reg(temp), *reg);
*reg = temp;