Vulkan/Device: Fix Queue stuff
Former-commit-id: 124691546da9e4ce867df931c97b828efef237ca [formerly 9ce524972a4ca15755b9b575560046251a8063f7] Former-commit-id: 2ac3db1c0c11573e3ea6439cb3bb8f8c8dec9451
This commit is contained in:
@@ -29,6 +29,7 @@ namespace Nz
|
||||
public:
|
||||
struct QueueFamilyInfo;
|
||||
struct QueueInfo;
|
||||
using QueueList = std::vector<QueueInfo>;
|
||||
|
||||
inline Device(Instance& instance);
|
||||
Device(const Device&) = delete;
|
||||
@@ -39,6 +40,7 @@ namespace Nz
|
||||
inline void Destroy();
|
||||
|
||||
inline const std::vector<QueueFamilyInfo>& GetEnabledQueues() const;
|
||||
inline const QueueList& GetEnabledQueues(UInt32 familyQueue) const;
|
||||
|
||||
inline Queue GetQueue(UInt32 queueFamilyIndex, UInt32 queueIndex);
|
||||
inline Instance& GetInstance();
|
||||
@@ -195,13 +197,11 @@ namespace Nz
|
||||
struct QueueInfo
|
||||
{
|
||||
QueueFamilyInfo* familyInfo;
|
||||
Queue queue;
|
||||
VkQueue queue;
|
||||
float priority;
|
||||
};
|
||||
|
||||
using QueueList = std::vector<QueueInfo>;
|
||||
|
||||
struct QueueFamilyInfoi
|
||||
struct QueueFamilyInfo
|
||||
{
|
||||
QueueList queues;
|
||||
VkExtent3D minImageTransferGranularity;
|
||||
@@ -221,6 +221,7 @@ namespace Nz
|
||||
std::unordered_set<String> m_loadedExtensions;
|
||||
std::unordered_set<String> m_loadedLayers;
|
||||
std::vector<QueueFamilyInfo> m_enabledQueuesInfos;
|
||||
std::vector<const QueueList*> m_queuesByFamily;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,13 @@ namespace Nz
|
||||
return m_enabledQueuesInfos;
|
||||
}
|
||||
|
||||
inline const Device::QueueList& Device::GetEnabledQueues(UInt32 familyQueue) const
|
||||
{
|
||||
NazaraAssert(familyQueue < m_enabledQueuesInfos.size(), "Invalid family queue");
|
||||
|
||||
return *m_queuesByFamily[familyQueue];
|
||||
}
|
||||
|
||||
inline Queue Device::GetQueue(UInt32 queueFamilyIndex, UInt32 queueIndex)
|
||||
{
|
||||
VkQueue queue;
|
||||
|
||||
Reference in New Issue
Block a user