diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index d9aba5028..28ff5b126 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -980,7 +980,7 @@ impl crate::Device for super::Device { wgt_view_formats = desc.view_formats.clone(); wgt_view_formats.push(desc.format); - if self.shared.private_caps.image_format_list { + if self.shared.private_caps.image_format_list && !desc.format.is_multi_planar_format() { vk_view_formats = desc .view_formats .iter() diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index bdef49a60..07fa3276b 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -2890,6 +2890,11 @@ impl TextureFormat { } } + /// Returns `true` if the format is a multi-planar format + pub fn is_multi_planar_format(&self) -> bool { + matches!(*self, Self::NV12) + } + /// Returns `true` if the format has a color aspect pub fn has_color_aspect(&self) -> bool { !self.is_depth_stencil_format()