winevulkan: Implement vkCmdExecuteCommands.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com> Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b22b6aa96
commit
42b01b0133
|
@ -112,6 +112,7 @@ FUNCTION_OVERRIDES = {
|
||||||
|
|
||||||
# Device functions
|
# Device functions
|
||||||
"vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
"vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
||||||
|
"vkCmdExecuteCommands" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
||||||
"vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
"vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
||||||
"vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
"vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False},
|
||||||
"vkGetDeviceProcAddr" : {"dispatch" : True, "driver" : True, "thunk" : False},
|
"vkGetDeviceProcAddr" : {"dispatch" : True, "driver" : True, "thunk" : False},
|
||||||
|
|
|
@ -435,6 +435,36 @@ VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device,
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 = heap_alloc(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);
|
||||||
|
|
||||||
|
heap_free(tmp_buffers);
|
||||||
|
}
|
||||||
|
|
||||||
VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
|
VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
|
||||||
const VkDeviceCreateInfo *create_info,
|
const VkDeviceCreateInfo *create_info,
|
||||||
const VkAllocationCallbacks *allocator, VkDevice *device)
|
const VkAllocationCallbacks *allocator, VkDevice *device)
|
||||||
|
|
|
@ -715,11 +715,6 @@ static void WINAPI wine_vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
|
||||||
FIXME("stub: %p\n", commandBuffer);
|
FIXME("stub: %p\n", commandBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
|
|
||||||
{
|
|
||||||
FIXME("stub: %p, %u, %p\n", commandBuffer, commandBufferCount, pCommandBuffers);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void WINAPI wine_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
|
static void WINAPI wine_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
|
||||||
{
|
{
|
||||||
FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(size), data);
|
FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(size), data);
|
||||||
|
|
|
@ -17,6 +17,7 @@ BOOL wine_vk_device_extension_supported(const char *name) DECLSPEC_HIDDEN;
|
||||||
/* Functions for which we have custom implementations outside of the thunks. */
|
/* Functions for which we have custom implementations outside of the thunks. */
|
||||||
VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) DECLSPEC_HIDDEN;
|
VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) DECLSPEC_HIDDEN;
|
||||||
VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
|
VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
|
||||||
|
void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
|
||||||
VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) DECLSPEC_HIDDEN;
|
VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) DECLSPEC_HIDDEN;
|
||||||
VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) DECLSPEC_HIDDEN;
|
VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) DECLSPEC_HIDDEN;
|
||||||
VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN;
|
VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN;
|
||||||
|
|
Loading…
Reference in New Issue