Shaders: verify no-hit ray results on D3D12 and skip unused ray operands #1218
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1221"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by BradRoland on 2026-11-26T00:30:20Z.
The optional no-hit translation from
96ff135only needs the node kind in the low pointer word. It was resolving every ray operand and emitting ten float casts before returning. This change resolves the pointer for the no-hit result and constructs the ray only on the intersection path.The regression test now translates in fresh processes using the actual launch settings. With
VICTORY_BVH_NO_HIT=1and the builder off, it dispatches both pointer widths with generated ray records, no node bytes, and no scene-directory or fault bindings. It checks all four result words per lane for all eight node kinds and verifies that masked lanes retain their prior values. With the builder enabled as well, both widths request the scene directory and fault bindings again.On a GeForce RTX 4080 and WARP, the readbacks passed. As a negative control, locally removing the lane guard made hardware batch 9, lane 20 overwrite
[1, 2, 3, 4]with the miss result. The submitted shader preserves that lane.With optimizer passes disabled the synthetic no-hit DXIL shrank by 40 bytes for each width. With the default passes the sizes were 2,300 bytes (64-bit) and 2,308 bytes (32-bit), the same as before. Gameplay lighting and frame time remain unmeasured.
The complete shader library suite passed on Windows (217 passed, 3 ignored), and the seven intersection tests passed with diagnostics enabled.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.