mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
aco: consider non-hazard writes in handle_raw_hazard_internal
I think this helps GFX6 in particular because code like this is common: s_add_i32 s4, 0x60, s3 s_mov_b32 s5, 0 s_load_dwordx4 s[4:7], s[4:5], 0x0 s_buffer_load_dword s4, s[4:7], 0xcc pipeline-db (Tahiti): Totals from affected shaders: SGPRS: 1923878 -> 1923878 (0.00 %) VGPRS: 1528964 -> 1528964 (0.00 %) Spilled SGPRs: 476 -> 476 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 88723604 -> 88528880 (-0.22 %) bytes LDS: 241 -> 241 (0.00 %) blocks Max Waves: 145402 -> 145402 (0.00 %) pipeline-db (Polaris): Totals from affected shaders: SGPRS: 428128 -> 428128 (0.00 %) VGPRS: 353092 -> 353092 (0.00 %) Spilled SGPRs: 119251 -> 119251 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 57580468 -> 57563964 (-0.03 %) bytes LDS: 0 -> 0 (0.00 %) blocks Max Waves: 11631 -> 11631 (0.00 %) piepline-db (Vega): Totals from affected shaders: SGPRS: 425016 -> 425016 (0.00 %) VGPRS: 349588 -> 349588 (0.00 %) Spilled SGPRs: 117835 -> 117835 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 54890792 -> 54874432 (-0.03 %) bytes LDS: 0 -> 0 (0.00 %) blocks Max Waves: 54 -> 54 (0.00 %) 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/4004>
This commit is contained in:
parent
38743577f8
commit
47b7f104a0
1 changed files with 2 additions and 1 deletions
|
|
@ -218,9 +218,10 @@ int handle_raw_hazard_internal(Program *program, Block *block,
|
|||
if (is_hazard)
|
||||
return nops_needed;
|
||||
|
||||
mask &= ~writemask;
|
||||
nops_needed -= get_wait_states(pred);
|
||||
|
||||
if (nops_needed <= 0)
|
||||
if (nops_needed <= 0 || mask == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue