Skip to content

D3D12.X: keep barriers carrying console hint flags - #3090

Merged
Prime1997 merged 1 commit into
xcl-dev:nvidia-devfrom
Prime1997:codex/gdkx-barrier-flags
Nov 28, 2026
Merged

Prime1997 merged 1 commit into
xcl-dev:nvidia-devfrom
Prime1997:codex/gdkx-barrier-flags

Conversation

@Prime1997

@Prime1997 Prime1997 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Keep valid transition, aliasing and UAV records when their per-record flags include console hints. Preserve PC split-barrier bits and remove unsupported high bits instead of dropping the entire record.

What is in it

  • Barrier filtering and four regression fixtures in list_x.rs; README behavior note.

Tested

  • Windows build 26200 x64; Intel Core i5-10400; RTX 3060 Ti, driver 32.0.16.1714; Rust 1.100.0 MSVC, debug profile with debug symbols disabled.
  • 4 passed, 0 failed, 0 ignored, 0 reported skips. The original runtime fails all four controls. Native RTX 3060 Ti readback verified all 16 pixels in each of three cases: ordinary, hinted and split barriers.
  • cargo test --locked -p xcl --lib --target-dir <private-target> -- --exact --test-threads=1 --nocapture hle::d3d12x::list_x::tests::resource_barrier_console_flags_keep_transition_and_split_bits hle::d3d12x::list_x::tests::resource_barrier_console_flags_keep_uav_ordering_and_aliasing hle::d3d12x::list_x::tests::resource_barrier_console_flags_leave_existing_filters_in_place hle::d3d12x::list_x::tests::gpu_resource_barrier_console_hint_preserves_texture_copy
  • Those results are from the preserved patch on NVIDIA ba9d1f947. Current head b3e676171db6f82bd1741406630570aac50bcb5b rebases the identical patch onto e48e74cad7af992f7b472b59f06ad23ae3695166; stable patch identities match. The current-head rerun is pending.

Regression run
Pending. No retail smoke blocks are claimed.

Not tested

AI use
Codex (GPT-6) implemented and independently reviewed the change and ran the reported checks. API contracts were checked against local GDK documentation; no SDK code, headers, binaries, samples or documentation text are included.

Optional temporary Discord for coordinating contributor work, testing and comparing results.

Retain supported barrier records and PC split flags while removing console-only per-record hint bits. Four focused checks pass on RTX 3060 Ti; the unchanged runtime fails all four regression controls. Full-suite and retail merge checks remain pending.

Assisted-by: Codex (GPT-6)
@Prime1997
Prime1997 force-pushed the codex/gdkx-barrier-flags branch from 9d37e9c to b3e6761 Compare November 28, 2026 03:38
@Prime1997
Prime1997 marked this pull request as ready for review November 28, 2026 03:40
@andrewDoing

Copy link
Copy Markdown
Contributor

I ran the four stock barrier tests on unmodified rebased head b3e676171db6f82bd1741406630570aac50bcb5b, native RTX 5070 / NVIDIA 616.92. Result: 4 passed, 0 failed, 0 ignored, no skip notices.

The GPU fixture independently checked all 16 RGBA8 pixels for the ordinary transition, console hint 0x10000, and paired split 0x10001 / 0x10002, after queue signal and fence completion. The other three tests cover transition flags, UAV/aliasing ordering, and existing filters.

I requested XCL_D3D12_DEBUG=1, but the runner does not expose whether enabling the debug layer succeeded, so this is not a certified debug-layer validation. I did not run the full workspace or a retail title.

AI use: OpenAI Codex with GPT-6.2 Astra ran the tests; Codex reviewed and prepared this report.

@thehollowedone

Copy link
Copy Markdown
Contributor

Independent RTX 3080 Ti check of #3090 head b3e67617, based on nvidia-dev e48e74ca. Windows 11 build 26300, driver 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, DXC 1.8.2502.11.

cargo test --offline --locked -j 4 -p xcl --lib resource_barrier_console -- --test-threads=1 --nocapture passed 4/0/0, including the native 16-pixel texture readback. I also reran gpu_resource_barrier_console_hint_preserves_texture_copy with XCL_D3D12_DEBUG=1: 1/0/0, no reported skip or D3D12 error in that process's output. The test does not assert an ID3D12InfoQueue message count, so this is a readback result, not a complete validation-layer claim.

