{"record":{"id":"b3429fb30b53aa3b","repo":"gfx-rs/wgpu","slug":"memory-footprint-for-format-f-is-not-implement","errorCode":null,"errorMessage":"Memory footprint for format {f:?} is not implemented","messagePattern":"Memory footprint for format (.+?) is not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-types/src/texture/format.rs","lineNumber":1668,"sourceCode":"            None => match self {\n                // One f16 per pixel\n                Self::Depth16Unorm => 2,\n                // One u24 per pixel, padded to 4 bytes\n                Self::Depth24Plus => 4,\n                // One u24 per pixel, plus one u8 per pixel\n                Self::Depth24PlusStencil8 => 4,\n                // One f32 per pixel\n                Self::Depth32Float => 4,\n                // One f32 per pixel, plus one u8 per pixel, with 3 bytes intermediary padding\n                Self::Depth32FloatStencil8 => 8,\n                // One u8 per pixel\n                Self::Stencil8 => 1,\n                // Two chroma bytes per block, one luma byte per block\n                Self::NV12 => 3,\n                // Two chroma u16s and one luma u16 per block\n                Self::P010 => 6,\n                f => {\n                    unimplemented!(\"Memory footprint for format {f:?} is not implemented\");\n                }\n            },\n        };\n\n        let width_blocks = size.width.div_ceil(block_width) as u64;\n        let height_blocks = size.height.div_ceil(block_height) as u64;\n\n        let total_blocks = width_blocks * height_blocks * size.depth_or_array_layers as u64;\n\n        total_blocks * approximate_block_size as u64\n    }\n}\n\n#[cfg(any(feature = \"serde\", test))]\nimpl<'de> Deserialize<'de> for TextureFormat {\n    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,","sourceCodeStart":1650,"sourceCodeEnd":1686,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-types/src/texture/format.rs#L1650-L1686","documentation":"Panic in TextureFormat::theoretical_memory_footprint: the format f has a hand-written per-pixel size in the catch-all match (e.g. a stencil-only or newly added format), so the helper cannot compute its footprint. The faulty input is the specific texture format.","triggerScenarios":"Thrown at wgpu-types/src/texture/format.rs:1668 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the formats with a known footprint","Add an explicit per-pixel size entry for the format in this match"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}