mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
check multi-planar format
This commit is contained in:
parent
f470103874
commit
2882735cb9
@ -980,7 +980,7 @@ impl crate::Device<super::Api> 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()
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user