From 822b770569db63402a540b07c805f47154dea753 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 1 Feb 2024 16:56:56 +0000 Subject: [PATCH] Use the loadRP when making the pipeline for Vulkan Pixel Debug Fixes validation error related to dependencies: VUID-vkCmdDraw-renderPass-02684] Validation Error: [ VUID-vkCmdDraw-renderPass-02684 ] Object 0: handle = 0x61ee4f000000021b, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x1c2336000000021a, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x50685725 | vkCmdDraw: RenderPasses incompatible between active render pass w/ VkRenderPass 0x61ee4f000000021b[] with a dependencyCount of 0 and pipeline state object w/ VkRenderPass 0x1c2336000000021a[] with a dependencyCount of 2. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-vkCmdDraw-renderPass-02684) --- renderdoc/driver/vulkan/vk_shaderdebug.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_shaderdebug.cpp b/renderdoc/driver/vulkan/vk_shaderdebug.cpp index 434e4c140..be6ab83ca 100644 --- a/renderdoc/driver/vulkan/vk_shaderdebug.cpp +++ b/renderdoc/driver/vulkan/vk_shaderdebug.cpp @@ -4355,6 +4355,11 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_ m_pDriver->GetShaderCache()->MakeGraphicsPipelineInfo(graphicsInfo, state.graphics.pipeline); + // use the load RP if an RP is specified + if(graphicsInfo.renderPass != VK_NULL_HANDLE) + graphicsInfo.renderPass = + c.m_RenderPass[GetResID(graphicsInfo.renderPass)].loadRPs[graphicsInfo.subpass]; + // struct size is PSHit header plus 5x structStride = base, ddxcoarse, ddycoarse, ddxfine, ddyfine uint32_t structSize = sizeof(PSHit) + structStride * 5;