Repository navigation
Conversation
…cl-dev#851, xcl-dev#864, xcl-dev#875-xcl-dev#876 and Wine raw fences Integrate clean upstream PRs on top of upstream/main (1ec4c98): - xcl-dev#849: direct move_away for remapped physical pages (avoids 4x sparse tile-mapping round-trips) - xcl-dev#838: FillMemoryWith*BitValueX uses list upload arena instead of leaked pattern buffers - xcl-dev#840: merge released ranges of the shared descriptor heap - xcl-dev#839: map queue-specific D3D12_BARRIER_LAYOUT values to legacy resource states - xcl-dev#841: preserve due frame-clock events when schedule changes at deadline - xcl-dev#851: split wrapped command lists before Wait64 GE after ordinary GPU work - xcl-dev#864: export XMemIsToolsMemAvailable returning 0 on retail - xcl-dev#875: tbuffer_load_format_* uses identity DST_SEL instead of V# DST_SEL - xcl-dev#876: implement IDXGIDevice2::EnqueueSetEvent Also add real::create_raw_fence for internal fences (late_release and EnqueueSetEvent) so Wine/vkd3d-proton never receives a FenceProxy on unadopted internal queues or SetEventOnMultipleFenceCompletion, and wrap list_x test exec with UnadoptGuard. Assisted-by: Antigravity (Google DeepMind)
… Linux PRs ivall#867/ivall#871/ivall#877 Update fork README for upstream/main 1ec4c98 (fenced late_release and queue-wait diagnostics), newly integrated PRs (ivall#838-ivall#841, ivall#849, ivall#851, ivall#864, ivall#875, ivall#876), live gameplay audio progress, and our three open upstream Linux PRs (ivall#867, ivall#871, ivall#877). Assisted-by: Antigravity (Google DeepMind)
The typed-buffer load path applied the V#'s DST_SEL (dword3 [11:0]) to every format load, tbuffer_load_format_* (MTBUF) included. The RDNA2 ISA's "Buffer Data" table gives the DST_SEL source per instruction: buffer_load_format_* / buffer_store_format_* use the resource's, tbuffer_*_format_* take FORMAT from the instruction and use the identity select (X, Y, Z, W), as do the raw and atomic forms. With a V# whose DST_SEL is not identity (a swizzled or all-SEL_0 word3, as on a raw buffer descriptor), tbuffer loads came out reordered or zero. MTBUF format loads (and their d16 forms) now take the converted components in order; missing components still get the format fill (0, 0, 0, 1). buffer_load_format_* is unchanged. Tests: tbuffer_load_ignores_vsharp_dst_sel checks the emitted HLSL (buffer_load_format keeps dst_sel(), the tbuffer xyzw and d16_xyz forms read t_c.x.. in order) and compiles it when DXC is present; gpu_tbuffer_load_identity_dst_sel loads through a V# with DST_SEL (z, y, x, w) and one with SEL_0 everywhere: buffer_load_format_xyzw returns (3, 2, 1, 4), tbuffer xyzw (1, 2, 3, 4), tbuffer 16_16_FLOAT (1.0, -2.0, 0, 1.0) and its d16_xyzw / d16_xy forms packed in order. Checked off-tree: a Python port of fmt_comp / dst_sel / the d16 packing (check_formats.py) gives the expected test vectors; the same script compares fmt_comp with an independent decoder over all 77 formats (random elements plus 0, 1, max and sign-boundary components) and round-trips decode/encode for every representable element. Not built or run on Windows. Assisted-by: Claude Code (Claude Opus 5.5)
54ed7eb to
077de0d
Compare
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Test report for head Setup
Tested: pass on both GPUs, including AMD RDNA hardware with native wave64.
Not tested: the retail smoke run this draft still needs. |
…cl-dev#864, xcl-dev#875-xcl-dev#876 Re-apply the 8 non-merged upstream PRs from our previous fork main onto upstream/main (930e8b4): xcl-dev#838 (upload-arena fills), xcl-dev#839 (queue-specific barrier layouts), xcl-dev#840 (coalesced shared descriptor heap), xcl-dev#841 (frame clock deadline reschedule), xcl-dev#851 (split before Wait64 GE after ordinary work), xcl-dev#864 (XMemIsToolsMemAvailable), xcl-dev#875 (tbuffer_load_format identity DST_SEL), and xcl-dev#876 (IDXGIDevice2::EnqueueSetEvent with create_raw_fence). Assisted-by: Antigravity (Google DeepMind)
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % 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 |
Intel Arc A770 verification for XCL PR #875Tested
cargo test --locked -p xcl --lib --no-run
$exe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
$env:XCL_DXC_DIR = Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64'
$env:XCL_ADAPTER = 'pr875-no-matching-gpu'
& $exe gpu::recomp::tests::tbuffer_load_ignores_vsharp_dst_sel --exact --nocapture --test-threads=1
# GPU command ran in a separate powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process.
$env:XCL_ADAPTER = 'A770'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& $exe gpu::recomp::tests::gpu_tbuffer_load_identity_dst_sel --exact --nocapture --test-threads=1
}
Not tested Direct DXIL, native wave64, other GPU adapters or drivers, unrelated memory behavior, other fixtures, fuzzing, the workspace suite, and retail-title smoke runs. AI use T3 Code / Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Test report for
|
| main | main + #875 | main + #1423 | main + both | |
|---|---|---|---|---|
gpu_tbuffer_load_identity_dst_sel |
– | pass | – | fails |
tbuffer_load_ignores_vsharp_dst_sel |
– | pass | – | fails |
gpu_typed_buffer_loads_and_stores |
pass | pass | pass | pass |
cargo test -p xcl --lib recomp, passed / failed / ignored |
401 / 0 / 20 | 403 / 0 / 20 | 401 / 0 / 20 | 401 / 2 / 20 |
The recomp runs had the same SKIPPED lines in every tree: 6 on the Radeon and 23 on the 5080 (#1426 refusals, no native wave64).
Jobs that differ from gfx1036 by more than 1 ULP (the same counts on both GPUs):
| jobs | main | + #875 | + #1423 | + both |
|---|---|---|---|---|
tbuffer_load_format_xyzw, 8 formats × 4 V# selectors |
24 | 24 | 18 | 0 |
tbuffer_load_format_xyzw, 77 formats, identity V# |
49 | 49 | 0 | 0 |
buffer_load_format_xyzw, 8 formats × 4 V# selectors |
22 | 22 | 0 | 0 |
With #875, x, y and z of every tbuffer job with a V# selector match gfx1036 apart from 1-ULP rounding. That is 0 values off, against 886 on main: X↔Y is fixed on all 8 formats, and W = ONE / ZERO on 8_8_8_8_UNORM and 32_32_32_32_FLOAT. The 24 jobs that still differ are the 6 formats with fewer than 4 channels, under all 4 selectors, and only in w. There fmt_comp returns 1 / 1.0 and gfx1036 returns 0 (#1414 point 1, which #1423 fixes). Six of those, W = ZERO on those formats, matched on main only because the V#'s ZERO was applied. With #875 alone they read 1.0. With #1423 as well, no job differs beyond 1-ULP UNORM / SNORM rounding and NaN payloads.
Conflict with #1423. Both PRs rewrite the same two dst_sel(...) lines in BufKind::FormatLoad, so they conflict in emit.rs. I resolved it so that tbuffer takes {t}_c.x..w as here, and buffer_load_format goes through #1423's mubuf_sel. gpu_typed_buffer_loads_and_stores (with #1423's cases) then passes, but two of the tests here fail on both GPUs:
tests.rs:1631:
assert_eq!(v[18..22], [f(1.0), f(-2.0), 0, f(1.0)], "lane {l} tbuffer 16_16_FLOAT: V# SEL_0 ignored, z = 0, w = 1");
The run givesleft: [1065353216, 3221225472, 0, 0]. 16_16_FLOAT has no 4th channel, and in Recompiler: typed buffer loads past the format and dst_sel differ from RDNA2 (tbuffer reads 0 and ignores dst_sel) #1414 gfx1036 reads 0 there for every format with fewer than 4 channels, sow = 1encodes the oldfmt_comp.
tests.rs:1632,assert_eq!(v[22..24], [0xC000_3C00, 0x3C00_0000], "lane {l} tbuffer d16 xyzw");, is the same channel in d16. A lane-0 readback givesv23 = 0. I didn't measure d16 on hardware.tests.rs:1590:
assert!(t.hlsl.contains("v10 = select(t1_ok, dst_sel(t1_c, (s15 >> 0u) & 7u, t1_int), 0u);"), "{}", t.hlsl);
With Recompiler: typed buffer loads read the channels a format lacks as RDNA2 does (#1414) #1423, the MUBUF line isv10 = select(t1_ok, dst_sel(t1_c, mubuf_sel((s15 >> 0u) & 7u, t1_info), t1_int), 0u);. With only that string changed, the rest of the test passes.
Whichever PR lands second needs those lines changed. With #1423, the hardware-matching values are [f(1.0), f(-2.0), 0, 0] and, by the same rule, [0xC000_3C00, 0].
Not covered. With XCL_DIRECT_DXIL=1, the direct DXIL backend (crates/xcl/src/gpu/dxil/lower_mem.rs) still applies the V#'s DST_SEL to tbuffer. On main + both, gpu_tbuffer_load_identity_dst_sel fails there at lane 0 tbuffer xyzw: identity DST_SEL (left: [3, 2, 1, 4]), and the 141 jobs give the same output as main byte for byte.
Not tested: a title smoke run, the full workspace suite, and d16 loads against hardware.
AI use: Claude Code (Claude Opus 5.5) ran the tests and the comparison on the GPUs above and drafted this comment; the numbers come from those runs.
Fixes
FormatLoadincrates/xcl/src/gpu/recomp/emit.rssotbuffer_load_format_*(ENC_MTBUF) uses the identity component select(x, y, z, w)instead of applying the V#sDST_SELfield (dword3[11:0]`):buffer_*_formattakes both its format andDST_SELfrom the V#, whereastbuffer_*_formattakes its format from the instruction and uses the identity select.tbuffer_load_format_*through a V# with a swizzledDST_SELreturned reordered components, and aSEL_0V# returned all zeros.buffer_load_format_*continues to applydst_sel(); stores and(0, 0, 0, 1)missing-component fill are unchanged.tbuffer_load_ignores_vsharp_dst_seland GPU testgpu_tbuffer_load_identity_dst_selverifying both swizzled8_8_8_8_UINTandSEL_016_16_FLOATV#s.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC debug, DXC Windows SDK10.0.26100.0,d3d12SDKLayers.dllinstalled54ed7eb4bdbd9e205612e807e9b05f0c450ef2accargo build --workspace: clean (no new warnings; only pre-existingfetch_updatedeprecation warning)cargo test --workspace -- --test-threads=4: 715 passed, 0 failed, 41 ignored (tbuffer_load_ignores_vsharp_dst_selok,gpu_tbuffer_load_identity_dst_selok)SKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Regression run
Smoke run by @Toons29 in comment below: #875 (comment)
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; the tester checked the blocks before posting.Not tested
AI use