From 15f2c9c55318ec28d26f5812fe37f658e38d515d Mon Sep 17 00:00:00 2001 From: Friedrich Vock Date: Sat, 1 Jun 2024 11:57:04 +0200 Subject: [PATCH] aco: Limit rt stages to 128 vgprs Totals from 35472 (7.40% of 479373) affected shaders: MaxWaves: 206239 -> 283776 (+37.60%) Instrs: 193922210 -> 202721106 (+4.54%) CodeSize: 1056819972 -> 1110833680 (+5.11%); split: -0.00%, +5.11% VGPRs: 6026704 -> 4540416 (-24.66%) SpillSGPRs: 23742 -> 25754 (+8.47%) SpillVGPRs: 118897 -> 2295118 (+1830.34%) Scratch: 7201792 -> 152752128 (+2021.03%) Latency: 2713432565 -> 3194796286 (+17.74%); split: -0.20%, +17.94% InvThroughput: 1052131232 -> 935049835 (-11.13%); split: -16.59%, +5.46% VClause: 6972784 -> 8716721 (+25.01%); split: -0.02%, +25.03% SClause: 4879313 -> 4852452 (-0.55%); split: -0.88%, +0.33% Copies: 32782141 -> 35223995 (+7.45%) Branches: 11075847 -> 11094087 (+0.16%); split: -0.00%, +0.17% VALU: 118525960 -> 120929058 (+2.03%) SALU: 33924572 -> 33973293 (+0.14%); split: -0.03%, +0.17% VMEM: 12419116 -> 17104582 (+37.73%) Part-of: --- src/amd/compiler/aco_ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index 05f0745e6a7..b51e30cd2ee 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -94,7 +94,7 @@ init_program(Program* program, Stage stage, const struct aco_shader_info* info, /* apparently gfx702 also has 16-bank LDS but I can't find a family for that */ program->dev.has_16bank_lds = family == CHIP_KABINI || family == CHIP_STONEY; - program->dev.vgpr_limit = 256; + program->dev.vgpr_limit = stage == raytracing_cs ? 128 : 256; program->dev.physical_vgprs = 256; program->dev.vgpr_alloc_granule = 4;