mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-19 14:55:38 +00:00
Vulkan/Context: Add pipeline destruction deferring
This commit is contained in:
parent
f63192c6b2
commit
666d7fbb99
|
@ -997,6 +997,12 @@ void Context::DeferImageViewDestruction(VkImageView object)
|
||||||
resources.cleanup_resources.push_back([this, object]() { vkDestroyImageView(m_device, object, nullptr); });
|
resources.cleanup_resources.push_back([this, object]() { vkDestroyImageView(m_device, object, nullptr); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Context::DeferPipelineDestruction(VkPipeline pipeline)
|
||||||
|
{
|
||||||
|
FrameResources& resources = m_frame_resources[m_current_frame];
|
||||||
|
resources.cleanup_resources.push_back([this, pipeline]() { vkDestroyPipeline(m_device, pipeline, nullptr); });
|
||||||
|
}
|
||||||
|
|
||||||
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(VkDebugReportFlagsEXT flags,
|
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(VkDebugReportFlagsEXT flags,
|
||||||
VkDebugReportObjectTypeEXT objectType, uint64_t object,
|
VkDebugReportObjectTypeEXT objectType, uint64_t object,
|
||||||
size_t location, int32_t messageCode,
|
size_t location, int32_t messageCode,
|
||||||
|
|
|
@ -163,6 +163,7 @@ public:
|
||||||
void DeferFramebufferDestruction(VkFramebuffer object);
|
void DeferFramebufferDestruction(VkFramebuffer object);
|
||||||
void DeferImageDestruction(VkImage object);
|
void DeferImageDestruction(VkImage object);
|
||||||
void DeferImageViewDestruction(VkImageView object);
|
void DeferImageViewDestruction(VkImageView object);
|
||||||
|
void DeferPipelineDestruction(VkPipeline pipeline);
|
||||||
|
|
||||||
// Wait for a fence to be completed.
|
// Wait for a fence to be completed.
|
||||||
// Also invokes callbacks for completion.
|
// Also invokes callbacks for completion.
|
||||||
|
|
Loading…
Reference in a new issue