The full cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 finished 1,904 passed, 2 failed, 48 ignored across 40 targets, with 26 explicit SKIPPED notices. console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk failed with DXIL not compiled yet; the same exact test fails on unchanged parent e48e74ca (0/1/0). d32s8_targets_take_their_own_size_of_video_memory also failed in the concurrent suite, then passed in an isolated head rerun (1/0/0). A further four-thread library rerun aborted when the coherent window could not be restored after a CUSTOM segment, so it produced no valid aggregate count. I cannot attribute the VRAM test's suite failure or the abort to this barrier change from these runs. No paired retail smoke was run.

AI use: Codex (GPT-6.2 Sol) inspected the patch, ran the tests and checked this report.

@DarkPanda69

Copy link
Copy Markdown

AMD run (listed as untested), with an RTX 3060 in the same PC: the four new tests pass on both, and nothing else in list_x changes.

Tested: at the PR head b3e6761 against its merge-base with nvidia-dev, e48e74c (the diff doesn't apply as a patch on today's nvidia-dev 01b94f5). Debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, card picked with XCL_ADAPTER; RX 9070 XT (RDNA4) driver 32.0.32029.2010, RTX 3060 driver 32.0.16.1088.

  • cargo test -p xcl --lib -- hle::d3d12x::list_x::tests:: --test-threads=1 --nocapture: merge-base 50 passed, 0 failed; PR 54 passed, 0 failed, 0 ignored, no SKIPPED, on both cards.
  • The only changes are the four new tests, all ok. gpu_resource_barrier_console_hint_preserves_texture_copy printed barrier texture-copy adapter: AMD Radeon RX 9070 XT / … NVIDIA GeForce RTX 3060.

Not tested: the whole suite, a title, Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

@Prime1997
Prime1997 merged commit 54225f5 into xcl-dev:nvidia-dev Nov 28, 2026
1 of 5 checks passed
Royalflamejlh added a commit to Royalflamejlh/xcl that referenced this pull request Nov 28, 2026
…#3092

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Royalflamejlh added a commit to Royalflamejlh/xcl that referenced this pull request Nov 28, 2026
main gained 345 commits since 753e8b1, most of them bmjask's stack (xcl-dev#2959),
plus xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086 from this branch. Conflicts, per PR:

