-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spirv] Stop naga causing undefined behavior in rayQueryGet*Intersection
#6752
[spirv] Stop naga causing undefined behavior in rayQueryGet*Intersection
#6752
Conversation
…rt-undefined-behavior # Conflicts: # tests/tests/ray_tracing/as_build.rs
…andidate. This is because the requirements of spirv undefined behaviour require it like this.
…rt-undefined-behavior # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments on the tests
…to remove-rt-undefined-behavior
rayQueryGet*Intersection
rayQueryGet*Intersection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks needfully verbose but fine.
I've done a pass on the naga side, would like a final lookover of the naga side before this lands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Naga portion looks good. It's not pretty, but it's clean, and I don't see a better alternative.
…ehavior # Conflicts: # CHANGELOG.md # tests/tests/ray_tracing/as_build.rs
I think the MacOS CI fail is unrelated - This doesn't change any code to do with MacOS. |
Ooo we have a spuriously failing test! |
Connections
fixes #6731
Description
Naga previously unconditionally called operations that required the ray to hit something. This is undefined behavior according to the spirv raytracing spec. This caused seg-faults on lavapipe. This prevents that by separating the intersection getter into another function with conditional blocks.
Testing
added a test that previously failed (with a seg-fault) that now succeeds
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.