Skip to content

Commit

Permalink
On Vulkan do not fill discard pattern during loading
Browse files Browse the repository at this point in the history
The state tracking will not be complete during loading and can cause a crash trying to rebind the current pipeline after filling the image with the discard pattern
  • Loading branch information
Zorro666 committed Feb 8, 2024
1 parent b1d7876 commit 4c8c319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions renderdoc/driver/vulkan/vk_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,10 @@ void VulkanDebugManager::FillWithDiscardPattern(VkCommandBuffer cmd, DiscardType
VkImageSubresourceRange discardRange,
VkRect2D discardRect)
{
// State tracking will not be accurate during loading
if(IsLoading(m_pDriver->m_State))
return;

VkDevice dev = m_Device;
const VkDevDispatchTable *vt = ObjDisp(dev);
const VulkanCreationInfo::Image &imInfo = GetImageInfo(GetResID(image));
Expand Down

0 comments on commit 4c8c319

Please sign in to comment.