From: Bas Nieuwenhuizen Date: Sat, 23 May 2020 00:32:09 +0000 (+0200) Subject: radv: Remove dead code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd0c5b64cccd833e0e93e29d263a6cdd86965d3c;p=mesa.git radv: Remove dead code. pool is always non-NULL, and is also accessed before this check in the function, so remove the pool = NULL case. Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 1c2784bdeea..089992dc513 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -284,17 +284,8 @@ static VkResult radv_create_cmd_buffer( cmd_buffer->pool = pool; cmd_buffer->level = level; - if (pool) { - list_addtail(&cmd_buffer->pool_link, &pool->cmd_buffers); - cmd_buffer->queue_family_index = pool->queue_family_index; - - } else { - /* Init the pool_link so we can safely call list_del when we destroy - * the command buffer - */ - list_inithead(&cmd_buffer->pool_link); - cmd_buffer->queue_family_index = RADV_QUEUE_GENERAL; - } + list_addtail(&cmd_buffer->pool_link, &pool->cmd_buffers); + cmd_buffer->queue_family_index = pool->queue_family_index; ring = radv_queue_family_to_ring(cmd_buffer->queue_family_index);