[PATCH v3 2/3] winevulkan: Use automatically-generated thunk for vkCmdExecuteCommands.

Derek Lesho dlesho at codeweavers.com
Thu May 13 11:18:45 CDT 2021


Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
 dlls/winevulkan/make_vulkan |  1 -
 dlls/winevulkan/vulkan.c    | 30 ------------------------------
 2 files changed, 31 deletions(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 7abe2740a6d..3f2f4a20748 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -185,7 +185,6 @@ FUNCTION_OVERRIDES = {
 
     # Device functions
     "vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE},
-    "vkCmdExecuteCommands" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE},
     "vkCreateCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
     "vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
     "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE},
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index 69440c7a374..8f6c0ba9a2c 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -684,36 +684,6 @@ VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device,
     return res;
 }
 
-void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer buffer, uint32_t count,
-        const VkCommandBuffer *buffers)
-{
-    VkCommandBuffer *tmp_buffers;
-    unsigned int i;
-
-    TRACE("%p %u %p\n", buffer, count, buffers);
-
-    if (!buffers || !count)
-        return;
-
-    /* Unfortunately we need a temporary buffer as our command buffers are wrapped.
-     * This call is called often and if a performance concern, we may want to use
-     * alloca as we shouldn't need much memory and it needs to be cleaned up after
-     * the call anyway.
-     */
-    if (!(tmp_buffers = malloc(count * sizeof(*tmp_buffers))))
-    {
-        ERR("Failed to allocate memory for temporary command buffers\n");
-        return;
-    }
-
-    for (i = 0; i < count; i++)
-        tmp_buffers[i] = buffers[i]->command_buffer;
-
-    buffer->device->funcs.p_vkCmdExecuteCommands(buffer->command_buffer, count, tmp_buffers);
-
-    free(tmp_buffers);
-}
-
 VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
         const VkDeviceCreateInfo *create_info,
         const VkAllocationCallbacks *allocator, VkDevice *device)
-- 
2.31.1




More information about the wine-devel mailing list