1
0
Fork 0
forked from wry/wry

copy_device: add new utility

This commit is contained in:
Julian Orth 2026-02-14 23:03:09 +01:00
parent f2a0221c9e
commit fa897f0f76
9 changed files with 2068 additions and 10 deletions

View file

@ -13,7 +13,9 @@ use {
drm::{Drm, sync_obj::SyncObjCtx},
gbm::{GBM_BO_USE_RENDERING, GbmDevice},
},
vulkan_core::{API_VERSION, ApiVersionDisplay, Extensions, map_extension_properties},
vulkan_core::{
ApiVersionDisplay, Extensions, VULKAN_API_VERSION, map_extension_properties,
},
},
ahash::AHashMap,
arrayvec::ArrayVec,
@ -145,7 +147,7 @@ impl VulkanInstance {
let mut devices = vec![];
for phy_dev in phy_devs {
let props = unsafe { self.instance.get_physical_device_properties(phy_dev) };
if props.api_version < API_VERSION {
if props.api_version < VULKAN_API_VERSION {
devices.push((props, None, None));
continue;
}
@ -218,7 +220,7 @@ impl VulkanInstance {
};
for phy_dev in phy_devs {
let props = unsafe { self.instance.get_physical_device_properties(phy_dev) };
if props.api_version < API_VERSION {
if props.api_version < VULKAN_API_VERSION {
continue;
}
if props.device_type == PhysicalDeviceType::CPU {
@ -618,7 +620,7 @@ fn log_device(
Ustr::from_ptr(props.device_name.as_ptr()).display()
);
}
if props.api_version < API_VERSION {
if props.api_version < VULKAN_API_VERSION {
log::warn!(" device does not support vulkan 1.3");
}
if let Some(extensions) = extensions {