Skip to content

[spv-out] rayQueryTerminate is ignored. #8577

@Vecvec

Description

@Vecvec

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.

crate::RayQueryFunction::Terminate => {}

Repro steps
Look at naga napshots (

vs
%362 = OpLabel
OpReturn
(empty block)

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

Metadata

Metadata

Assignees

Labels

area: naga back-endOutputs of naga shader conversionfeature: raytracingIssues with the Ray Tracing Native Featurelang: SPIR-VVulkan's Shading LanguagenagaShader Translatortype: bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions