mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-05 05:15:47 +00:00
Fetch vulkan shader printf messages from a pristine replayed state
* For draws/dispatches that aren't pure - i.e. modify state that they read from - we need to be sure we don't replay the action before running it to fetch feedback. For that reason we need to replay up to the action first, then fetch feedback.
This commit is contained in:
@@ -1439,8 +1439,12 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
}
|
||||
}
|
||||
|
||||
// replay from the start without this action, as we want a clean state to do printfs from.
|
||||
m_pDriver->ReplayLog(0, eventId, eReplay_WithoutDraw);
|
||||
|
||||
// we go through the driver for all these creations since they need to be properly
|
||||
// registered in order to be put in the partial replay state
|
||||
// registered in order to be put in the partial replay state. Our patched shader is valid so we
|
||||
// don't need to replay after doing the feedback execute
|
||||
VkResult vkr = VK_SUCCESS;
|
||||
VkDevice dev = m_Device;
|
||||
|
||||
@@ -1893,9 +1897,6 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
for(size_t i = 0; i < ARRAY_COUNT(modules); i++)
|
||||
if(modules[i] != VK_NULL_HANDLE)
|
||||
m_pDriver->vkDestroyShaderModule(dev, modules[i], NULL);
|
||||
|
||||
// replay from the start as we may have corrupted state while fetching the above feedback.
|
||||
m_pDriver->ReplayLog(0, eventId, eReplay_Full);
|
||||
}
|
||||
|
||||
#if ENABLED(ENABLE_UNIT_TESTS)
|
||||
|
||||
Reference in New Issue
Block a user