Module: Mesa Branch: main Commit: 3f5d31ae69d8639b5f7b67524da389d23c01969c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f5d31ae69d8639b5f7b67524da389d23c01969c
Author: Samuel Pitoiset <[email protected]> Date: Thu Aug 25 17:14:23 2022 +0200 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 <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18255> --- src/amd/vulkan/radv_shader.c | 1 + src/amd/vulkan/radv_shader.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index e6b783e31a1..87f8ef941e4 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -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) { diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 3f383edfb66..a559581c4c4 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -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;
