Repository navigation
Conversation
|
Tested
No game data used. |
…dword buffer accesses) 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 ISA definitions this PR implements for the new LDS atomics and AMD Radeon iGPU of a Ryzen 7 9800X3D, gfx1036 (RDNA2), AMD driver 32.0.21042.62, Windows 11 Pro 26200. In a HIP kernel (assembled by the AMD driver's amd_comgr), each lane works on its own LDS dword: store
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. |
|
@Lyrnc thank you. That is the check this PR could not do for itself: its GPU tests compare the translation against CPU references written from the same ISA text, so they cannot catch a misreading of the text. Six of the definitions now have 492 (364 for I have put the result in the description under "Not verified", with what it leaves open as you state it: the 64-bit forms, the sub-dword buffer accesses, and that it is desktop RDNA2, not the console's. Your note on host-coherent memory is useful for anyone writing such a probe; nothing in this PR depends on it. Nothing was run for this note. AI-assisted. |
3bbc9ba to
453e693
Compare
Lower LDS counters, reverse subtraction, masked OR, wrap and separate exchanges. Use one shared i64 allocation when a shader needs native 64-bit atomics so dword accesses still alias it. Translate buffer bytes and halves, including split halfwords and D16, and use native integer atomics or compare-exchange loops according to the RDNA 2 ISA. Support traced root SRV/CBV loads and global D16 reads. An opt-in opcode probe records refusals. Synthetic compute tests compare both the returned and stored values with CPU references, check contention and out-of-bounds behavior, and validate and dispatch on the host D3D12 device. Floating atomics still require the console MODE state.
453e693 to
141fde5
Compare
|
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). |
|
@DeerSilver, fixed in AI-assisted (Codex). |
e469b7c to
825dbd9
Compare
Adapt the subword reader from Marvisak#164 (141fde5) to guarded handles and runtime buffer strides. Exercise byte extraction, sign extension and a split halfword on the host.
…fer accesses Brings byte and half loads/stores on buffers, flat and global memory, sub-word cbuffer reads, and structured UAVs for 64-bit atomics. Resolutions against the branch: - scalar loads through root descriptors keep Marvisak#294's built-source path; - root view bounds (Marvisak#650) gate the sub-dword and atomic paths too (atomics narrow their active lanes by the bound); - the Marvisak#383 LDS byte path uses lds_ptr and refuses 64-bit LDS atomics; - memory_tests fill root view sizes in user data, as Marvisak#650 requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
|
Closing this. The change is not wrong; this title does not use the forms it adds, and bringing it up to The numbers. Local title data (v1.0.2.1, the main shader archive), offline, CPU only; counts and reasons only.
Limits. The pass covers that one archive, not shaders anywhere else in the title. It did not look at the scalar The branch Thank you @Lyrnc for checking the LDS atomics and AI-assisted |
Measured on the title's shaders (by a tester)
EduAzevedo ran
victory translate --jobs 8 --listover the retail shaders (v1.0.2.1, 26,148 programs) onmaind2a4baeand on this head3bbc9ba, compared program by program (result): 0 programs gained, 0 programs lost. No refusal reason changes.So this PR does not change what translates in this title today. It adds coverage and is tested on synthetic programs only; it can wait behind PRs that unblock programs the title uses.
What
The memory instruction families were only partly lowered; a refused form fails its whole shader.
fn ds):inc,dec,rsub,mskorwith and without_rtn, andds_wrap_rtn_b32, as compare-exchange loops after the RDNA 2 ISA's definitions. The 64-bit integer forms (arithmetic, min/max, bitwise, compare-store, exchange,wrxchg2,wrxchg2st64). A shader that uses a 64-bit LDS atomic gets onei64groupshared allocation that every access width shares, so dword accesses still alias it (they become compare-exchange updates of their half); such shaders declare SM 6.6's 64-bit atomics on groupshared memory.fn buffer): signed and unsigned byte and halfword loads, byte and short stores, the unformatted D16 forms;sub,inc,dec,csub(clamps at zero, returns the previous value) and the 13 integer_x2atomics. Sub-dword stores mask the affected bytes with a compare-exchange per dword, so concurrent writes to neighbouring bytes are not lost.s_load_dword{,x2,x4,x8,x16}through traced root SRVs and CBVs.Still refused, each with its reason: floating-point LDS and buffer atomics (need the console's MODE denormal state), LDS
src2forms,addtid,ds_condxchg32_rtn_b64, global stores and atomics, general FLAT and scratch, scalar stores and atomics, partial or offset typed stores, indexed MTBUF loads.Not included: byte and halfword LDS reads and writes, which #101 and #116 cover.
Not verified
No game files were used. Semantics are from AMD's RDNA 2 ISA reference (sections 12.13-12.14) and LLVM's
DSInstructions.td/BUFInstructions.td. Whole-dword and atomic accesses are taken as naturally aligned; odd-address halves follow the unaligned-access mode, including a half that spans two dwords.Checked on RDNA2 hardware by a reviewer (Lyrnc, a Radeon integrated GPU, gfx1036, probes assembled by the AMD driver):
ds_inc_rtn_u32,ds_dec_rtn_u32,ds_rsub_rtn_u32,ds_mskor_rtn_b32andds_wrap_rtn_b32match the definitions used here on 492 of 492 value triples each, andglobal_atomic_csub(the same operation asbuffer_atomic_csub) on 364 of 364 pairs; every_rtnform returns the old value. Not probed there: the 64-bit forms and the sub-dword buffer accesses. It is desktop RDNA2 silicon, not the console's.Tested
Windows 11, NVIDIA RTX 5070, synthetic only:
dxil.dllvalidation): atomic return and stored values, zero limits, wrapping, sign extension, preserved D16 halves, contended byte stores, out-of-bounds accesses, 64-bit atomics sharing the dword allocation. They all stop at unsupported instructions onmain.memory_opcode_refusals, ignored by default) lists the refusals across the memory opcode tables.cargo test -p victory-shader: 78 passed, 1 ignored. clippy: nothing new.cargo xtask policy: ok.Stays out of
fn image(#48),buffer_format(#25) and wave/lane code.AI-assisted; no game assets were used.
🤖 Generated with Claude Code