{"record":{"id":"38560940a65af643","repo":"gfx-rs/wgpu","slug":"format-texture-format-has-no-webgpu-equivalent","errorCode":null,"errorMessage":"Format {texture_format:?} has no WebGPU equivalent","messagePattern":"Format (.+?) has no WebGPU equivalent","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu/src/backend/webgpu.rs","lineNumber":359,"sourceCode":"            },\n            wgt::AstcChannel::UnormSrgb => match block {\n                wgt::AstcBlock::B4x4 => tf::Astc4x4UnormSrgb,\n                wgt::AstcBlock::B5x4 => tf::Astc5x4UnormSrgb,\n                wgt::AstcBlock::B5x5 => tf::Astc5x5UnormSrgb,\n                wgt::AstcBlock::B6x5 => tf::Astc6x5UnormSrgb,\n                wgt::AstcBlock::B6x6 => tf::Astc6x6UnormSrgb,\n                wgt::AstcBlock::B8x5 => tf::Astc8x5UnormSrgb,\n                wgt::AstcBlock::B8x6 => tf::Astc8x6UnormSrgb,\n                wgt::AstcBlock::B8x8 => tf::Astc8x8UnormSrgb,\n                wgt::AstcBlock::B10x5 => tf::Astc10x5UnormSrgb,\n                wgt::AstcBlock::B10x6 => tf::Astc10x6UnormSrgb,\n                wgt::AstcBlock::B10x8 => tf::Astc10x8UnormSrgb,\n                wgt::AstcBlock::B10x10 => tf::Astc10x10UnormSrgb,\n                wgt::AstcBlock::B12x10 => tf::Astc12x10UnormSrgb,\n                wgt::AstcBlock::B12x12 => tf::Astc12x12UnormSrgb,\n            },\n            wgt::AstcChannel::Hdr => {\n                unimplemented!(\"Format {texture_format:?} has no WebGPU equivalent\")\n            }\n        },\n        _ => unimplemented!(\"Format {texture_format:?} has no WebGPU equivalent\"),\n    }\n}\n\nfn map_texture_component_type(\n    sample_type: wgt::TextureSampleType,\n) -> webgpu_sys::GpuTextureSampleType {\n    use webgpu_sys::GpuTextureSampleType as ts;\n    use wgt::TextureSampleType;\n    match sample_type {\n        TextureSampleType::Float { filterable: true } => ts::Float,\n        TextureSampleType::Float { filterable: false } => ts::UnfilterableFloat,\n        TextureSampleType::Sint => ts::Sint,\n        TextureSampleType::Uint => ts::Uint,\n        TextureSampleType::Depth => ts::Depth,\n    }","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu/src/backend/webgpu.rs#L341-L377","documentation":"Panic in the WebGPU backend's map_texture_format: the wgpu texture format has no equivalent in the browser's GPUTextureFormat (e.g. a native-only format). Any operation needing the JS-side format (create_texture, create_view, pipeline setup) aborts; the faulty input is texture_format.","triggerScenarios":"Thrown at wgpu/src/backend/webgpu.rs:359 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a format that exists in the WebGPU JS API when targeting WASM","Query/validate the format against map_texture_format support before creating resources on the web backend"],"exampleFix":null,"handlingStrategy":"validation","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"}