- xcl-dev#2404 + xcl-dev#2633 (split chained ExecuteIndirect): main's xcl-dev#2959 took both over
  (ed98461, a05fbc4, 8626d5b: IndirectBuild/IndirectChain on a CBV root,
  one-command slicer, separate cache namespace). Main's side kept in
  dispatch_chain.rs, pso.rs (slicer, command signature, chain root),
  bind.rs (ExecuteIndirect path), device_x.rs (signature traits),
  pso_async.rs (no background whole build, so no build_waited_on), real.rs
  (ComputeBuild, driver_cache names) and shaders.rs (blob names). Dropped
  with them: slab_count, record_slicer, abi_signature_id names, the direct
  root-CBV constant blocks, list_x::predicated, the split.rs/runner.rs
  ExecuteIndirect test and the list_x chain-scratch test. Not in main: xcl-dev#2404
  ran the pieces before any whole form was built; main runs the whole form
  (built on the title's thread) until the indirect set is ready.
- xcl-dev#2707 (allocator reclaim): main has it (31930d8, 057f463, 8e7b566).
  alloc_pool.rs is main's, with xcl-dev#867's changes on top; bind.rs takes main's
  native_backing; xcl-dev#2707's tests and bind::push_uma_for_test go.
- xcl-dev#867 + xcl-dev#2477 (Wine vtables and fences), adapted to main's new code:
  real.rs keeps the in-place patching, UnadoptGuard and FenceProxy beside
  main's native_queue_* helpers; guards in cl_reset, bind_pipeline_exact,
  clear_pipeline_exact, reset_pc_allocator, the title ExecuteCommandLists
  closure and native_queue_execute; Signal/Wait unwrap the title's fence
  (also in native_queue_signal/wait); list_x guards in
  reset_reserved_segment and KickoffX's submit closures; create_raw_fence
  for main's new internal fences in alloc_pool.rs (SubmissionGate),
  title_textures.rs, present.rs, vram.rs, sparse.rs, cpu_writes.rs; tests
  as xcl-dev#2477 had them; runner.rs is main's plus submit_list.
- xcl-dev#1803 (heap addresses): kept, carried into main's PreparedSplit and
  PreparedAbiState (prepared_abi_io takes the heaps).
- xcl-dev#1368 (NodeMask 0): kept in compute_container, before main's per-node
  blob names, so names and pipeline use node 0.
- xcl-dev#1860, xcl-dev#2082 (cfg.rs, module/opt.rs): cfg.rs is 1567f72's version
  (xcl-dev#1860 on main's Succs); opt.rs is that plus xcl-dev#2082's arm and test.
- xcl-dev#2229 (rodata): kept through main's kernel.rs entry points;
  translate_entry_rodata loses wave32_only as main dropped per-GPU tables
  (3cde0cc); pso.rs and coverage.rs call it with main's options
  (no_remap, split for graphics); recomp Options keeps rodata and no_remap.
- xcl-dev#1975: kept in emit.rs and lower_valu.rs; its mesh barrier guard and its
  test dropped, main's wider guard (2ca9127) covers it; the now-unused
  lower::has_non_uniform_barrier goes.
- xcl-dev#2070 (64 MB stacks): pso_async::WORKER_STACK on main's worker, helper
  and preload threads; shaders.rs's piece threads on worker_thread.
- xcl-dev#2551 (whole forms prebuilt): split_whole_roots(false) is DirectChain,
  so the precompile builds every split program's whole form; main built it
  only for programs an earlier run used through ExecuteIndirect.
- xcl-dev#688 (dxc.rs imports), xcl-dev#2762 (host.rs log line), xcl-dev#3090 (list_x tests),
  arch/window-title-commit (present.rs with_commit on main's
  compiling_text), README.md: both sides.
- list_x.rs: main dropped title_textures::list_reset; main's side.
- sparse.rs, vram.rs: main's quarantine_tiles_for and per-device retire
  state, with create_raw_fence.
- xcl-dev#3090, xcl-dev#3092 tests: runner::device and Uma::block_len added from
  nvidia-dev (5 and 12 lines) so the lib tests compile.
- xcl-dev#751: its commit is already in main (b84e037, via xcl-dev#2844); it leaves the
  README table with xcl-dev#2404, xcl-dev#2633, xcl-dev#2707, xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dudenudem pushed a commit to dudenudem/xcl that referenced this pull request Nov 29, 2026
`cargo test --lib` did not compile on this stack: three errors in test
code, not in the runtime.

Both helpers exist upstream only on `nvidia-dev` (and the branch off it
that the two Prime PRs were written against); `main` and `amd-dev` have
neither, and the picks carried their call sites without them:

- `Uma::block_len` was added by c3b80c4 ("kernelx: a released block of
  unified memory leaves no shown page there"); the kernelx test that
  calls it arrived here through e3fd690e (xcl-dev#3092).
- `runner::device` was added by fe650b6 ("D3D12.X: dispatches of more
  than 65 535 groups in X are folded into Y"); the barrier test that
  calls it arrived here through fb626850 (xcl-dev#3090).

Both are backported verbatim. `device` matters beyond compilation: a
test that creates its own device first leaves the Agility SDK
unappliable (0x887E0003) and every GPU test after it skips.

Tested under Wine GE-Proton11-14 + vkd3d-proton 3.1.0 on RADV NAVI31:
`cargo test --lib --no-run` builds; the two affected tests pass
(xmem_graphics: 2 passed; gpu_resource_barrier_console_hint: 1 passed,
real GPU run). The rest of the suite is not run here.

Assisted-by: omp (DeepSeek-V4.1-flash)
(cherry picked from commit c443e1b06da3f3c87923d76107d5a4c1e3243e02)
dudenudem pushed a commit to dudenudem/xcl that referenced this pull request Nov 29, 2026
`cargo test --lib` did not compile on this stack: three errors in test
code, not in the runtime.

Both helpers exist upstream only on `nvidia-dev` (and the branch off it
that the two Prime PRs were written against); `main` and `amd-dev` have
neither, and the picks carried their call sites without them:

- `Uma::block_len` was added by c3b80c4 ("kernelx: a released block of
  unified memory leaves no shown page there"); the kernelx test that
  calls it arrived here through e3fd690e (xcl-dev#3092).
- `runner::device` was added by fe650b6 ("D3D12.X: dispatches of more
  than 65 535 groups in X are folded into Y"); the barrier test that
  calls it arrived here through fb626850 (xcl-dev#3090).

Both are backported verbatim. `device` matters beyond compilation: a
test that creates its own device first leaves the Agility SDK
unappliable (0x887E0003) and every GPU test after it skips.

Tested under Wine GE-Proton11-14 + vkd3d-proton 3.1.0 on RADV NAVI31:
`cargo test --lib --no-run` builds; the two affected tests pass
(xmem_graphics: 2 passed; gpu_resource_barrier_console_hint: 1 passed,
real GPU run). The rest of the suite is not run here.

Assisted-by: omp (DeepSeek-V4.1-flash)
(cherry picked from commit c443e1b06da3f3c87923d76107d5a4c1e3243e02)
Royalflamejlh added a commit to Royalflamejlh/xcl that referenced this pull request Nov 29, 2026
main has merged nvidia-dev (xcl-dev#3203): its two-pass mesh, sparse and upload
paths now submit through real::native_queue_execute / _signal / _wait.
Those already carry xcl-dev#867's UnadoptGuard and unwrap_fence; the conflicts
and the main-only submit paths were resolved as follows.

Taken from main, the stack's version dropped (main does the same):
- recomp/dxc.rs (3): xcl-dev#688's private DXC heaps; main's form (3842807)
  falls back on any failure and never destroys a heap.
- device_x.rs (10): xcl-dev#3091 (cherry-pick 511a297); main's 7e24237 keeps
  interned shader copies for base pipelines. xcl-dev#3091's tests and its
  real.rs test counter (GRAPHICS_FALLBACK_ATTEMPTS) and README line go;
  xcl-dev#2753's console_bytes is re-applied on main's file.
- bind.rs (16): the stack's only change there was xcl-dev#1803, merged in main.
  main's file, plus the xcl-dev#2816 feedback-copy UnadoptGuard in
  poll_two_pass_feedback (ed887d2, from linux/stack-nvidia-dev).
- pso.rs: main has daae033 (multidimensional groups take direct DXIL,
  xcl-dev#3189's change), so the stack-only commit is in main; translate calls
  take main's translate_compute_rodata / translate_entry_rodata_rt32.
- list_x.rs tests: xcl-dev#3090's barrier tests were in twice (cherry-pick and
  main's merge); the cherry-picked copy goes.
- runner.rs device(), xbox.rs Fssm::rodata: added on both sides; one copy.
- README.md: the precompile-wrapper paragraph was added on both sides;
  one copy.

Both kept:
- build.rs (2): TRANSLATION_GLUE_REVISION "pso-glue-v5-linux-multidimensional-
  direct" (main's v5 + the stack suffix); translator sources keep xcl-dev#2229's
  cfg.rs and code_loads.rs, drop dxc.rs as main does.
- dxil/kernel.rs (6): TRANSLATOR_VERSION 13 (main 12; the stack's xcl-dev#2229
  head output differs, as on linux/stack-nvidia-dev); main's rt32 entry
  points with xcl-dev#2229's code_loads.
- dxil/lower.rs (4), lower_mem.rs (3), lower_window.rs (1), recomp/emit.rs
  (11), recomp/mod.rs (3), recomp/tests.rs (1), core_tests.rs: main has
  an earlier copy of xcl-dev#2229 (41f1a85); xcl-dev#2229's head (code_loads, xcl_cload
  / xcl_gload(hi, a)) is kept over it, as on linux/stack-nvidia-dev;
  main's loop_ids, IO slots, ps_mask_live_scc and rt32 mask kept beside
  it, and main's duplicate core_tests copy of the rodata test goes.
  lower_mem.rs keeps the stack's scratch_ptr insert-before-terminator line.
- real.rs (6): the class scan keeps `own` with main's
  release_through_its_own_vtable; xcl-dev#2477's in-place patch after main's
  two-pass defer hooks; q_signal_pc / q_wait_pc beside main's page
  mappings; the title ExecuteCommandLists keeps xcl-dev#867's list guards inside
  main's watch::in_driver scope; test modules of both.
- list_x.rs (1): xcl-dev#867's allocator / PSO guards with main's `on = pc_alloc`.
- sparse.rs (1): main's new_state, with xcl-dev#867's raw fences for the sparse
  and readback fences and the async readback fence pairs (as on
  linux/stack-nvidia-dev); pc_execute (main's texture_upload submit path)
  unadopts its list for the submit.
- title_textures.rs (1): main's early fence creation, as a raw fence.
- dstorage.rs (4): xcl-dev#2864's unpack cache on main's Cow source and stage
  buffers.
- xg.rs (2): main's copy_args (adccb7d) covers xcl-dev#684's argument fix;
  xcl-dev#684's destination guard kept.
- present.rs (1), gpu_compute_e2e.rs (1), README.md (2): tests and text
  of both.

linux/README.md: main line updated; xcl-dev#1599, xcl-dev#2082, xcl-dev#1803, xcl-dev#3090, xcl-dev#688,
xcl-dev#3091 and the stack-only multidimensional row leave the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants