Function gpu_alloc_vulkanalia::device_properties
source · pub unsafe fn device_properties(
instance: &Instance,
version: u32,
physical_device: PhysicalDevice,
) -> VkResult<DeviceProperties<'static>>
Expand description
Collects device properties from vulkanalia’s Instance
for the specified
physical device, required to create GpuAllocator
.
§Safety
The following must be true:
version
must not be higher than theapi_version
of theinstance
.physical_device
must be queried from anInstance
associated with thisinstance
.- Even if returned properties’ field
buffer_device_address
is set to true, featurePhysicalDeviceBufferDeviceAddressFeatures::buffer_derive_address
must be enabled explicitly on device creation and extension “VK_KHR_buffer_device_address” for Vulkan prior 1.2. Otherwise the field must be set to false before passing toGpuAllocator::new
.