File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -980,7 +980,7 @@ impl crate::Device<super::Api> for super::Device {
980
980
wgt_view_formats = desc. view_formats . clone ( ) ;
981
981
wgt_view_formats. push ( desc. format ) ;
982
982
983
- if self . shared . private_caps . image_format_list {
983
+ if self . shared . private_caps . image_format_list && !desc . format . is_multi_planar_format ( ) {
984
984
vk_view_formats = desc
985
985
. view_formats
986
986
. iter ( )
Original file line number Diff line number Diff line change @@ -2890,6 +2890,11 @@ impl TextureFormat {
2890
2890
}
2891
2891
}
2892
2892
2893
+ /// Returns `true` if the format is a multi-planar format
2894
+ pub fn is_multi_planar_format ( & self ) -> bool {
2895
+ matches ! ( * self , Self :: NV12 )
2896
+ }
2897
+
2893
2898
/// Returns `true` if the format has a color aspect
2894
2899
pub fn has_color_aspect ( & self ) -> bool {
2895
2900
!self . is_depth_stencil_format ( )
You can’t perform that action at this time.
0 commit comments