Ray-query compute pipelines fail with VK_ERROR_UNKNOWN on AMD Windows (RX 6900 XT) #2339

Open
opened 2026-11-26 10:18:35 +00:00 by github-bot · 0 comments
Owner

@⁠carbonimax on GitHub · 2026-11-17 05:58 UTC · original

With --native-rt, a compute shader that the RayQueryTraversal pass rewrites fails in vkCreateComputePipelines with VK_ERROR_UNKNOWN (-13). The test is RayQueryTraversal in shader_recompiler_compute_tests --bvh-mirror-only. The setup is an AMD RX 6900 XT on Windows, driver version 0x800161, Vulkan 1.4.315. The SPIR-V module passes spirv-val.

The trigger is the pipeline layout, not the module. This driver rejects any ray-query pipeline whose layout has a descriptor set but no VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR binding. That includes an empty set, sets of any other descriptor type, and push-descriptor sets. The test's own GLSL ray-query shader fails the same way once it gets a set. A layout with no sets passes. So does the same layout plus one unused acceleration-structure binding.

The emulator always creates set 0 (CreateLayouts). It reaches the TLAS by address (OpConvertUToAccelerationStructureKHR), so it never has such a binding.

A workaround that works here: for shaders with info.ray_query, append an unused acceleration-structure binding (count 1) after the shader's bindings. With it, RayQueryTraversal and its wave64 variant pass, results included. Also give the descriptor pool acceleration-structure capacity for layouts that do not use push descriptors.

Found while porting e141b44a / 847f9b19 (shared-stack and nested BLAS walks with ray queries).

**@⁠carbonimax** on GitHub · 2026-11-17 05:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2339) With `--native-rt`, a compute shader that the RayQueryTraversal pass rewrites fails in `vkCreateComputePipelines` with `VK_ERROR_UNKNOWN` (-13). The test is `RayQueryTraversal` in `shader_recompiler_compute_tests --bvh-mirror-only`. The setup is an AMD RX 6900 XT on Windows, driver version 0x800161, Vulkan 1.4.315. The SPIR-V module passes spirv-val. The trigger is the pipeline layout, not the module. This driver rejects any ray-query pipeline whose layout has a descriptor set but no `VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR` binding. That includes an empty set, sets of any other descriptor type, and push-descriptor sets. The test's own GLSL ray-query shader fails the same way once it gets a set. A layout with no sets passes. So does the same layout plus one unused acceleration-structure binding. The emulator always creates set 0 (`CreateLayouts`). It reaches the TLAS by address (`OpConvertUToAccelerationStructureKHR`), so it never has such a binding. A workaround that works here: for shaders with `info.ray_query`, append an unused acceleration-structure binding (count 1) after the shader's bindings. With it, `RayQueryTraversal` and its wave64 variant pass, results included. Also give the descriptor pool acceleration-structure capacity for layouts that do not use push descriptors. Found while porting e141b44a / 847f9b19 (shared-stack and nested BLAS walks with ray queries).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:18:35 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#2339
No description provided.