physical_device: add queue_families query

This commit is contained in:
Danny Robson 2017-09-01 13:12:37 +10:00
parent 0a84a4ebb3
commit 7163123b71
2 changed files with 17 additions and 0 deletions

View File

@ -59,6 +59,21 @@ physical_device::features (void) const
}
///////////////////////////////////////////////////////////////////////////////
std::vector<VkQueueFamilyProperties>
physical_device::queue_families (void) const
{
uint32_t count = 0;
vkGetPhysicalDeviceQueueFamilyProperties (id (), &count, nullptr);
std::vector<VkQueueFamilyProperties> values (count);
vkGetPhysicalDeviceQueueFamilyProperties (id (), &count, values.data ());
values.resize (count);
return values;
}
///////////////////////////////////////////////////////////////////////////////
std::string
physical_device::name (void) const

View File

@ -34,6 +34,8 @@ namespace cruft::vk {
VkPhysicalDeviceProperties properties (void) const;
VkPhysicalDeviceFeatures features (void) const;
std::vector<VkQueueFamilyProperties> queue_families (void) const;
std::string name (void) const;
};
}