Shaders: translate the 32-bit and 64-bit scalar zero-bit counts #171
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!171
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@GeaorgeAyvazov on GitHub · 2026-11-24 22:06 UTC · original
GeaorgeAyvazov:shader/scalar-zero-count→main· +40 −2 · 2 files · 1 commits · openThe 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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.