From 54c5a9c3036c63a3344709faca22c2a6102d6d05 Mon Sep 17 00:00:00 2001 From: Benson Joeris Date: Thu, 13 Jun 2019 14:54:54 -0400 Subject: [PATCH] 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 --- renderdoc/core/core.cpp | 4 +--- renderdoc/driver/vulkan/vk_core.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 1e0c2fc26..8761e0537 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -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 \ No newline at end of file +#endif diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index 006179c97..95d6f2de3 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -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();