-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
Currently, spirv out ignores RayQueryFunction::Terminate. On metal this is converted to .abort, Although there are no docs for this function (the reason I didn't realize this for ages), spirv-cross directly converts from glsl's rayQueryTerminateEXT (which is the same as spirv's). It also translates to .Abort on dx12, which has very similar documentation to spirv's OpRayQueryTerminateKHR, only it's allowed in more places.
Line 1866 in 3a157f7
| crate::RayQueryFunction::Terminate => {} |
Repro steps
Look at naga napshots (
wgpu/naga/tests/out/hlsl/wgsl-ray-query.hlsl
Line 161 in 3a157f7
| rq.Abort(); |
wgpu/naga/tests/out/spv/wgsl-ray-query.spvasm
Lines 536 to 537 in 3a157f7
| %362 = OpLabel | |
| OpReturn |
Expected vs observed behavior
We should be outputting something that does the same thing as the other backends.
Extra materials
spirv-cross' glsl out (maybe glsl in, idk)
https://github.com/KhronosGroup/SPIRV-Cross/blob/8d838b4e2e1eb36deb292f89b8b5fc6ce84bf02c/shaders-msl/comp/ray-query.spv14.vk.ios.msl24..invalid.comp#L37
spirv-cross' msl out
https://github.com/KhronosGroup/SPIRV-Cross/blob/8d838b4e2e1eb36deb292f89b8b5fc6ce84bf02c/reference/shaders-msl/comp/ray-query.spv14.vk.ios.msl24..invalid.comp#L56
Platform
N/a