{"record":{"id":"86330d5fcfcca4aa","repo":"gfx-rs/wgpu","slug":"is-not-enabled-for-this-backend-86330d","errorCode":null,"errorMessage":"{:?} is not enabled for this backend","messagePattern":"(.+?) is not enabled for this backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/metal/device.rs","lineNumber":1683,"sourceCode":"                        ms_info = Some(super::PipelineStageInfo {\n                            immediates: desc.layout.immediates_infos.ms,\n                            sizes_slot: desc.layout.per_stage_map.ms.sizes_buffer,\n                            sized_bindings: ms.sized_bindings,\n                            vertex_buffer_mappings: vec![],\n                            library: Some(ms.library),\n                            raw_wg_size: ms.wg_size,\n                            work_group_memory_sizes: ms.wg_memory_sizes,\n                        });\n                    }\n\n                    MetalGenericRenderPipelineDescriptor::Mesh(descriptor)\n                }\n            };\n\n            let raw_triangle_fill_mode = match desc.primitive.polygon_mode {\n                wgt::PolygonMode::Fill => MTLTriangleFillMode::Fill,\n                wgt::PolygonMode::Line => MTLTriangleFillMode::Lines,\n                wgt::PolygonMode::Point => panic!(\n                    \"{:?} is not enabled for this backend\",\n                    wgt::Features::POLYGON_MODE_POINT\n                ),\n            };\n\n            // Fragment shader\n            let fs_info = match desc.fragment_stage {\n                Some(ref stage) => {\n                    let fs = self.load_shader(\n                        stage,\n                        &[],\n                        desc.layout,\n                        primitive_class,\n                        naga::ShaderStage::Fragment,\n                    )?;\n\n                    unsafe { descriptor.setFragmentFunction(Some(&fs.function)) };\n                    if supports_mutability {","sourceCodeStart":1665,"sourceCodeEnd":1701,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/metal/device.rs#L1665-L1701","documentation":"Metal does not support the Point polygon fill mode, so when creating a render pipeline whose primitive state requests `PolygonMode::Point`, wgpu-hal's Metal backend panics with a message pointing at `Features::POLYGON_MODE_POINT`. This feature is only available on backends that implement point fill (e.g. Vulkan), and the panic fires because the pipeline creation reached the HAL without the mode being rejected earlier.","triggerScenarios":"Calling `device.create_render_pipeline` (or `create_render_bundle`) on the Metal backend with `primitive.polygon_mode == PolygonMode::Point` in the `PrimitiveState`, regardless of whether the feature was requested on the device.","commonSituations":"Porting an app from Vulkan/DX12 (where point fill works) to macOS/iOS; sharing pipeline descriptors across backends; enabling wireframe-style debugging via point rasterization on a Mac.","solutions":["Use PolygonMode::Fill or PolygonMode::Line instead of Point on the Metal backend","Gate the polygon mode by backend: select Point only when running on backends that support it","Check adapter.get_info().backend at startup and adapt pipeline configuration","If point rendering is needed, emulate with point-list topology (PrimitiveTopology::PointList) plus a fragment shader"],"exampleFix":"// before\nlet primitive = wgt::PrimitiveState { polygon_mode: wgt::PolygonMode::Point, ..Default::default() };\n// after\nlet polygon_mode = if is_apple_gpu { wgt::PolygonMode::Fill } else { wgt::PolygonMode::Point };\nlet primitive = wgt::PrimitiveState { polygon_mode, ..Default::default() };","handlingStrategy":"validation","validationCode":"if cfg!(target_os = \"macos\") && desc.primitive.polygon_mode == wgt::PolygonMode::Point {\n    return Err(\"POLYGON_MODE_POINT unsupported on Metal\");\n}","typeGuard":null,"tryCatchPattern":"std::panic::catch_unwind(|| device.create_render_pipeline(&desc))","preventionTips":["Never use PolygonMode::Point on Apple/Metal targets","Check adapter backend info before configuring pipelines","Prefer PrimitiveTopology::PointList for point rendering"],"tags":["panic","metal","polygon-mode","unsupported-feature","render-pipeline"],"backgroundTag":"unsupported-backend-feature","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}