Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/vkd3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2019-10-01 17:01:55 +0300
committerAlexandre Julliard <julliard@winehq.org>2019-10-01 20:16:16 +0300
commita0ebcce39863a9d72930d0ecffa783782375c8a7 (patch)
tree281c6621e75ceb5ac96972ecea0f089d42b809af
parent3c86b2341caabd6302b83efd0562910bd5b85d56 (diff)
vkd3d: Do not use RESET_COMMAND_BUFFERS_BIT.
By setting this flag, command pools cannot efficiently pool allocations. This flag should be set to 0 so only the VkCommandPool may be reset. This matches D3D12 API. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
-rw-r--r--libs/vkd3d/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 2d6d02de..d420863b 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -1723,7 +1723,10 @@ static HRESULT d3d12_command_allocator_init(struct d3d12_command_allocator *allo
command_pool_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
command_pool_info.pNext = NULL;
- command_pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
+ /* Do not use RESET_COMMAND_BUFFER_BIT. This allows the CommandPool to be a D3D12-style command pool.
+ * Memory is owned by the pool and CommandBuffers become lightweight handles,
+ * assuming a half-decent driver implementation. */
+ command_pool_info.flags = 0;
command_pool_info.queueFamilyIndex = queue->vk_family_index;
if ((vr = VK_CALL(vkCreateCommandPool(device->vk_device, &command_pool_info, NULL,