mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-24 02:40:52 +00:00
Fix some cases that didn't remap queue family indices. Closes #2837
This commit is contained in:
@@ -1067,6 +1067,7 @@ public:
|
||||
return it->second.state;
|
||||
}
|
||||
|
||||
uint32_t RemapQueue(uint32_t q) { return m_QueueRemapping[q][0].family; }
|
||||
static rdcstr GetChunkName(uint32_t idx);
|
||||
VulkanResourceManager *GetResourceManager() { return m_ResourceManager; }
|
||||
VulkanDebugManager *GetDebugManager() { return m_DebugManager; }
|
||||
|
||||
@@ -338,7 +338,7 @@ void VulkanResourceManager::SerialiseImageStates(SerialiserType &ser,
|
||||
ImageSubresourceStateForRange p;
|
||||
p.range = st.subresourceRange;
|
||||
p.range.sliceCount = imageLayouts.imageInfo.extent.depth;
|
||||
p.state.oldQueueFamilyIndex = st.dstQueueFamilyIndex;
|
||||
p.state.oldQueueFamilyIndex = m_Core->RemapQueue(st.dstQueueFamilyIndex);
|
||||
p.state.newQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
|
||||
p.state.oldLayout = st.newLayout;
|
||||
p.state.newLayout = imageState.GetImageInfo().initialLayout;
|
||||
@@ -372,6 +372,7 @@ void VulkanResourceManager::SerialiseImageStates(SerialiserType &ser,
|
||||
// initial state to the state it was in at the beginning of the capture.
|
||||
ImageSubresourceState &state = it->state();
|
||||
state.newLayout = imageState.GetImageInfo().initialLayout;
|
||||
state.oldQueueFamilyIndex = m_Core->RemapQueue(state.oldQueueFamilyIndex);
|
||||
state.newQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1526,6 +1526,14 @@ bool WrappedVulkan::Serialise_vkCreateQueryPool(SerialiserType &ser, VkDevice de
|
||||
{
|
||||
VkQueryPool pool = VK_NULL_HANDLE;
|
||||
|
||||
VkQueryPoolPerformanceCreateInfoKHR *perfInfo =
|
||||
(VkQueryPoolPerformanceCreateInfoKHR *)FindNextStruct(
|
||||
&CreateInfo, VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR);
|
||||
if(perfInfo)
|
||||
{
|
||||
perfInfo->queueFamilyIndex = m_QueueRemapping[perfInfo->queueFamilyIndex][0].family;
|
||||
}
|
||||
|
||||
VkResult ret = ObjDisp(device)->CreateQueryPool(Unwrap(device), &CreateInfo, NULL, &pool);
|
||||
|
||||
if(ret != VK_SUCCESS)
|
||||
|
||||
@@ -1627,7 +1627,7 @@ bool WrappedVulkan::Serialise_vkCreateBuffer(SerialiserType &ser, VkDevice devic
|
||||
CreateInfo.usage |= VK_BUFFER_USAGE_TRANSFER_DST_BIT;
|
||||
|
||||
// remap the queue family indices
|
||||
if(CreateInfo.sharingMode == VK_SHARING_MODE_EXCLUSIVE)
|
||||
if(CreateInfo.sharingMode == VK_SHARING_MODE_CONCURRENT)
|
||||
{
|
||||
uint32_t *queueFamiles = (uint32_t *)CreateInfo.pQueueFamilyIndices;
|
||||
for(uint32_t q = 0; q < CreateInfo.queueFamilyIndexCount; q++)
|
||||
@@ -2030,7 +2030,7 @@ bool WrappedVulkan::Serialise_vkCreateImage(SerialiserType &ser, VkDevice device
|
||||
CreateInfo.usage &= ~VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT;
|
||||
|
||||
// remap the queue family indices
|
||||
if(CreateInfo.sharingMode == VK_SHARING_MODE_EXCLUSIVE)
|
||||
if(CreateInfo.sharingMode == VK_SHARING_MODE_CONCURRENT)
|
||||
{
|
||||
uint32_t *queueFamiles = (uint32_t *)CreateInfo.pQueueFamilyIndices;
|
||||
for(uint32_t q = 0; q < CreateInfo.queueFamilyIndexCount; q++)
|
||||
|
||||
@@ -391,6 +391,13 @@ bool WrappedVulkan::Serialise_vkCreateSwapchainKHR(SerialiserType &ser, VkDevice
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
};
|
||||
|
||||
if(CreateInfo.imageSharingMode == VK_SHARING_MODE_CONCURRENT)
|
||||
{
|
||||
uint32_t *queueFamiles = (uint32_t *)CreateInfo.pQueueFamilyIndices;
|
||||
for(uint32_t q = 0; q < CreateInfo.queueFamilyIndexCount; q++)
|
||||
queueFamiles[q] = m_QueueRemapping[queueFamiles[q]][0].family;
|
||||
}
|
||||
|
||||
for(uint32_t i = 0; i < NumImages; i++)
|
||||
{
|
||||
VkDeviceMemory mem = VK_NULL_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user