diff --git a/src/amd/vulkan/radv_queue.c b/src/amd/vulkan/radv_queue.c index 4523addfc28..7b62e4d58b5 100644 --- a/src/amd/vulkan/radv_queue.c +++ b/src/amd/vulkan/radv_queue.c @@ -31,13 +31,6 @@ #include "vk_sync.h" #include "vk_semaphore.h" -/* The number of IBs per submit isn't infinite, it depends on the IP type - * (ie. some initial setup needed for a submit) and the number of IBs (4 DW). - * This limit is arbitrary but should be safe for now. Ideally, we should get - * this limit from the KMD. - */ -#define RADV_MAX_IBS_PER_SUBMIT 192 - enum radeon_ctx_priority radv_get_queue_global_priority(const VkDeviceQueueGlobalPriorityCreateInfoKHR *pObj) { @@ -1588,8 +1581,8 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi const unsigned num_perfctr_cs = use_perf_counters ? 2 : 0; const unsigned num_gang_wait_cs = use_ace ? 4 : 0; - const unsigned max_cs_submission = queue->device->trace_bo ? 1 : RADV_MAX_IBS_PER_SUBMIT; 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; diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index 3fed5993118..d74f0dabcc3 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -45,8 +45,8 @@ #define GFX6_MAX_CS_SIZE 0xffff8 /* in dwords */ -/* TODO: change this to a suitable number. */ -#define RADV_MAX_IBS_PER_SUBMIT 256 +/* Maximum allowed total number of submitted IBs. */ +#define RADV_MAX_IBS_PER_SUBMIT 192 enum { VIRTUAL_BUFFER_HASH_TABLE_SIZE = 1024 };