radv: Remove dead code.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 23 May 2020 00:32:09 +0000 (02:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 25 May 2020 11:12:07 +0000 (11:12 +0000)
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 <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>

src/amd/vulkan/radv_cmd_buffer.c

index 1c2784bdeeac190e7e7c8426157b95fd3f03ea3c..089992dc51333d8dbede7d2137d1b6f2a801dff6 100644 (file)
@@ -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);