{"record":{"id":"029dbfc4755b2163","repo":"gfx-rs/wgpu","slug":"not-implemented-029dbf","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/metal/conv.rs","lineNumber":245,"sourceCode":"        Vf::Snorm16x4 => MTL::Short4Normalized,\n        Vf::Uint16x4 => MTL::UShort4,\n        Vf::Sint16x4 => MTL::Short4,\n        Vf::Float16x4 => MTL::Half4,\n        Vf::Uint32 => MTL::UInt,\n        Vf::Sint32 => MTL::Int,\n        Vf::Float32 => MTL::Float,\n        Vf::Uint32x2 => MTL::UInt2,\n        Vf::Sint32x2 => MTL::Int2,\n        Vf::Float32x2 => MTL::Float2,\n        Vf::Uint32x3 => MTL::UInt3,\n        Vf::Sint32x3 => MTL::Int3,\n        Vf::Float32x3 => MTL::Float3,\n        Vf::Uint32x4 => MTL::UInt4,\n        Vf::Sint32x4 => MTL::Int4,\n        Vf::Float32x4 => MTL::Float4,\n        Vf::Unorm10_10_10_2 => MTL::UInt1010102Normalized,\n        Vf::Unorm8x4Bgra => MTL::UChar4Normalized_BGRA,\n        Vf::Float64 | Vf::Float64x2 | Vf::Float64x3 | Vf::Float64x4 => unimplemented!(),\n    }\n}\n\npub fn map_index_format(format: wgt::IndexFormat) -> (u64, MTLIndexType) {\n    match format {\n        wgt::IndexFormat::Uint16 => (2, MTLIndexType::UInt16),\n        wgt::IndexFormat::Uint32 => (4, MTLIndexType::UInt32),\n    }\n}\n\npub fn map_step_mode(mode: wgt::VertexStepMode) -> MTLVertexStepFunction {\n    match mode {\n        wgt::VertexStepMode::Vertex => MTLVertexStepFunction::PerVertex,\n        wgt::VertexStepMode::Instance => MTLVertexStepFunction::PerInstance,\n    }\n}\n\npub fn map_stencil_op(op: wgt::StencilOperation) -> MTLStencilOperation {","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/metal/conv.rs#L227-L263","documentation":"`map_vertex_format` in the Metal backend's `conv.rs` panics with `unimplemented!()` for 64-bit float vertex formats (Float64, Float64x2, Float64x3, Float64x4). Metal Shading Language / MTLVertexFormat has no direct double-precision vertex attribute support in the set this backend maps, so the conversion is intentionally unimplemented.","triggerScenarios":"Creating a vertex buffer layout (or acceleration structure descriptor, via `map_acceleration_structure_descriptor`) whose `VertexFormat` is one of the four f64 formats, on the Metal backend.","commonSituations":"Porting Vulkan/DX12 desktop code that uses double-precision vertex data (common in CAD/scientific apps) to Metal; WGSL shaders/vertex layouts authored with f64 attributes.","solutions":["Change vertex formats to f32 variants (Float32, Float32x2, Float32x3, Float32x4)","Convert f64 data to f32 on the CPU when uploading the vertex buffer","Encode large-precision values as u32/f32 pairs with a custom transform in the vertex shader"],"exampleFix":"// before\nattributes: &[VertexAttribute { format: VertexFormat::Float64x3, offset: 0, shader_location: 0 }]\n// after\nattributes: &[VertexAttribute { format: VertexFormat::Float32x3, offset: 0, shader_location: 0 }]","handlingStrategy":"validation","validationCode":"fn has_f64_vertex_format(layouts: &[VertexBufferLayout]) -> bool {\n    layouts.iter().flat_map(|l| &l.attributes).any(|a| matches!(a.format,\n        VertexFormat::Float64 | VertexFormat::Float64x2 | VertexFormat::Float64x3 | VertexFormat::Float64x4))\n}","typeGuard":"fn is_f64_format(f: VertexFormat) -> bool {\n    matches!(f, VertexFormat::Float64 | VertexFormat::Float64x2 | VertexFormat::Float64x3 | VertexFormat::Float64x4)\n}","tryCatchPattern":null,"preventionTips":["Standardize on Float32 vertex formats across all backends","Convert f64 source data to f32 during buffer upload","Add a startup assert that no f64 vertex formats are requested"],"tags":["rust","metal","vertex-format","f64"],"backgroundTag":"unsupported-f64-vertex-format","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}