15 #include <vsg/vk/DeviceExtensions.h>
16 #include <vsg/vk/DeviceFeatures.h>
17 #include <vsg/vk/Queue.h>
29 int queueFamilyIndex = -1;
30 std::vector<float> queuePiorities;
33 using QueueSettings = std::vector<QueueSetting>;
41 operator VkDevice()
const {
return _device; }
42 VkDevice vk()
const {
return _device; }
44 static uint32_t maxNumDevices();
45 const uint32_t deviceID = 0;
47 Instance* getInstance() {
return _instance.get(); }
48 const Instance* getInstance()
const {
return _instance.get(); }
50 PhysicalDevice* getPhysicalDevice() {
return _physicalDevice.get(); }
51 const PhysicalDevice* getPhysicalDevice()
const {
return _physicalDevice.get(); }
56 const Queues& getQueues()
const {
return _queues; }
58 ref_ptr<Queue> getQueue(uint32_t queueFamilyIndex, uint32_t queueIndex = 0);
67 bool getProcAddr(T& procAddress,
const char* pName,
const char* pNameFallback =
nullptr)
const
69 procAddress =
reinterpret_cast<T
>(vkGetDeviceProcAddr(_device, pName));
70 if (procAddress)
return true;
72 if (pNameFallback) procAddress =
reinterpret_cast<T
>(vkGetDeviceProcAddr(_device, pNameFallback));
Adapter class that provides a means of managing the lifetime of VkAllocationCallbacks.
Definition: AllocationCallbacks.h:24
Definition: DeviceExtensions.h:28
Definition: DeviceFeatures.h:24
Device encapsulates VkDevice, a logical handle to the PhysicalDevice with capabilities specified duri...
Definition: Device.h:37
bool getProcAddr(T &procAddress, const char *pName, const char *pNameFallback=nullptr) const
Definition: Device.h:67
bool supportsApiVersion(uint32_t version) const
device-level core functionality can be used if both VkInstance and VkPhysicalDevice support the Vulka...
const DeviceExtensions * getExtensions() const
get the extensions structure that holds a range of function pointers to vkInstance extensions
Definition: Device.h:61
Instance encapsulates the VkInstance.
Definition: Instance.h:43
Definition: PhysicalDevice.h:23