Shaders: lane masks read through a join need the console's wave size; tests skip devices without 32-lane waves (#356) #377
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!377
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-377"
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?
@RenzoWit35 on GitHub · 2026-11-25 00:09 UTC · original
RenzoWit35:fix/356-host-wave-size→main· +129 −22 · 5 files · 2 commits · openAddresses two of the three causes behind the six failures in #356. Those failures come from a host whose waves are not 32 lanes wide; the reported numbers point to 16-lane waves.
What changed
1. A lane mask that reaches data through a join now requires the console's wave size (
d0602c7)reads_mask_as_dataonly counted a value as a mask when that value itself was a known mask. Ina_lane_mask_joined_with_a_number_is_read_as_the_number_it_is,s20holdsvcc_loon one path and5on the other. After the join it is a phi, which the check did not count, so the program declared noWaveSize. On a 32-lane host that goes unnoticed. On a 16-lane host the ballot covers 16 lanes, which is the65535vs4294967295in the report.The new
mask_values(inemit/lower.rs) adds every phi that has a mask among its incoming values, directly or through other phis.reads_mask_as_datatakes that set, computed once per program, in both the lowering andown_bits. Instructions whose result is a mask still don't count as data reads.New GPU-free test: the program above must lower with
wave_size == Some(32). It fails with the old check.2. Shader tests skip, rather than fail, a
WaveSize(32)program on a device without 32-lane waves (23b63af)Host::wave_lanes()readsWaveLaneCountMin/Max(D3D12 OPTIONS1), andHost::runs_waves_of(n)checks n against that range.run_cases_onnow skips a refused pipeline only when the device cannot run 32-lane waves; on any other device a refused pipeline still panics. This coversds_min_max_f32_order_floats_and_return_the_old_value("compute_pipeline failed: The parameter is incorrect" in #356).on_the_cardinwave64_testsalready skipped refused pipelines.New test
devices_report_their_wave_sizeschecks that each device reports a power-of-two range.Testing
cargo test --workspacepasses on an RTX 4070 Ti (32–32 lanes), andcargo clippy --workspace --all-targetsis clean.WaveSize(32)with the same error as in #356. With WARP added temporarily to theds_min_maxorder test, the WARP run is now skipped with a message instead of failing.For reviewers
WaveSize(32). On NVIDIA (host_max_wave() == 32), some console wave64 programs may move to the exchange path or keep 64-lane waves and be refused. Avictory translaterun on the title's shaders before and after this branch would show the change; I had no game files configured to run it.*_node_test_*failures in #356. They returnbvh::MISSfor a ray that hits a triangle exactly at a vertex (direction[0, 2, 5]), where two edge cross-products are exactly 0. Contractingp*q - r*sinto an FMA would flip that hit to a miss, but our DXIL carries no fast-math flags, so this needs the reporter's GPU and driver to confirm.🤖 Generated with Claude Code
@HAL9000RELOADED on GitHub · 2026-11-25 19:29 UTC · original
RX 7900 XTX (RDNA3), Windows 10 + #402 for SM 6.6, main
d510ee4: both new tests pass on the card with this PR. No other test changed. Run table: #129 (#129).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.