ash/extensions/ext/
physical_device_drm.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::vk;
use crate::Instance;
use std::ffi::CStr;

#[derive(Clone)]
pub struct PhysicalDeviceDrm;

impl PhysicalDeviceDrm {
    pub unsafe fn get_properties(
        instance: &Instance,
        pdevice: vk::PhysicalDevice,
    ) -> vk::PhysicalDeviceDrmPropertiesEXT {
        let mut props_drm = vk::PhysicalDeviceDrmPropertiesEXT::default();
        {
            let mut props = vk::PhysicalDeviceProperties2::builder().push_next(&mut props_drm);
            instance.get_physical_device_properties2(pdevice, &mut props);
        }
        props_drm
    }

    pub const fn name() -> &'static CStr {
        vk::ExtPhysicalDeviceDrmFn::name()
    }
}