Function gpu_alloc_ash::device_properties
source · [−]pub unsafe fn device_properties(
instance: &Instance,
version: u32,
physical_device: PhysicalDevice
) -> Result<DeviceProperties<'static>, Result>
Expand description
Returns DeviceProperties
from ash’s InstanceLoader
for specified PhysicalDevice
, required to create GpuAllocator
.
Safety
physical_device
must be queried from Instance
associated with this instance
.
Even if returned properties’ field buffer_device_address
is set to true,
feature PhysicalDeviceBufferDeviceAddressFeatures::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 to GpuAllocator::new
.