mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Treat surfaces with no capabilities as swap failure
* This can sometimes happen when shutting down
This commit is contained in:
@@ -216,6 +216,20 @@ void VulkanReplay::OutputWindow::Create(WrappedVulkan *driver, VkDevice device,
|
||||
if(capabilities.minImageCount < 8)
|
||||
numImages = RDCMAX(numImages, capabilities.minImageCount);
|
||||
|
||||
if(capabilities.supportedUsageFlags == 0)
|
||||
{
|
||||
if(old != VK_NULL_HANDLE)
|
||||
{
|
||||
vt->DestroySwapchainKHR(Unwrap(device), Unwrap(old), NULL);
|
||||
GetResourceManager()->ReleaseWrappedResource(old);
|
||||
}
|
||||
|
||||
RDCERR("Surface reported unsuccessful. %d consecutive failures!", failures);
|
||||
failures++;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
RDCASSERT(capabilities.supportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
|
||||
// AMD didn't report this capability for a while. If the assert fires for you, update
|
||||
// your drivers!
|
||||
|
||||
Reference in New Issue
Block a user