gfx-rs/wgpu · error
not implemented
Error message
not implemented
What it means
Panic in naga's SPIR-V backend: Load::from_image_expr hit an image with ImageClass::External, which the Vulkan writer has no SPIR-V counterpart for (external images are Metal-only). The faulty input is a module using an external image while targeting SPIR-V.
Source
Thrown at naga/src/back/spv/image.rs:121
type_id: Word,
/// The id of the image being accessed.
image_id: Word,
}
impl Load {
fn from_image_expr(
ctx: &mut BlockContext<'_>,
image_id: Word,
image_class: crate::ImageClass,
result_type_id: Word,
) -> Result<Load, Error> {
let opcode = match image_class {
crate::ImageClass::Storage { .. } => spirv::Op::ImageRead,
crate::ImageClass::Depth { .. } | crate::ImageClass::Sampled { .. } => {
spirv::Op::ImageFetch
}
crate::ImageClass::External => unimplemented!(),
};
// `OpImageRead` and `OpImageFetch` instructions produce vec4<f32>
// values. Most of the time, we can just use `result_type_id` for
// this. The exception is that `Expression::ImageLoad` from a depth
// image produces a scalar `f32`, so in that case we need to find
// the right SPIR-V type for the access instruction here.
let type_id = match image_class {
crate::ImageClass::Depth { .. } => ctx.get_numeric_type_id(NumericType::Vector {
size: crate::VectorSize::Quad,
scalar: crate::Scalar::F32,
}),
_ => result_type_id,
};
Ok(Load {
opcode,
type_id,View on GitHub (pinned to 3e11ff59bf)
Solutions
- Do not use external textures/images when compiling shaders to SPIR-V
- Target MSL when external images are required
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at naga/src/back/spv/image.rs:121 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03).
Data as JSON: /api/errors/1d013042f782e4a2.
Report an issue: GitHub.