diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index 4dd80c686..3c4fe67c8 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -729,10 +729,13 @@ bool WrappedVulkan::Serialise_vkCreateDevice( vkr = ObjDisp(device)->CreateCommandPool(Unwrap(device), &poolInfo, &m_PhysicalReplayData[i].cmdpool); RDCASSERT(vkr == VK_SUCCESS); - VkCmdBufferCreateInfo cmdInfo = { VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO, NULL, m_PhysicalReplayData[i].cmdpool, VK_CMD_BUFFER_LEVEL_PRIMARY, 0 }; + GetResourceManager()->WrapResource(Unwrap(device), m_PhysicalReplayData[i].cmdpool); + + VkCmdBufferCreateInfo cmdInfo = { VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO, NULL, Unwrap(m_PhysicalReplayData[i].cmdpool), VK_CMD_BUFFER_LEVEL_PRIMARY, 0 }; vkr = ObjDisp(device)->CreateCommandBuffer(Unwrap(device), &cmdInfo, &m_PhysicalReplayData[i].cmd); RDCASSERT(vkr == VK_SUCCESS); + GetResourceManager()->WrapResource(Unwrap(device), m_PhysicalReplayData[i].cmd); found = true; break; } @@ -3519,7 +3522,7 @@ bool WrappedVulkan::Serialise_vkAllocDescriptorSets( VkDescriptorSetLayout layout = GetResourceManager()->GetLiveHandle(layoutId); uint32_t cnt = 0; - VkResult ret = ObjDisp(device)->AllocDescriptorSets(Unwrap(device), descriptorPool, usage, 1, &layout, &descset, &cnt); + VkResult ret = ObjDisp(device)->AllocDescriptorSets(Unwrap(device), Unwrap(descriptorPool), usage, 1, UnwrapPtr(layout), &descset, &cnt); if(ret != VK_SUCCESS) { @@ -7931,7 +7934,7 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live, VulkanResourceManager vkr = ObjDisp(d)->CreateBuffer(Unwrap(d), &bufInfo, &dstBuf); RDCASSERT(vkr == VK_SUCCESS); - vkr = ObjDisp(d)->BindBufferMemory(Unwrap(d), dstBuf, dstMem, 0); + vkr = ObjDisp(d)->BindBufferMemory(Unwrap(d), dstBuf, Unwrap(dstMem), 0); RDCASSERT(vkr == VK_SUCCESS); VkBufferCopy region = { 0, 0, meminfo.size }; @@ -8342,7 +8345,7 @@ void WrappedVulkan::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t vkr = ObjDisp(cmd)->EndCommandBuffer(Unwrap(cmd)); RDCASSERT(vkr == VK_SUCCESS); - vkr = ObjDisp(q)->QueueSubmit(q, 1, UnwrapPtr(cmd), VK_NULL_HANDLE); + vkr = ObjDisp(q)->QueueSubmit(Unwrap(q), 1, UnwrapPtr(cmd), VK_NULL_HANDLE); RDCASSERT(vkr == VK_SUCCESS); // VKTODOMED while we're reusing cmd buffer, we have to ensure this one // is done before continuing diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index d14896b62..f5d67c26e 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -109,10 +109,10 @@ void VulkanReplay::OutputWindow::Destroy(WrappedVulkan *driver, VkDevice device) if(bb != VK_NULL_HANDLE) { - vt->DestroyRenderPass(Unwrap(device), renderpass); + vt->DestroyRenderPass(Unwrap(device), Unwrap(renderpass)); renderpass = VK_NULL_HANDLE; - vt->DestroyDynamicViewportState(Unwrap(device), fullVP); + vt->DestroyDynamicViewportState(Unwrap(device), Unwrap(fullVP)); fullVP = VK_NULL_HANDLE; vt->DestroyImage(Unwrap(device), Unwrap(bb)); @@ -849,7 +849,7 @@ void VulkanReplay::RenderCheckerboard(Vec3f light, Vec3f dark) vt->CmdBindPipeline(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS, Unwrap(GetDebugManager()->m_CheckerboardPipeline)); vt->CmdBindDescriptorSets(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS, Unwrap(GetDebugManager()->m_CheckerboardPipeLayout), 0, 1, UnwrapPtr(GetDebugManager()->m_CheckerboardDescSet), 0, NULL); - vt->CmdBindDynamicViewportState(Unwrap(cmd), outw.fullVP); + vt->CmdBindDynamicViewportState(Unwrap(cmd), Unwrap(outw.fullVP)); vt->CmdBindDynamicRasterState(Unwrap(cmd), Unwrap(GetDebugManager()->m_DynamicRSState)); vt->CmdBindDynamicColorBlendState(Unwrap(cmd), Unwrap(GetDebugManager()->m_DynamicCBStateWhite)); vt->CmdBindDynamicDepthStencilState(Unwrap(cmd), Unwrap(GetDebugManager()->m_DynamicDSStateDisabled));