mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix a crash if framebuffer size changes before overlay is set. Refs #863
This commit is contained in:
@@ -397,6 +397,17 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, CompType typeHint, Debu
|
||||
|
||||
VulkanCreationInfo::Image &iminfo = m_pDriver->m_CreationInfo.m_Image[texid];
|
||||
|
||||
// bail out if the framebuffer dimensions don't match the current framebuffer, or draws will fail.
|
||||
// This is an order-of-operations problem, if the overlay is set when the event is changed it is
|
||||
// refreshed before the UI layer can update the current texture.
|
||||
{
|
||||
const VulkanCreationInfo::Framebuffer &fb =
|
||||
m_pDriver->m_CreationInfo.m_Framebuffer[m_pDriver->m_RenderState.framebuffer];
|
||||
|
||||
if(fb.width != iminfo.extent.width || fb.height != iminfo.extent.height)
|
||||
return GetResID(m_Overlay.Image);
|
||||
}
|
||||
|
||||
VkCommandBuffer cmd = m_pDriver->GetNextCmd();
|
||||
|
||||
VkCommandBufferBeginInfo beginInfo = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, NULL,
|
||||
|
||||
Reference in New Issue
Block a user