mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-29 02:41:08 +00:00
If an image is in an external or foreign queue we can't fetch contents
* There's nothing we can do - we can't safely transition from/to the external queue so we have to treat the initial contents as missing/undefined.
This commit is contained in:
@@ -1180,8 +1180,8 @@ bool WrappedVulkan::Serialise_BeginCaptureFrame(SerialiserType &ser)
|
||||
barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
|
||||
barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
|
||||
barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
|
||||
barrier.srcQueueFamilyIndex = m_QueueFamilyIdx;
|
||||
barrier.dstQueueFamilyIndex = m_QueueFamilyIdx;
|
||||
barrier.image = Unwrap(img);
|
||||
barrier.subresourceRange = stit->subresourceRange;
|
||||
|
||||
|
||||
@@ -117,6 +117,14 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
|
||||
layout = &m_ImageLayouts[im->id];
|
||||
}
|
||||
|
||||
if(layout->queueFamilyIndex == VK_QUEUE_FAMILY_EXTERNAL ||
|
||||
layout->queueFamilyIndex == VK_QUEUE_FAMILY_FOREIGN_EXT)
|
||||
{
|
||||
RDCWARN("Image %s in external/foreign queue family, initial contents impossible to fetch.",
|
||||
ToStr(im->id).c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
if(layout->queueFamilyIndex != m_QueueFamilyIdx)
|
||||
{
|
||||
// get a command buffer for giving up ownership before the copy and acquiring it afterwards.
|
||||
|
||||
@@ -279,6 +279,8 @@ void VulkanResourceManager::SerialiseImageStates(SerialiserType &ser,
|
||||
t.srcQueueFamilyIndex = ImageState.queueFamilyIndex;
|
||||
t.dstQueueFamilyIndex = ImageState.queueFamilyIndex;
|
||||
m_Core->RemapQueueFamilyIndices(t.srcQueueFamilyIndex, t.dstQueueFamilyIndex);
|
||||
if(t.dstQueueFamilyIndex == VK_QUEUE_FAMILY_IGNORED)
|
||||
t.dstQueueFamilyIndex = t.srcQueueFamilyIndex = m_Core->GetQueueFamilyIndex();
|
||||
state.dstQueueFamilyIndex = t.dstQueueFamilyIndex;
|
||||
t.image = Unwrap(GetCurrentHandle<VkImage>(liveid));
|
||||
t.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
|
||||
Reference in New Issue
Block a user