radv/llvm: Fix reporting LDS stats of tess control shaders.

The LLVM backend forgot to set config->lds_size, which is used
for reporting LDS stats.

Fixes: cf89bdb9ba "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9098>
(cherry picked from commit 72c348f85c)
This commit is contained in:
Timur Kristóf 2021-02-17 13:55:04 +01:00 committed by Dylan Baker
parent 7047adf43b
commit dde6de9cbf
2 changed files with 5 additions and 1 deletions

View file

@ -67,7 +67,7 @@
"description": "radv/llvm: Fix reporting LDS stats of tess control shaders.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "cf89bdb9ba9c7a7ba39d142ee3c83e0379c2092a"
},

View file

@ -1199,6 +1199,10 @@ radv_shader_variant_create(struct radv_device *device,
unsigned alloc_granularity = device->physical_device->rad_info.chip_class >= GFX7 ? 512 : 256;
config.lds_size = align(rtld_binary.lds_size, alloc_granularity) / alloc_granularity;
}
if (!config.lds_size && binary->stage == MESA_SHADER_TESS_CTRL) {
/* This is used for reporting LDS statistics */
config.lds_size = binary->info.tcs.num_lds_blocks;
}
variant->code_size = rtld_binary.rx_size;
variant->exec_size = rtld_binary.exec_size;