Recompiler: zero VDATA[0:1] on out-of-bounds buffer_atomic_*_x2 with GLC #1166
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1166
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1166"
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?
@b3IKK on GitHub · 2026-11-24 12:46 UTC · original
b3IKK:recomp/buffer-atomic-x2-oob-glc→main· +42 −5 · 2 files · 1 commits · open32-bit
buffer_atomiczeroesVDATAon out-of-bounds active lanes whenGLC == 1, butbuffer_atomic_*_x2passedand(act, ok)as both the memory-operation predicate and theGLCwriteback predicate inatomic64, leaving the previous input values inVDATA[0:1]on out-of-bounds active lanes.This splits
actand optionalokinatomic64so memory operations remain gated onand(act, ok)whileGLCwritest_old(initialized to0) for all active lanes, matching 32-bitbuffer_atomicand leavingflat_atomicunchanged.What is in it
crates/xcl/src/gpu/recomp/emit.rs: passactandSome(ok)separately toatomic64frombuffer_atomicso active out-of-boundsGLClanes write0toVDATA[0:1].crates/xcl/src/gpu/recomp/tests.rs: add GPU testgpu_buffer_atomic_x2_oob_glc_zeroes_vdatacovering active in-bounds, active out-of-bounds, and inactive out-of-bounds lanes forBUFFER_ATOMIC_ADD_X2withGLC = 1(verified failing before the fix).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)cargo test -p xcl --lib gpu_buffer_atomic_x2_oob_glc_zeroes_vdata: 1 passed, 0 failed (failed on the GPU before the fix, leaving input values inVDATA[0:1])Regression run
main:
PR:
Not tested
AI use
emit.rs, wrote the fix and GPU test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.@bjarngard on GitHub · 2026-11-24 13:05 UTC · original
Test report for head
43c4399(AMD, native wave64)Tested
XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPEDXCL_REQUIRE_GPU=wave64:gpu_buffer_atomic_x2_oob_glc_zeroes_vdatapassedNot tested: retail titles, RDNA3/RDNA4.
AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
@JoaoPauluu on GitHub · 2026-11-24 13:57 UTC · original
A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.
Tested
x86_64-pc-windows-gnu.43c4399as it is (based on47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).gpu::recomp::tests::gpu_buffer_atomic_x2_oob_glc_zeroes_vdata: ok, no SKIPPED.Not tested
AI use
@luckyteagirl on GitHub · 2026-11-25 06:10 UTC · original
Independent RX 6800M GPU check on exact PR head
43c43996a72476891a4e976444ed468405b3e055.Tested
30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5.XCL_ADAPTER=6800M XCL_REQUIRE_GPU=wave64 cargo test --locked -p xcl --lib -j 2 gpu_buffer_atomic_x2_oob_glc_zeroes_vdata -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored in 1.16 s. The log has noSKIPPEDline; withXCL_REQUIRE_GPU=wave64, absence of wave64 capability would fail the test. This exercises the PR's active out-of-bounds 64-bit buffer atomic GLC writeback check on the discrete GPU.I did not run the full workspace suite, a pre-fix negative control on this machine, or a retail title smoke comparison. This result checks the focused regression only; the PR predates the current
mainhead. No game data was used or uploaded.AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revision and test log before posting.
@DavidM1911 on GitHub · 2026-11-25 07:46 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.