// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Auto generated from pyronyx-gen — generated extensions
// Do not Edit! Execute `cargo run pyronyx-gen`
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

use crate::vk::*;
use core::ffi::CStr;

/// Type: `Device`
pub const NAME: &CStr = c"VK_EXT_pageable_device_local_memory";
pub const SPEC_VERSION: u32 = 1;

pub trait PageableDeviceLocalMemoryDevice {
    fn set_device_memory_priority(&self, memory: DeviceMemory, priority: f32);
}

impl PageableDeviceLocalMemoryDevice for Device {
    /// <https://docs.vulkan.org/refpages/latest/refpages/source/vkSetDeviceMemoryPriorityEXT.html>
    #[inline]
    fn set_device_memory_priority(&self, memory: DeviceMemory, priority: f32) {
        let call = self
            .fns()
            .ext_pageable_device_local_memory
            .as_ref()
            .expect(Self::EXT_LOAD_ERROR)
            .set_device_memory_priority_ext;

        unsafe { (call)(self.handle, memory, priority) };
    }
}
