Shaders: request WaveSize(32) when a scalar join reads a lane mask #387
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/387"
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 avt0m4t48 on 2026-11-25T00:14:27Z.
Refs #356.
When a Wave32 compute shader joins a lane mask and a scalar number, the incoming mask is materialized as a DXIL ballot while lowering the join. Main can emit that ballot without a fixed wave size or the console's lane ordering. The resulting mask can contain only 16 bits if the shader is scheduled with 16 lanes.
When the join actually materializes a ballot without the native Wave32 layout, run lowering again with that layout. This applies to guest Wave32 compute programs. The case where the two incoming values are ordinary numbers keeps the default wave-size behavior.
The checked-in regression failed on the original emitter. On the branch based on
31714de, the shader suite completed with 172 passed and two ignored. The Windows MSVC all-feature shader test targets type-checked with warnings denied. Microsoft DXIL validation accepted the exact synthetic shader on both revisions. The disassembly hadwaveActiveBallotwithout a wave size on main andWaveSize=32on this branch. The numeric control had neither the ballot nor a wave-size declaration.The laptop in #356 has not run this branch. Adapter selection remains relevant to diagnosing that report, and the other five failures need their own checks.
AI-assisted using Codex.
test result: FAILED. 204 passed; 6 failed; 2 ignored; 0 measured; 0 filtered out; finished in 6.90s#356View 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.