From: Daniel Schürmann Date: Wed, 6 Nov 2019 11:40:14 +0000 (+0100) Subject: aco: move buffer_store data to VGPR if needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bde9c1e3a12b35bc5a7f45b71c3e701112d262c1;p=mesa.git aco: move buffer_store data to VGPR if needed Reviewed-by: Rhys Perry --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 2cffa19b29b..c3738c6b8ff 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4456,7 +4456,7 @@ void visit_store_ssbo(isel_context *ctx, nir_intrinsic_instr *instr) Temp elem = emit_extract_vector(ctx, data, start + i, RegClass(data.type(), elem_size_bytes / 4)); vec->operands[i] = Operand(smem_nonfs ? bld.as_uniform(elem) : elem); } - write_data = bld.tmp(smem_nonfs ? RegType::sgpr : data.type(), count * elem_size_bytes / 4); + write_data = bld.tmp(!smem ? RegType::vgpr : smem_nonfs ? RegType::sgpr : data.type(), count * elem_size_bytes / 4); vec->definitions[0] = Definition(write_data); ctx->block->instructions.emplace_back(std::move(vec)); } else if (!smem && data.type() != RegType::vgpr) {