1
0
Fork 0
forked from wry/wry

Merge pull request #370 from mahkoh/jorth/syncfile-import-check

vulkan: fix sync-file import check
This commit is contained in:
mahkoh 2025-02-17 12:34:58 +01:00 committed by GitHub
commit a45ae2ba03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -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")]

View file

@ -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()