aco: fix get_ssbo_size with a vgpr resource
The result of load_vulkan_descriptor is passed directly to get_ssbo_size.
This caused convert_pointer_to_64_bit() to skip creating a
v_readfirstlane_b32 if it was necessary.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 05b6612b4e
('radv: do not lower UBO/SSBO access to offsets')
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3628
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7095>
This commit is contained in:
parent
a7114f3f46
commit
c122315702
|
@ -6246,7 +6246,10 @@ void visit_atomic_ssbo(isel_context *ctx, nir_intrinsic_instr *instr)
|
|||
|
||||
void visit_get_ssbo_size(isel_context *ctx, nir_intrinsic_instr *instr) {
|
||||
|
||||
Temp index = convert_pointer_to_64_bit(ctx, get_ssa_temp(ctx, instr->src[0].ssa));
|
||||
Temp rsrc = get_ssa_temp(ctx, instr->src[0].ssa);
|
||||
rsrc = emit_extract_vector(ctx, rsrc, 0, RegClass(rsrc.type(), 1));
|
||||
Temp index = convert_pointer_to_64_bit(ctx, rsrc);
|
||||
|
||||
Builder bld(ctx->program, ctx->block);
|
||||
Temp desc = bld.smem(aco_opcode::s_load_dwordx4, bld.def(s4), index, Operand(0u));
|
||||
get_buffer_size(ctx, desc, get_ssa_temp(ctx, &instr->dest.ssa), false);
|
||||
|
|
Loading…
Reference in New Issue