Module: Mesa
Branch: main
Commit: 01ec899083a6d58d139492e48f48fe55fb31aa65
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=01ec899083a6d58d139492e48f48fe55fb31aa65

Author: Samuel Pitoiset <[email protected]>
Date:   Wed Feb 23 19:46:15 2022 +0100

radv: remove unnecessary NULL check in TrimCommandPool()

This function seems rarely used or maybe never but I noticed this.

>From the Vulkan spec:

    "VUID-vkTrimCommandPool-commandPool-parameter
     commandPool must be a valid VkCommandPool handle".

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>

---

 src/amd/vulkan/radv_cmd_buffer.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index fbc0fc320b5..b7f9a00d667 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5811,9 +5811,6 @@ radv_TrimCommandPool(VkDevice device, VkCommandPool 
commandPool, VkCommandPoolTr
 {
    RADV_FROM_HANDLE(radv_cmd_pool, pool, commandPool);
 
-   if (!pool)
-      return;
-
    list_for_each_entry_safe(struct radv_cmd_buffer, cmd_buffer, 
&pool->free_cmd_buffers, pool_link)
    {
       radv_destroy_cmd_buffer(cmd_buffer);

Reply via email to