{"record":{"id":"346f222995363968","repo":"gfx-rs/wgpu","slug":"not-implemented-346f22","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/gles/conv.rs","lineNumber":228,"sourceCode":"        Vf::Snorm16x4 => (4, glow::SHORT, Vak::Float),\n        Vf::Uint16x4 => (4, glow::UNSIGNED_SHORT, Vak::Integer),\n        Vf::Sint16x4 => (4, glow::SHORT, Vak::Integer),\n        Vf::Float16x4 => (4, glow::HALF_FLOAT, Vak::Float),\n        Vf::Uint32 => (1, glow::UNSIGNED_INT, Vak::Integer),\n        Vf::Sint32 => (1, glow::INT, Vak::Integer),\n        Vf::Float32 => (1, glow::FLOAT, Vak::Float),\n        Vf::Uint32x2 => (2, glow::UNSIGNED_INT, Vak::Integer),\n        Vf::Sint32x2 => (2, glow::INT, Vak::Integer),\n        Vf::Float32x2 => (2, glow::FLOAT, Vak::Float),\n        Vf::Uint32x3 => (3, glow::UNSIGNED_INT, Vak::Integer),\n        Vf::Sint32x3 => (3, glow::INT, Vak::Integer),\n        Vf::Float32x3 => (3, glow::FLOAT, Vak::Float),\n        Vf::Uint32x4 => (4, glow::UNSIGNED_INT, Vak::Integer),\n        Vf::Sint32x4 => (4, glow::INT, Vak::Integer),\n        Vf::Float32x4 => (4, glow::FLOAT, Vak::Float),\n        Vf::Unorm10_10_10_2 => (4, glow::UNSIGNED_INT_2_10_10_10_REV, Vak::Float),\n        Vf::Unorm8x4Bgra => (glow::BGRA as i32, glow::UNSIGNED_BYTE, Vak::Float),\n        Vf::Float64 | Vf::Float64x2 | Vf::Float64x3 | Vf::Float64x4 => unimplemented!(),\n    };\n\n    super::VertexFormatDesc {\n        element_count,\n        element_format,\n        attrib_kind,\n    }\n}\n\npub fn map_filter_modes(\n    min: wgt::FilterMode,\n    mag: wgt::FilterMode,\n    mip: wgt::MipmapFilterMode,\n) -> (u32, u32) {\n    use wgt::FilterMode as Fm;\n    use wgt::MipmapFilterMode as Mfm;\n\n    let mag_filter = match mag {","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/gles/conv.rs#L210-L246","documentation":"describe_vertex_format in the GLES backend has no mapping for 64-bit float vertex formats (Float64, Float64x2, Float64x3, Float64x4) and panics with `unimplemented!()`. OpenGL ES does not support 64-bit (double) vertex attributes, unlike desktop GL/GL_ARB_vertex_attrib_64bit.","triggerScenarios":"Creating a render pipeline whose vertex buffer layout uses vertex_format: \"float64\", \"float64x2\", \"float64x3\" or \"float64x4\" while running on the GLES backend (e.g. WebGL2), which calls conv::describe_vertex_format during create_render_pipeline.","commonSituations":"Porting desktop (Vulkan/D3D) code using double-precision vertex data to a WebGL/GLES target; accidentally leaving debug f64 attributes in shaders/vertex layouts; targeting Android/iOS where GLES is the backend.","solutions":["Change the vertex format to f32 variants (float32, float32x2, ...) and convert doubles to floats on the CPU (or encode with a fixed-point/split-half encoding)","If double precision is required, pack doubles into two u32 components (float64 emulation via mathf64x2-style unpacking in the shader)","Validate vertex layouts at startup and reject float64 formats when the backend is GLES"],"exampleFix":"// before\nattributes: [wgt::VertexAttribute { format: wgt::VertexFormat::Float64x3, offset: 0, shader_location: 0 }]\n// after\nattributes: [wgt::VertexAttribute { format: wgt::VertexFormat::Float32x3, offset: 0, shader_location: 0 }]","handlingStrategy":"validation","validationCode":"fn assert_no_f64_vertex_layout(layout: &wgt::VertexBufferLayout) -> Result<(), String> {\n    for a in &layout.attributes {\n        if matches!(a.format, wgt::VertexFormat::Float64 | wgt::VertexFormat::Float64x2 | wgt::VertexFormat::Float64x3 | wgt::VertexFormat::Float64x4) {\n            return Err(format!(\"float64 vertex format not supported on GLES: {:?}\", a.format));\n        }\n    }\n    Ok(())\n}","typeGuard":"fn is_f64_vertex_format(f: wgt::VertexFormat) -> bool {\n    matches!(f, wgt::VertexFormat::Float64 | wgt::VertexFormat::Float64x2 | wgt::VertexFormat::Float64x3 | wgt::VertexFormat::Float64x4)\n}","tryCatchPattern":"match device.create_render_pipeline(&desc) {\n    Ok(p) => p,\n    Err(e) => { log::error!(\"pipeline creation failed (check float64 attributes on GLES): {e}\"); fallback_pipeline() }\n}","preventionTips":["Use Float32 vertex formats on GLES/WebGL targets","Convert doubles to f32 on the CPU or pack into u32 pairs and unpack in the shader","Audit vertex layouts when porting desktop pipelines to mobile/web"],"tags":["gles","vertex-format","float64","unimplemented"],"backgroundTag":"gles-unsupported-vertex-format","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}