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 the api_version of the instance.
  • physical_device must be queried from an 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.