Repository navigation
Shaders: lower s_bitset{0,1}_b64, s_brev_b64 and s_bitreplicate_b64_b32 - #166
n-romanovich wants to merge 1 commit into
Conversation
|
Tested
No game data used. |
…nd s_bitreplicate_b64_b32) into the integration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
|
RDNA2 hardware check of the four rules: all match. AMD Radeon iGPU of a Ryzen 7 9800X3D, gfx1036 (RDNA2), AMD driver 32.0.21042.62, Windows 11 Pro 26200. A HIP kernel (assembled by the AMD driver's amd_comgr) runs each instruction on literal operands, then copies the SGPRs out. There are 24 cases: random 64-bit destinations, with src0 drawn from
AI use: Claude Code (Claude Opus 5.5) wrote the probes, ran them on the GPU above and drafted this comment; the numbers come from the hardware run. |
|
Tested head Merged onto current There's no text conflict, so GitHub still shows the PR as mergeable, but merging it as it is would break With
AI-assisted (Claude Code). |
|
Merged onto Checked with CI's steps (both clippy runs with |
|
Thanks for testing and pointing this out, @alexdeliu! Merged latest main and updated resource::track in the test to pass Some(&st) per 6638098. Verified with cargo clippy --all-targets --locked -- -D warnings and re-ran the GPU test — both compile cleanly and pass with 0 warnings. |
|
@n-romanovich rechecked |
|
Automated triage for the maintainers. Recommended for a maintainer's look. The verdict hasn't changed. The new head is a single commit rebased onto current CI: passing. #1684 also lowers these four instructions. Whichever lands second should drop the overlap. Generated by Claude Code |
7e84706 to
634f6f2
Compare
|
@Marvisak, thanks for the review. Rebased onto Re-ran |
4cdd241 to
0c84774
Compare
0c84774 to
0e2e4a6
Compare
|
Verification on Windows 10 19045 (RX 7800 XT), your head
No objection from reading the diff: the 64-bit shifts and bit-replicate go through the existing |
…s_bitreplicate_b64_b32
Implements DXIL lowering for four 64-bit scalar bit-manipulation instructions in
victory-shaderusing pure 32-bit DXIL operations (noINT64capability required):s_bitset0_b64,s_bitset1_b64: reads both dwords of the 64-bit destination, selects the low/high dword mask viasrc0 & 32, and clears or sets bitsrc0 & 31without modifyingSCC.s_brev_b64: swaps and bit-reverses the low and high dwords via DXILunary.i32(30).s_bitreplicate_b64_b32: interleaves the low and high 16-bit halves ofsrc0into duplicated bit pairs across the 64-bit destination.Testing
emit::tests::scalar_bitops_b64_execute_on_gpuincrates/victory-shader/src/emit/mod.rscovering bit set/clear across both dwords, 64-bit bit reversal, and 32-to-64 bit replication.dxil.dlland executed on D3D12 (NVIDIA GeForce RTX 5060 Ti).cargo fmt -p victory-shader -- --check: passed.cargo clippy -p victory-shader --all-targets -- -D warnings: passed (0 warnings).cargo xtask policy: passed (asset policy: 151 files ok).cargo test -p victory-shader: 70 passed, 0 failed.