physical_device: prefer try_array over manual queries
This commit is contained in:
parent
7239fb26bf
commit
8726ca81cb
@ -84,14 +84,9 @@ physical_device::memory_properties (void) const
|
|||||||
std::vector<VkQueueFamilyProperties>
|
std::vector<VkQueueFamilyProperties>
|
||||||
physical_device::queue_families (void) const
|
physical_device::queue_families (void) const
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
return error::try_array (
|
||||||
vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, nullptr);
|
vkGetPhysicalDeviceQueueFamilyProperties, native ()
|
||||||
|
);
|
||||||
std::vector<VkQueueFamilyProperties> values (count);
|
|
||||||
vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, values.data ());
|
|
||||||
|
|
||||||
values.resize (count);
|
|
||||||
return values;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user