Shaders: translate the 32-bit and 64-bit scalar zero-bit counts #171
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/171"
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 GeaorgeAyvazov on 2026-11-24T22:06:52Z.
The decoder and IR already represent S_BCNT0_I32_B32 and S_BCNT0_I32_B64, but scalar lowering falls through to the unsupported-instruction path. This translates both to the operand width minus its population count, using the existing dword pair representation for the wide form. SCC reflects whether the resulting count is nonzero.
The regression builds two synthetic GFX10 compute shaders, consumes the count and SCC together, and checks the UAV output for all zeros, all ones, asymmetric halves, and mixed bits. It uses the normal shader translator and D3D12 test harness. No game assets.
Tested on Windows with Rust 1.98.1. The focused test passed on RTX 3070 Ti Laptop and Iris Xe with temporary explicit DXGI selection, and through the ordinary hardware/WARP harness. Running the full victory-shader library suite with the new test on the original emitter gave 203 passed, 8 failed, 2 ignored. With this patch: 204 passed, 7 failed, 2 ignored. The same seven existing intersection, LDS and wave64 tests failed both times. No title-level performance or visual claims.
Implemented and tested with OpenAI Codex.
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.