summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Kristóf <timur.kristof@gmail.com>2021-02-17 13:26:01 +0100
committerDylan Baker <dylan.c.baker@intel.com>2021-02-18 14:42:17 -0800
commit202ff54b4d6ec1dbc9d9b965d86e7ddd49d2d2b0 (patch)
treec99bc4c283047c2e9d9b0fa2ec3f1951ebd9b5aa
parentc6f1d33ae03b98cf96548aa0a2854c9ec14a76eb (diff)
aco: Fix LDS statistics of tess control shaders.
The calculate_tess_lds_size function already returns the size in blocks of the encoding granule, but we forgot to adjust config->lds_size. This variable is not used to actually set the LDS size used for TCS, but by ACO to make scheduling decisions. Fossil DB stats on Sienna Cichlid: Please note that the +3729.43% is NOT a regression. The real LDS size used didn't change, it was just reported incorrectly. Totals from 1342 (0.96% of 139391) affected shaders: VGPRs: 60880 -> 80240 (+31.80%); split: -0.05%, +31.85% CodeSize: 3378456 -> 3381224 (+0.08%); split: -0.23%, +0.31% LDS: 687104 -> 26312192 (+3729.43%) MaxWaves: 29794 -> 23962 (-19.57%) Instrs: 644194 -> 644610 (+0.06%); split: -0.32%, +0.39% Cycles: 2675068 -> 2676804 (+0.06%); split: -0.31%, +0.38% VMEM: 428840 -> 517418 (+20.66%); split: +22.53%, -1.88% SMEM: 91831 -> 88587 (-3.53%); split: +5.70%, -9.23% VClause: 22740 -> 19384 (-14.76%); split: -16.18%, +1.42% SClause: 19116 -> 18373 (-3.89%); split: -4.34%, +0.46% Copies: 66662 -> 63448 (-4.82%); split: -5.55%, +0.73% Fixes: cf89bdb9ba9c7a7ba39d142ee3c83e0379c2092a "radv: align the LDS size in calculate_tess_lds_size()" Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9098> (cherry picked from commit 48f349971fdb90e5c782daed3a5f971281cc57b3)
-rw-r--r--.pick_status.json2
-rw-r--r--src/amd/compiler/aco_instruction_selection_setup.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json
index dc84fa06b2a..cc3b37c2038 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -76,7 +76,7 @@
"description": "aco: Fix LDS statistics of tess control shaders.",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "cf89bdb9ba9c7a7ba39d142ee3c83e0379c2092a"
},
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index bb7dc657ab2..e4cdcaa80fe 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -490,8 +490,7 @@ setup_tcs_info(isel_context *ctx, nir_shader *nir, nir_shader *vs)
ctx->args->shader_info->tcs.num_patches = ctx->tcs_num_patches;
ctx->args->shader_info->tcs.num_lds_blocks = lds_size;
- ctx->program->config->lds_size = (lds_size + ctx->program->lds_alloc_granule - 1) /
- ctx->program->lds_alloc_granule;
+ ctx->program->config->lds_size = lds_size; /* Already in blocks of the encoding granule */
}
void