Fix the set of queues made available to initial state CONCURRENT buffers

* We don't want to enable all queues on the physical device because not all of
  them are necessarily enabled in the device itself.
This commit is contained in:
baldurk
2019-04-04 13:11:18 +01:00
parent ff5f946e1e
commit fb826ee724
3 changed files with 10 additions and 7 deletions
+2 -5
View File
@@ -550,11 +550,8 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
// we make the buffer concurrently accessible by all queue families to not invalidate the
// contents of the memory we're reading back from.
bufInfo.sharingMode = VK_SHARING_MODE_CONCURRENT;
bufInfo.queueFamilyIndexCount = m_PhysicalDeviceData.queueCount;
std::vector<uint32_t> queues;
for(uint32_t i = 0; i < bufInfo.queueFamilyIndexCount; i++)
queues.push_back(i);
bufInfo.pQueueFamilyIndices = queues.data();
bufInfo.queueFamilyIndexCount = (uint32_t)m_QueueFamilyIndices.size();
bufInfo.pQueueFamilyIndices = m_QueueFamilyIndices.data();
// spec requires that CONCURRENT must specify more than one queue family. If there is only one
// queue family, we can safely use exclusive.