gfx-rs/wgpu · error
not implemented
Error message
not implemented
What it means
The GLES backend does not implement acceleration structure building; create_acceleration_structure-ish command entry (build_acceleration_structure) is an unimplemented!() stub. Any attempt to record a TLAS/BLAS build command on the GLES backend panics.
Source
Thrown at wgpu-hal/src/gles/command.rs:1287
indirect_offset: offset,
});
}
unsafe fn build_acceleration_structures<'a, T>(
&mut self,
_descriptor_count: u32,
_descriptors: T,
) where
super::Api: 'a,
T: IntoIterator<
Item = crate::BuildAccelerationStructureDescriptor<
'a,
super::Buffer,
super::AccelerationStructure,
>,
>,
{
unimplemented!()
}
unsafe fn place_acceleration_structure_barrier(
&mut self,
_barriers: crate::AccelerationStructureBarrier,
) {
unimplemented!()
}
unsafe fn copy_acceleration_structure_to_acceleration_structure(
&mut self,
_src: &super::AccelerationStructure,
_dst: &super::AccelerationStructure,
_copy: wgt::AccelerationStructureCopy,
) {
unimplemented!()
}
View on GitHub (pinned to 3e11ff59bf)
Solutions
- Do not use ray tracing APIs on the GLES backend; gate the feature per backend
- Route the workload to the Vulkan backend where acceleration structures are implemented
- Use a compute-shader fallback BVH approach on GLES
- Check backend capabilities before requesting AccelerationStructure features
Example fix
// before
encoder.build_acceleration_structure(&desc, ...); // panics on gles
// after
if device.features().contains(wgpu::Features::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE) {
encoder.build_acceleration_structure(&desc, ...);
} else { /* compute fallback */ } Defensive patterns
Strategy: fallback
Validate before calling
let as_supported = !matches!(backend, wgpu::Backend::Gles);
if !as_supported { /* use compute BVH fallback */ } Type guard
fn supports_acceleration_structures(b: wgpu::Backend) -> bool { !matches!(b, wgpu::Backend::Gles) } Try / catch
// panics by design; guard before recording:
if supports_acceleration_structures(backend) {
encoder.build_acceleration_structure(...);
} else { compute_fallback(); } Prevention
- Treat GLES as non-ray-tracing capable
- Check Features/Backend before recording AS commands
- Maintain a compute-based ray tracing fallback path
When it happens
Trigger: Recording an acceleration structure build command into an GLES command encoder (ray tracing API on OpenGL ES).
Common situations: Running ray-tracing code paths on a GLES backend (mobile/webGL-ish environments) that only supports them on Vulkan/DX12/Metal.
Related errors
- Buffers are required to build acceleration structures
- ray tracing pipelines not yet implemented
- not implemented
- Feature `MESH_SHADING` not enabled
- {:?} is not enabled for this backend
AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03).
Data as JSON: /api/errors/f416fe47658d182a.
Report an issue: GitHub.