From fa2f451e02bc1c852fa21c0975dba07bcf6faf91 Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Thu, 1 Feb 2024 13:40:34 -0500 Subject: [PATCH] Assign size to NV12 texture format --- src/builder.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 509d18bc..a7ac027d 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -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 @@ -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!(), } }