Vulkan: Fix EndFrameCapture with null wnd

This ensures that a thumbnail is created using the image from last
presented swapchain.

This swapchain, and the thumbnail still could be null. `CreateRDC` was
incorrectly asserting that the thumbnail contained non-null data. In
fact, `CreateRDC` already behaves correctly in the case of null
thumbnail data, so this assertion is removed.

Change-Id: I5b35463898029b0130fe9d8f39dda30e192deef6
This commit is contained in:
Benson Joeris
2019-06-18 11:18:05 +01:00
committed by Baldur Karlsson
parent e702598212
commit 54c5a9c303
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -932,8 +932,6 @@ RDCFile *RenderDoc::CreateRDC(RDCDriver driver, uint32_t frameNum, const FramePi
EncodePixelsPNG(outRaw, outPng);
}
RDCASSERT(outPng.pixels != NULL);
ret->SetData(driver, ToStr(driver).c_str(), OSUtility::GetMachineIdent(), &outPng);
FileIO::CreateParentDirectory(m_CurrentLogFile);
@@ -1516,4 +1514,4 @@ TEST_CASE("Check ResourceId tostr", "[tostr]")
CHECK(ToStr(*u.id) == "ResourceId::1311768465173141112");
}
#endif
#endif
+1 -1
View File
@@ -1580,7 +1580,7 @@ bool WrappedVulkan::EndFrameCapture(void *dev, void *wnd)
const uint32_t maxSize = 2048;
RenderDoc::FramePixels fp;
if(swap != VK_NULL_HANDLE)
if(swaprecord != NULL)
{
VkDevice device = GetDev();
VkCommandBuffer cmd = GetNextCmd();