diff options
author | Rhys Perry <[email protected]> | 2019-09-21 11:48:27 +0100 |
---|---|---|
committer | Rhys Perry <[email protected]> | 2019-10-11 14:26:58 +0000 |
commit | 5526a557eeddaec7c92101ffd0e39761dd1e68f1 (patch) | |
tree | 40b885c63656d7abff4e0488ae66bfe76442c1d2 /src/amd/compiler | |
parent | 45d6c69b9993b8e0f1d0ca79f8ff6ec9e02b1b4e (diff) |
aco: readfirstlane vgpr pointers in convert_pointer_to_64_bit()
This can happen when bcsel is used between the results of two
vulkan_resource_index. It's also probably needed for non-uniform
descriptor indexing
Fixes dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.compute.reads_opselect_two_buffers
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd/compiler')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 6d31cb7cf6b..c5f840361cc 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -369,6 +369,8 @@ Temp convert_pointer_to_64_bit(isel_context *ctx, Temp ptr) if (ptr.size() == 2) return ptr; Builder bld(ctx->program, ctx->block); + if (ptr.type() == RegType::vgpr) + ptr = bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), ptr); return bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), ptr, Operand((unsigned)ctx->options->address32_hi)); } |