mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
aco: don't use p_as_uniform for vgpr sampler/image indices
p_as_uniform can get CSE'd, which can be incorrect and break some dEQP-VK.descriptor_indexing.* tests. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
This commit is contained in:
parent
0c3fe323b6
commit
f13ad839f1
1 changed files with 3 additions and 1 deletions
|
|
@ -3439,7 +3439,9 @@ Temp get_sampler_desc(isel_context *ctx, nir_deref_instr *deref_instr,
|
||||||
if (const_value) {
|
if (const_value) {
|
||||||
constant_index += array_size * const_value->u32;
|
constant_index += array_size * const_value->u32;
|
||||||
} else {
|
} else {
|
||||||
Temp indirect = bld.as_uniform(get_ssa_temp(ctx, deref_instr->arr.index.ssa));
|
Temp indirect = get_ssa_temp(ctx, deref_instr->arr.index.ssa);
|
||||||
|
if (indirect.type() == RegType::vgpr)
|
||||||
|
indirect = bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), indirect);
|
||||||
|
|
||||||
if (array_size != 1)
|
if (array_size != 1)
|
||||||
indirect = bld.sop2(aco_opcode::s_mul_i32, bld.def(s1), Operand(array_size), indirect);
|
indirect = bld.sop2(aco_opcode::s_mul_i32, bld.def(s1), Operand(array_size), indirect);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue