{"record":{"id":"327bff9a3283cb58","repo":"gfx-rs/wgpu","slug":"ray-tracing-pipelines-not-yet-implemented","errorCode":null,"errorMessage":"ray tracing pipelines not yet implemented","messagePattern":"ray tracing pipelines not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/dx12/device.rs","lineNumber":2314,"sourceCode":"        _desc: &crate::RayTracingPipelineDescriptor<\n            super::PipelineLayout,\n            super::ShaderModule,\n            super::PipelineCache,\n        >,\n    ) -> Result<<Self::A as crate::Api>::RayTracingPipeline, crate::PipelineError> {\n        unreachable!(\"ray tracing pipelines not yet implemented\")\n    }\n\n    unsafe fn destroy_ray_tracing_pipeline(&self, _pipeline: super::RayTracingPipeline) {\n        unreachable!(\"ray tracing pipelines not yet implemented\")\n    }\n\n    unsafe fn get_raytracing_pipeline_group_data(\n        &self,\n        _pipeline: &super::RayTracingPipeline,\n        _groups: core::ops::Range<u32>,\n    ) -> Result<Vec<u8>, crate::DeviceError> {\n        unimplemented!(\"ray tracing pipelines not yet implemented\")\n    }\n\n    unsafe fn create_pipeline_cache(\n        &self,\n        _desc: &crate::PipelineCacheDescriptor<'_>,\n    ) -> Result<super::PipelineCache, crate::PipelineCacheError> {\n        Ok(super::PipelineCache)\n    }\n    unsafe fn destroy_pipeline_cache(&self, _: super::PipelineCache) {}\n\n    unsafe fn create_query_set(\n        &self,\n        desc: &wgt::QuerySetDescriptor<crate::Label>,\n    ) -> Result<super::QuerySet, crate::DeviceError> {\n        let (heap_ty, raw_ty) = match desc.ty {\n            wgt::QueryType::Occlusion => (\n                Direct3D12::D3D12_QUERY_HEAP_TYPE_OCCLUSION,\n                Direct3D12::D3D12_QUERY_TYPE_BINARY_OCCLUSION,","sourceCodeStart":2296,"sourceCodeEnd":2332,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/dx12/device.rs#L2296-L2332","documentation":"The DX12 HAL does not implement ray tracing pipelines; get_raytracing_pipeline_group_data is a hard stub that panics with 'ray tracing pipelines not yet implemented'. Any call into the ray-tracing pipeline API on this backend is guaranteed to panic.","triggerScenarios":"Calling get_raytracing_pipeline_group_data (part of the hal ray-tracing pipeline surface) on a Dx12 device — e.g. while creating/inspecting shader binding table group data for a ray tracing pipeline.","commonSituations":"Trying to use ray tracing through wgpu-hal's experimental API on DX12; assuming feature parity with the Vulkan backend; enabling ray tracing feature flags without checking backend support.","solutions":["Use the Vulkan backend (or another backend with ray tracing implemented) for ray tracing workloads","Check backend ray tracing support before calling any ray-tracing API (feature/back capability probe)","Implement the DX12 path with ID3D12Device5 RayTracingPipeline subobjects if you control the fork","Downgrade to compute-based ray tracing (BVH traversal in compute shaders) when targeting DX12"],"exampleFix":"// before\nlet groups = device.get_raytracing_pipeline_group_data(&pipeline, 0..n); // panics on dx12\n// after\nassert!(matches!(backend, Backend::Vulkan), \"ray tracing only supported on vulkan\");\nlet groups = device.get_raytracing_pipeline_group_data(&pipeline, 0..n);","handlingStrategy":"fallback","validationCode":"// before using any ray tracing API, confirm backend support:\nlet rt_supported = matches!(backend, wgpu::Backend::Vulkan); // dx12/metal/gles lack it","typeGuard":"fn supports_ray_tracing(b: wgpu::Backend) -> bool { matches!(b, wgpu::Backend::Vulkan) }","tryCatchPattern":"// hal methods panic, not Result; wrap usage behind a capability check:\nif !supports_ray_tracing(backend) { return Err(\"ray tracing unavailable on this backend\"); }","preventionTips":["Never call ray-tracing hal APIs on the DX12 backend","Probe backend/feature support at init and fail fast","Track wgpu-hal releases for DX12 ray tracing implementation","Provide compute-shader ray tracing fallback"],"tags":["wgpu-hal","dx12","ray-tracing","unimplemented"],"backgroundTag":"feature-not-supported-by-backend","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}