radv: keep track of the code size for VS prologs and PS epilogs

This will be used to prefetch PS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18255>
This commit is contained in:
Samuel Pitoiset 2022-08-25 17:14:23 +02:00 committed by Marge Bot
parent 8c4e33cdab
commit 3f5d31ae69
2 changed files with 2 additions and 0 deletions

View file

@ -2348,6 +2348,7 @@ upload_shader_part(struct radv_device *device, struct radv_shader_part_binary *b
return NULL;
shader_part->ref_count = 1;
shader_part->code_size = code_size;
shader_part->alloc = radv_alloc_shader_memory(device, code_size, NULL);
if (!shader_part->alloc) {

View file

@ -505,6 +505,7 @@ struct radv_shader_part {
struct radeon_winsys_bo *bo;
union radv_shader_arena_block *alloc;
uint32_t code_size;
uint32_t rsrc1;
uint8_t num_preserved_sgprs;
bool nontrivial_divisors;