Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import image from dma_buf following VK_EXT_external_memory_dma_buf #2145

Merged
merged 13 commits into from
Apr 1, 2023
Merged
Prev Previous commit
Next Next commit
Add more VUID validation
Check for
VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-02248, and VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02249
  • Loading branch information
spaghetti-stack committed Mar 24, 2023
commit a160a000c0ab76463947917c12ad2813a81e52a3
8 changes: 7 additions & 1 deletion vulkano/src/device/physical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
},
instance::Instance,
macros::{vulkan_bitflags, vulkan_enum},
memory::MemoryProperties,
memory::{ExternalMemoryHandleType, MemoryProperties},
swapchain::{
ColorSpace, FullScreenExclusive, PresentMode, Surface, SurfaceApi, SurfaceCapabilities,
SurfaceInfo, SurfaceTransforms,
Expand Down Expand Up @@ -1158,6 +1158,12 @@ impl PhysicalDevice {
if !info2_vk.p_next.is_null() {
return Ok(None);
}
if let Some(ExternalMemoryHandleType::DmaBuf) = external_memory_handle_type
{
// VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-02248
// VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02249
return Ok(None);
}

(fns.v1_0.get_physical_device_image_format_properties)(
self.handle,
Expand Down