Vulkan/Device: Add queue infos
Former-commit-id: 36a260b1efa0f443b1c22c21060adbc7ff23a10f [formerly a9c073dfae57cde2c3b175c5f70e2fa47976bd82] Former-commit-id: a14c9a5283579dff978fffcca660e4974bf8e58d
This commit is contained in:
@@ -27,6 +27,8 @@ namespace Nz
|
||||
class NAZARA_VULKAN_API Device : public HandledObject<Device>
|
||||
{
|
||||
public:
|
||||
struct QueueFamilyInfo;
|
||||
|
||||
inline Device(Instance& instance);
|
||||
Device(const Device&) = delete;
|
||||
Device(Device&&) = delete;
|
||||
@@ -35,6 +37,7 @@ namespace Nz
|
||||
bool Create(VkPhysicalDevice device, const VkDeviceCreateInfo& createInfo, const VkAllocationCallbacks* allocator = nullptr);
|
||||
inline void Destroy();
|
||||
|
||||
inline const std::vector<QueueFamilyInfo>& GetEnabledQueues() const;
|
||||
inline Queue GetQueue(UInt32 queueFamilyIndex, UInt32 queueIndex);
|
||||
inline Instance& GetInstance();
|
||||
inline const Instance& GetInstance() const;
|
||||
@@ -184,6 +187,15 @@ namespace Nz
|
||||
|
||||
#undef NAZARA_VULKAN_DEVICE_FUNCTION
|
||||
|
||||
struct QueueFamilyInfo
|
||||
{
|
||||
std::vector<float> queues;
|
||||
VkExtent3D minImageTransferGranularity;
|
||||
VkQueueFlags flags;
|
||||
UInt32 familyIndex;
|
||||
UInt32 timestampValidBits;
|
||||
};
|
||||
|
||||
private:
|
||||
inline PFN_vkVoidFunction GetProcAddr(const char* name);
|
||||
|
||||
@@ -193,6 +205,7 @@ namespace Nz
|
||||
VkResult m_lastErrorCode;
|
||||
std::unordered_set<String> m_loadedExtensions;
|
||||
std::unordered_set<String> m_loadedLayers;
|
||||
std::vector<QueueFamilyInfo> m_enabledQueuesInfos;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user