mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
aco/isel: emit exec copy for ballot(true)
Once copy propagated in the optimizer, this will allow using nir_opt_uniform_subgroup without too many regressions. Foz-DB Navi48: Totals from 405 (0.41% of 97637) affected shaders: Instrs: 3796716 -> 3796894 (+0.00%); split: -0.00%, +0.00% CodeSize: 20116136 -> 20116652 (+0.00%); split: -0.00%, +0.00% Latency: 18326661 -> 18327114 (+0.00%); split: -0.00%, +0.00% InvThroughput: 3353206 -> 3353268 (+0.00%); split: -0.00%, +0.00% Copies: 292307 -> 293830 (+0.52%) SALU: 507523 -> 507738 (+0.04%) Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
This commit is contained in:
parent
72e3071751
commit
911e1ce168
1 changed files with 2 additions and 0 deletions
|
|
@ -4210,6 +4210,8 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
|
||||||
Definition def = dst.size() == bld.lm.size() ? Definition(dst) : bld.def(bld.lm);
|
Definition def = dst.size() == bld.lm.size() ? Definition(dst) : bld.def(bld.lm);
|
||||||
if (instr->intrinsic == nir_intrinsic_ballot_relaxed)
|
if (instr->intrinsic == nir_intrinsic_ballot_relaxed)
|
||||||
src = bld.copy(def, src);
|
src = bld.copy(def, src);
|
||||||
|
else if (nir_src_is_const(instr->src[0]) && nir_src_as_uint(instr->src[0]))
|
||||||
|
src = bld.copy(def, Operand(exec, bld.lm));
|
||||||
else
|
else
|
||||||
src = bld.sop2(Builder::s_and, def, bld.def(s1, scc), src, Operand(exec, bld.lm));
|
src = bld.sop2(Builder::s_and, def, bld.def(s1, scc), src, Operand(exec, bld.lm));
|
||||||
if (dst.size() != bld.lm.size()) {
|
if (dst.size() != bld.lm.size()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue