libs/vkd3d: Destroy Vulkan render passes and framebuffers on command allocator reset.

This commit is contained in:
Henri Verbeet 2016-10-10 17:11:58 +02:00
parent 3ba5fd949b
commit d24982c5f1
1 changed files with 13 additions and 0 deletions

View File

@ -747,6 +747,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_Reset(ID3D12CommandAllo
const struct vkd3d_vk_device_procs *vk_procs;
struct d3d12_command_list *list;
struct d3d12_device *device;
unsigned int i;
VkResult vr;
TRACE("iface %p.\n", iface);
@ -765,6 +766,18 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_Reset(ID3D12CommandAllo
device = allocator->device;
vk_procs = &device->vk_procs;
for (i = 0; i < allocator->framebuffer_count; ++i)
{
VK_CALL(vkDestroyFramebuffer(device->vk_device, allocator->framebuffers[i], NULL));
}
allocator->framebuffer_count = 0;
for (i = 0; i < allocator->pass_count; ++i)
{
VK_CALL(vkDestroyRenderPass(device->vk_device, allocator->passes[i], NULL));
}
allocator->pass_count = 0;
if ((vr = VK_CALL(vkResetCommandPool(device->vk_device, allocator->vk_command_pool,
VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT))))
{