aco: only break SMEM clauses if XNACK is enabled (mostly APUs)
According to LLVM, it seems only required for APUs like RAVEN, but we still ensure that SMEM stores are in their own clause. pipeline-db (VEGA10): Totals from affected shaders: SGPRS: 1775364 -> 1775364 (0.00 %) VGPRS: 1287176 -> 1287176 (0.00 %) Spilled SGPRs: 725 -> 725 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 65386620 -> 65107460 (-0.43 %) bytes Max Waves: 287099 -> 287099 (0.00 %) pipeline-db (POLARIS10): Totals from affected shaders: SGPRS: 1797743 -> 1797743 (0.00 %) VGPRS: 1271108 -> 1271108 (0.00 %) Spilled SGPRs: 730 -> 730 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 64046244 -> 63782324 (-0.41 %) bytes Max Waves: 254875 -> 254875 (0.00 %) This only affects GFX6-GFX9 chips because the compiler uses a different pass for GFX10. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4349> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4349>
This commit is contained in:
committed by
Marge Bot
parent
68f325b256
commit
2f424c83e0
@@ -1150,6 +1150,24 @@ setup_nir(isel_context *ctx, nir_shader *nir)
|
||||
nir_index_ssa_defs(func);
|
||||
}
|
||||
|
||||
void
|
||||
setup_xnack(Program *program)
|
||||
{
|
||||
switch (program->family) {
|
||||
/* GFX8 APUs */
|
||||
case CHIP_CARRIZO:
|
||||
case CHIP_STONEY:
|
||||
/* GFX9 APUS */
|
||||
case CHIP_RAVEN:
|
||||
case CHIP_RAVEN2:
|
||||
case CHIP_RENOIR:
|
||||
program->xnack_enabled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
isel_context
|
||||
setup_isel_context(Program* program,
|
||||
unsigned shader_count,
|
||||
@@ -1308,6 +1326,8 @@ setup_isel_context(Program* program,
|
||||
ctx.block->loop_nest_depth = 0;
|
||||
ctx.block->kind = block_kind_top_level;
|
||||
|
||||
setup_xnack(program);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user