{"record":{"id":"8908dcd027ed66af","repo":"gfx-rs/wgpu","slug":"not-implemented-8908dc","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/metal/device.rs","lineNumber":156,"sourceCode":"        wgt::VertexFormat::Float32x2 => nt::VertexFormat::Float32x2,\n        wgt::VertexFormat::Float32x3 => nt::VertexFormat::Float32x3,\n        wgt::VertexFormat::Float32x4 => nt::VertexFormat::Float32x4,\n        wgt::VertexFormat::Uint32 => nt::VertexFormat::Uint32,\n        wgt::VertexFormat::Uint32x2 => nt::VertexFormat::Uint32x2,\n        wgt::VertexFormat::Uint32x3 => nt::VertexFormat::Uint32x3,\n        wgt::VertexFormat::Uint32x4 => nt::VertexFormat::Uint32x4,\n        wgt::VertexFormat::Sint32 => nt::VertexFormat::Sint32,\n        wgt::VertexFormat::Sint32x2 => nt::VertexFormat::Sint32x2,\n        wgt::VertexFormat::Sint32x3 => nt::VertexFormat::Sint32x3,\n        wgt::VertexFormat::Sint32x4 => nt::VertexFormat::Sint32x4,\n        wgt::VertexFormat::Unorm10_10_10_2 => nt::VertexFormat::Unorm10_10_10_2,\n        wgt::VertexFormat::Unorm8x4Bgra => nt::VertexFormat::Unorm8x4Bgra,\n\n        wgt::VertexFormat::Float64\n        | wgt::VertexFormat::Float64x2\n        | wgt::VertexFormat::Float64x3\n        | wgt::VertexFormat::Float64x4 => {\n            unimplemented!()\n        }\n    }\n}\n\nimpl super::Device {\n    fn load_shader(\n        &self,\n        stage: &crate::ProgrammableStage<super::ShaderModule>,\n        vertex_buffer_mappings: &[naga::back::msl::VertexBufferMapping],\n        layout: &super::PipelineLayout,\n        primitive_class: MTLPrimitiveTopologyClass,\n        naga_stage: naga::ShaderStage,\n    ) -> Result<CompiledShader, crate::PipelineError> {\n        match stage.module.source {\n            ShaderModuleSource::Naga(ref naga_shader) => {\n                let stage_bit = map_naga_stage(naga_stage);\n                let (module, module_info) = naga::back::pipeline_constants::process_overrides(\n                    &naga_shader.module,","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/metal/device.rs#L138-L174","documentation":"`convert_vertex_format_to_naga` in the Metal backend panics with `unimplemented!()` for the 64-bit float vertex formats (Float64..Float64x4) when translating a vertex format for naga/MSL shader input. Metal does not support double-precision vertex attributes, so the conversion is deliberately unimplemented.","triggerScenarios":"Creating a render pipeline on Metal whose vertex buffer layout includes VertexFormat::Float64, Float64x2, Float64x3, or Float64x4; `convert_vertex_format_to_naga` is invoked while building the MSL attribute mapping.","commonSituations":"Vertex buffers shared with desktop GL/Vulkan code using GL_DOUBLE attributes; scientific/precision-sensitive geometry data on Metal.","solutions":["Use f32 vertex formats (Float32xN) and convert data at upload time","Reformat the vertex buffer to store u32 pairs for high-precision values and reconstruct in the shader","Validate layouts before creating render pipelines to reject f64 formats on Metal"],"exampleFix":"// before\n{ format: VertexFormat::Float64x2, offset: 0, shader_location: 1 }\n// after\n{ format: VertexFormat::Float32x2, offset: 0, shader_location: 1 }","handlingStrategy":"validation","validationCode":"if has_f64_vertex_format(&vertex_state.buffers) { reject pipeline creation on Metal before calling create_render_pipeline }","typeGuard":"fn is_f64_format(f: VertexFormat) -> bool {\n    matches!(f, VertexFormat::Float64 | VertexFormat::Float64x2 | VertexFormat::Float64x3 | VertexFormat::Float64x4)\n}","tryCatchPattern":null,"preventionTips":["Validate VertexBufferLayout formats before create_render_pipeline","Avoid GL_DOUBLE-derived layouts when porting to Metal","Document f64 vertex data as unsupported on Metal in project docs"],"tags":["rust","metal","vertex-format","naga","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"}