Skip to content

Commit

Permalink
treat NV12's block size as (2, 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 committed Nov 28, 2023
1 parent bfd2fd3 commit 7ccaa0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2393,7 +2393,7 @@ pub enum TextureFormat {
/// - 1: Dual 8 bit channel chrominance at half width and half height.
///
/// Valid view formats for luminance are [`TextureFormat::R8Unorm`] and [`TextureFormat::R8Uint`].
///
///
/// Valid view formats for chrominance are [`TextureFormat::Rg8Unorm`] and [`TextureFormat::Rg8Uint`].
///
/// Width and height must be even.
Expand Down Expand Up @@ -2951,8 +2951,9 @@ impl TextureFormat {
| Self::Depth24Plus
| Self::Depth24PlusStencil8
| Self::Depth32Float
| Self::Depth32FloatStencil8
| Self::NV12 => (1, 1),
| Self::Depth32FloatStencil8 => (1, 1),

Self::NV12 => (2, 2),

Self::Bc1RgbaUnorm
| Self::Bc1RgbaUnormSrgb
Expand Down

0 comments on commit 7ccaa0e

Please sign in to comment.