From bdc4e3a5a6a3f8445ece1cfe89c245f7b9799641 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 21 Apr 2023 11:51:29 +0200 Subject: [PATCH] radv: do not overallocate the CS array during submissions Preambles/postambles are no longer added to the CS array. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_queue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_queue.c b/src/amd/vulkan/radv_queue.c index 4ec2e63..854321e 100644 --- a/src/amd/vulkan/radv_queue.c +++ b/src/amd/vulkan/radv_queue.c @@ -1582,12 +1582,9 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi return result; } - const unsigned num_perfctr_cs = use_perf_counters ? 2 : 0; - const unsigned num_gang_wait_cs = use_ace ? 4 : 0; const unsigned cmd_buffer_count = submission->command_buffer_count; const unsigned max_cs_submission = queue->device->trace_bo ? 1 : cmd_buffer_count; - const unsigned cs_array_size = (use_ace ? 2 : 1) * MIN2(max_cs_submission, cmd_buffer_count) + - num_perfctr_cs + num_gang_wait_cs; + const unsigned cs_array_size = (use_ace ? 2 : 1) * MIN2(max_cs_submission, cmd_buffer_count); struct radeon_cmdbuf **cs_array = malloc(sizeof(struct radeon_cmdbuf *) * cs_array_size); if (!cs_array) -- 2.7.4