mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
aco: preserve bitsets after a lane mask is written
fossil-db (navi31):
Totals from 4840 (6.10% of 79395) affected shaders:
Instrs: 13733449 -> 13761177 (+0.20%); split: -0.00%, +0.21%
CodeSize: 71997868 -> 72102520 (+0.15%); split: -0.00%, +0.15%
Latency: 128385177 -> 128408780 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 21105847 -> 21109475 (+0.02%); split: -0.00%, +0.02%
VALU: 7741209 -> 7741210 (+0.00%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit 11262a01ce)
This commit is contained in:
parent
121e202516
commit
be09c4aeb3
3 changed files with 8 additions and 3 deletions
|
|
@ -1054,7 +1054,7 @@
|
|||
"description": "aco: preserve bitsets after a lane mask is written",
|
||||
"nominated": false,
|
||||
"nomination_type": 3,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1481,8 +1481,9 @@ handle_instruction_gfx11(State& state, NOP_ctx_gfx11& ctx, aco_ptr<Instruction>&
|
|||
|
||||
if (state.program->wave_size == 64 && instr->isSALU() &&
|
||||
check_written_regs(instr, ctx.sgpr_read_by_valu_as_lanemask)) {
|
||||
ctx.sgpr_read_by_valu_as_lanemask_then_wr_by_salu = ctx.sgpr_read_by_valu_as_lanemask;
|
||||
ctx.sgpr_read_by_valu_as_lanemask.reset();
|
||||
unsigned reg = instr->definitions[0].physReg().reg();
|
||||
for (unsigned i = 0; i < instr->definitions[0].size(); i++)
|
||||
ctx.sgpr_read_by_valu_as_lanemask_then_wr_by_salu[reg + i] = 1;
|
||||
}
|
||||
|
||||
if (instr->isVALU()) {
|
||||
|
|
|
|||
|
|
@ -1495,6 +1495,8 @@ BEGIN_TEST(insert_nops.setpc_gfx11)
|
|||
//! v1: %0:v[0] = v_cndmask_b32 0, 0, %0:vcc
|
||||
//! s1: %0:vcc_hi = s_mov_b32 0
|
||||
//! s_waitcnt_depctr va_vdst(0) sa_sdst(0)
|
||||
//! v1: %0:v[0] = v_xor3_b32 %0:v[0], %0:s[0], %0:s[0]
|
||||
//! s_waitcnt_depctr va_vdst(0)
|
||||
//! s_setpc_b64 0
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(4));
|
||||
bld.vop2(aco_opcode::v_cndmask_b32, Definition(PhysReg(256), v1), Operand::zero(),
|
||||
|
|
@ -1517,6 +1519,8 @@ BEGIN_TEST(insert_nops.setpc_gfx11)
|
|||
//! v1: %0:v[0] = v_cndmask_b32 0, 0, %0:vcc
|
||||
//! s2: %0:vcc = s_mov_b64 0
|
||||
//! s_waitcnt_depctr va_vdst(0) sa_sdst(0)
|
||||
//! v1: %0:v[0] = v_xor3_b32 %0:v[0], %0:s[0], %0:s[0]
|
||||
//! s_waitcnt_depctr va_vdst(0)
|
||||
//! s_setpc_b64 0
|
||||
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(5));
|
||||
bld.vop2(aco_opcode::v_cndmask_b32, Definition(PhysReg(256), v1), Operand::zero(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue