Skip to content

Commit

Permalink
Assign size to NV12 texture format
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrasnitski committed Feb 1, 2024
1 parent bb711b5 commit fa2f451
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ const fn texture_format_size(texture_format: wgpu::TextureFormat) -> f32 {
| Rgb9e5Ufloat
| Depth16Unorm => 2.0, // 16.0 / 8.0

// 24-bit formats, 8 bits per component
NV12 => 3.0, // 24.0 / 8.0

// 32-bit formats, 8 bits per component
R32Uint
| R32Sint
Expand Down Expand Up @@ -623,7 +626,5 @@ const fn texture_format_size(texture_format: wgpu::TextureFormat) -> f32 {

// 12x12 blocks, 16 bytes per block
Astc { block: B12x12, channel: _ } => 9.0, // 12.0 * 12.0 / 16.0

NV12 => todo!(),
}
}

0 comments on commit fa2f451

Please sign in to comment.