{"record":{"id":"cde17b05aeb92df4","repo":"zed-industries/zed","slug":"could-not-create-render-pipeline-state","errorCode":null,"errorMessage":"could not create render pipeline state","messagePattern":"could not create render pipeline state","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_apple/src/metal_renderer.rs","lineNumber":1307,"sourceCode":"        .expect(\"error locating fragment function\");\n\n    let descriptor = metal::RenderPipelineDescriptor::new();\n    descriptor.set_label(label);\n    descriptor.set_vertex_function(Some(vertex_fn.as_ref()));\n    descriptor.set_fragment_function(Some(fragment_fn.as_ref()));\n    let color_attachment = descriptor.color_attachments().object_at(0).unwrap();\n    color_attachment.set_pixel_format(pixel_format);\n    color_attachment.set_blending_enabled(true);\n    color_attachment.set_rgb_blend_operation(metal::MTLBlendOperation::Add);\n    color_attachment.set_alpha_blend_operation(metal::MTLBlendOperation::Add);\n    color_attachment.set_source_rgb_blend_factor(metal::MTLBlendFactor::SourceAlpha);\n    color_attachment.set_source_alpha_blend_factor(metal::MTLBlendFactor::One);\n    color_attachment.set_destination_rgb_blend_factor(metal::MTLBlendFactor::OneMinusSourceAlpha);\n    color_attachment.set_destination_alpha_blend_factor(metal::MTLBlendFactor::One);\n\n    device\n        .new_render_pipeline_state(&descriptor)\n        .expect(\"could not create render pipeline state\")\n}\n\nfn build_path_sprite_pipeline_state(\n    device: &metal::DeviceRef,\n    library: &metal::LibraryRef,\n    label: &str,\n    vertex_fn_name: &str,\n    fragment_fn_name: &str,\n    pixel_format: metal::MTLPixelFormat,\n) -> metal::RenderPipelineState {\n    let vertex_fn = library\n        .get_function(vertex_fn_name, None)\n        .expect(\"error locating vertex function\");\n    let fragment_fn = library\n        .get_function(fragment_fn_name, None)\n        .expect(\"error locating fragment function\");\n\n    let descriptor = metal::RenderPipelineDescriptor::new();","sourceCodeStart":1289,"sourceCodeEnd":1325,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_apple/src/metal_renderer.rs#L1289-L1325","documentation":"After configuring the RenderPipelineDescriptor, device.newRenderPipelineState failed (returned an error) and the code unwraps/panics: the GPU rejected the pipeline (unsupported pixel format, invalid blend settings, missing functions). Pipeline creation failure prevents any drawing.","triggerScenarios":"Thrown at crates/gpui_apple/src/metal_renderer.rs:1300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the pixel format is supported on the target device (MTLPixelFormat::BGRA8Unorm)","Log the underlying NSError detail to identify the rejected state","Verify vertex/fragment functions were set and compatible with the vertex descriptor","Update GPU drivers or fall back to a supported configuration"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}