mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
aco: use p_as_uniform for get_sampler_desc and convert_pointer_to_64_bit
Since value-numbering no longer works across loops, we no longer need to use v_readfirstlane_b32. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9288>
This commit is contained in:
parent
5f1b354472
commit
c3af0c2079
1 changed files with 4 additions and 8 deletions
|
|
@ -736,10 +736,8 @@ Temp convert_pointer_to_64_bit(isel_context *ctx, Temp ptr, bool non_uniform=fal
|
||||||
if (ptr.size() == 2)
|
if (ptr.size() == 2)
|
||||||
return ptr;
|
return ptr;
|
||||||
Builder bld(ctx->program, ctx->block);
|
Builder bld(ctx->program, ctx->block);
|
||||||
if (ptr.type() == RegType::vgpr && !non_uniform) {
|
if (ptr.type() == RegType::vgpr && !non_uniform)
|
||||||
ptr = bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), ptr);
|
ptr = bld.as_uniform(ptr);
|
||||||
ptr = emit_wqm(bld, ptr);
|
|
||||||
}
|
|
||||||
return bld.pseudo(aco_opcode::p_create_vector, bld.def(RegClass(ptr.type(), 2)),
|
return bld.pseudo(aco_opcode::p_create_vector, bld.def(RegClass(ptr.type(), 2)),
|
||||||
ptr, Operand((unsigned)ctx->options->address32_hi));
|
ptr, Operand((unsigned)ctx->options->address32_hi));
|
||||||
}
|
}
|
||||||
|
|
@ -5698,10 +5696,8 @@ Temp get_sampler_desc(isel_context *ctx, nir_deref_instr *deref_instr,
|
||||||
constant_index += array_size * const_value->u32;
|
constant_index += array_size * const_value->u32;
|
||||||
} else {
|
} else {
|
||||||
Temp indirect = 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) {
|
if (indirect.type() == RegType::vgpr)
|
||||||
indirect = bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), indirect);
|
indirect = bld.as_uniform(indirect);
|
||||||
indirect = emit_wqm(bld, 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