mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +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 = desc.view_formats.clone();
|
||||||
wgt_view_formats.push(desc.format);
|
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
|
vk_view_formats = desc
|
||||||
.view_formats
|
.view_formats
|
||||||
.iter()
|
.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
|
/// Returns `true` if the format has a color aspect
|
||||||
pub fn has_color_aspect(&self) -> bool {
|
pub fn has_color_aspect(&self) -> bool {
|
||||||
!self.is_depth_stencil_format()
|
!self.is_depth_stencil_format()
|
||||||
|
Loading…
Reference in New Issue
Block a user