From 2a4a7510cd83a51b041a176efd10b9212aa8b623 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Mon, 17 Feb 2025 12:30:55 +0100 Subject: [PATCH] vulkan: fix sync-file import check --- src/gfx_apis/vulkan.rs | 4 ++-- src/gfx_apis/vulkan/device.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gfx_apis/vulkan.rs b/src/gfx_apis/vulkan.rs index 63c5f778..21fc9792 100644 --- a/src/gfx_apis/vulkan.rs +++ b/src/gfx_apis/vulkan.rs @@ -99,8 +99,8 @@ pub enum VulkanError { LoadImageProperties(#[source] vk::Result), #[error("Device does not support rending and texturing from the XRGB8888 format")] XRGB8888, - #[error("Device does not support sync obj import")] - SyncobjImport, + #[error("Device does not support sync file import")] + SyncFileImport, #[error("Could not start a command buffer")] BeginCommandBuffer(vk::Result), #[error("Could not end a command buffer")] diff --git a/src/gfx_apis/vulkan/device.rs b/src/gfx_apis/vulkan/device.rs index 9a781de2..b882cbd1 100644 --- a/src/gfx_apis/vulkan/device.rs +++ b/src/gfx_apis/vulkan/device.rs @@ -242,7 +242,7 @@ impl VulkanInstance { fn supports_semaphore_import(&self, phy_dev: PhysicalDevice) -> bool { let mut props = ExternalSemaphoreProperties::default(); let info = PhysicalDeviceExternalSemaphoreInfo::default() - .handle_type(ExternalSemaphoreHandleTypeFlags::OPAQUE_FD); + .handle_type(ExternalSemaphoreHandleTypeFlags::SYNC_FD); unsafe { self.instance .get_physical_device_external_semaphore_properties(phy_dev, &info, &mut props); @@ -276,7 +276,7 @@ impl VulkanInstance { transfer_granularity_mask = (width_mask, height_mask); } if !self.supports_semaphore_import(phy_dev) { - return Err(VulkanError::SyncobjImport); + return Err(VulkanError::SyncFileImport); } let enabled_extensions: Vec<_> = REQUIRED_DEVICE_EXTENSIONS .iter()