Repository navigation
Conversation
…n the sign bit Both paths dropped the VOP3 ABS / NEG source modifiers of the shift-add ops: neg on the addend of v_lshl_add_u32 5, 2, 1 gave 21. RDNA2 applies them to the source's sign bit as on a float (x & 0x7fffffff, x ^ 0x80000000): 0x80000015 there. Measured by AnyPS5#25964 on gfx1036 and gfx1201 (196/196 words each). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on the sign bit Both paths dropped them too: neg on src1 of v_alignbit_b32 0, 1, 31 gave 0 for 1. RDNA2 applies them to bit 31 of each source, which a shift brings into the result from src1 (AnyPS5#25799, gfx1036; on src0 and the shift amount they cannot change the result, so applying them there is harmless). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested I ran the two checked-in VOP3 sign-bit fixtures on clean PR head Windows 11 Enterprise Evaluation (build 26200.9974), AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Rust and Cargo 1.100.0 ( $env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:TEMP = 'L:/XclTooling/pr2058'
$env:TMP = $env:TEMP
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = "$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64"
cargo test -p xcl --lib --no-run --message-format=json
# Executable reported by Cargo. The Arc lock covered only test execution.
$testExe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
foreach ($backend in '0', '1') {
$env:XCL_DIRECT_DXIL = $backend
& $testExe --exact gpu::recomp::tests::gpu_shift_add_abs_neg_act_on_the_sign_bit --nocapture --test-threads=1
& $testExe --exact gpu::recomp::tests::gpu_align_abs_neg_act_on_the_sign_bit --nocapture --test-threads=1
}
}
Not tested Other modifier and operand combinations, other GPUs, a AI use T3 Code / Codex ( |
|
A run with vkd3d-proton as the host D3D12. The DXIL goes through dxil-spirv and then the NVIDIA Vulkan driver, a different compiler from a native-Windows run: this PR's 2 new tests pass. Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 105 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Please rebase onto |
7a62a79 to
60f2baf
Compare
60f2baf to
30457b2
Compare
|
AMD synthetic GPU run of Tested
Not tested
AI use |
Both paths dropped the VOP3
ABS/NEGsource modifiers of the shift-add ops (v_lshl_add_u32,v_add_lshl_u32) and the align ops (v_alignbit_b32,v_alignbyte_b32). RDNA2 applies them to the source's sign bit, as for a float:absisx & 0x7fffffffandnegisx ^ 0x80000000. Withnegon the addend,v_lshl_add_u32 5, 2, 1gave 21, where the hardware gives0x80000015.Sources for the rule: boykopovar/AnyPS5#25964 measured both opcodes with every
abs/negcombination on gfx1036 (RDNA2) and gfx1201 (RDNA4) with their hardware oracle: 196/196 words match the sign-bit operations on each. boykopovar/AnyPS5#25799 measured the align ops on gfx1036: on src1,absclears andnegflips bit 31, which a shift brings into the result. On src0 and the shift amount they can't change the result, so applying them there is harmless. Withnegon src1,v_alignbit_b32 0, 1, 31gave 0 where the hardware gives 1.What is in it
recomp/emit.rsanddxil/lower_valu.rs: the shift-adds and the align ops applyabsthennegto each source as bit operations. Other integer VOP3 ops are unchanged, since only these four are measured.recomp/tests.rs:gpu_shift_add_abs_neg_act_on_the_sign_bitcoversnegon src2 ofv_lshl_add_u32andabson src0 ofv_add_lshl_u32with a zero shift, chosen so the modifier can't be shifted out.gpu_align_abs_neg_act_on_the_sign_bitcoversnegandabson src1 of both align ops.Tested
30457b21(rebased ontomain426a5a74, the firstmainwith green CI after5478c4a7, whose two failing tests main fixed in0d13b071), RTX 3070 (616.56):gpu_suite (--skip gpu_sparse_vram) 145 passed, 0 failed withXCL_DIRECT_DXIL=0and with=1.main426a5a74gives 143 passed on both.main5ce558f:mainfails both on both paths (21 for0x80000015; 0 for 1). This branch passes them withXCL_DIRECT_DXIL=0and1.gpu_tests (--skip gpu_sparse_vram): 134 passed withXCL_DIRECT_DXIL=0; with1, 133 passed and 1 failed,gpu_image_get_resinfo_1d_array, which also fails onmain(Direct DXIL: image_get_resinfo of a 1D array gives the layers in y #2046 fixes it).dxil::units: 136 passed.Regression run
I have no retail title here. Could someone with one post the
xcl-smokeblocks formainand this head? (The earlier pair, comment, was for7a62a79, before the rebase ontomain5478c4a7.)Not tested
AI use
🤖 Generated with Claude Code