GPU: order shader writes on command list pipeline syncs (#732) #1228

Open
github-bot wants to merge 2 commits from github-bot/gh-1228 into main AGit
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-24 16:35 UTC · original
Ctrl-Alt-Haze:fix/gpu-sync-uav-barrier → main · +368 −15 · 1 files · 2 commits · open

Summary

Console command-list pipeline syncs (LIST_FUNCTIONS slots 129/130 and NEWER_LIST_FUNCTIONS slots 131/132/146) previously resolved to an empty no-op sync with a comment stating that host lists order their own work and every submission is waited for. While submissions are waited for between command lists, D3D12 does not implicitly synchronize dependent UAV reads/writes between consecutive Dispatch / Draw calls recorded within the same command list without an explicit UAV barrier (D3D12_RESOURCE_BARRIER_TYPE_UAV).

This PR makes sync emit a global UAV_BARRIER via the same wait_for_shader_writes(this) helper used by barrier_groups (related to #732, though not yet measured in-world).

Changes

  • crates/victory-gpu/src/list.rs:
    • Extracted wait_for_shader_writes(this) shared by sync and barrier_groups, emitting UAV_BARRIER on host_list(this) while safely no-oping when this is null, host is None, or on non-Windows targets.
    • Kept clean-room parity with barrier_groups and resource_barrier by not decoding undocumented console flags/control bitfields without title measurements.
    • Added list::tests::sync_is_safe_on_null_and_non_host_lists (verifies LIST_FUNCTIONS slots 129/130, NEWER_LIST_FUNCTIONS slots 131/132/146, null this, and host: None lists).
    • Added list::tests::sync_orders_dependent_compute_uav_dispatches (live D3D12 cs_5_1 4-stage dependent compute dispatches through sync / barrier_groups under the D3D12 Debug Layer — verifies API validity, slot wiring, and end-to-end correctness; does not force hardware overlap on drivers that serialize compute work by default).

Verification

  • Hardware / Toolchain: Windows 11 x64, NVIDIA GeForce RTX 5070 Ti + WARP (VICTORY_D3D12_WARP=1), D3D12 Debug Layer (VICTORY_D3D12_DEBUG=1), rebased onto upstream/main (940d32f) at 42b6c9e (1d05911, 42b6c9e, 0 behind / 2 ahead).
  • cargo xtask policy: passed (182 files ok)
  • cargo clippy --workspace --all-targets --locked -- -D warnings (default & --all-features): passed
  • cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked -- --test-threads=1: all passed (victory 12 [10 unit + 2 census], victory-core 13, victory-formats 38 / 5 ignored, victory-game 15, victory-hle 145 [143 unit + 1 fidelityfx + 1 no_dll_planting], victory-loader 38 [34 unit + 1 crash_log + 2 load_probe + 1 title_dlls], victory-pe 36, victory-pipeline 7, xtask 6)
  • cargo test -p victory-gpu --locked -- --test-threads=1 (RTX 5070 Ti): 143 passed; 2 failed; 2 ignored (pre-existing 940d32f failures: descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views)
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1 (RTX 5070 Ti): 146 passed; 2 failed; 2 ignored (same 2 pre-existing failures; resolve_queries_rejects_overflowing_offset, sync_is_safe_on_null_and_non_host_lists, sync_orders_dependent_compute_uav_dispatches passed)
  • VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1: 148 passed; 0 failed; 2 ignored
  • cargo test -p victory-shader --features host --locked -- --test-threads=1 (RTX 5070 Ti): 244 passed; 3 failed; 3 ignored (pre-existing 940d32f failures: stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware)
  • Not tested: in-world run or GPU capture from a live title (no runnable decrypted title binary available locally).

AI use: Written and rebased locally with AI assistance, independently audited and verified on RTX 5070 Ti + WARP.

**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-24 16:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228) `Ctrl-Alt-Haze:fix/gpu-sync-uav-barrier` → `main` · +368 −15 · 1 files · 2 commits · open ## Summary Console command-list pipeline syncs (`LIST_FUNCTIONS` slots 129/130 and `NEWER_LIST_FUNCTIONS` slots 131/132/146) previously resolved to an empty no-op `sync` with a comment stating that host lists order their own work and every submission is waited for. While submissions are waited for between command lists, D3D12 does not implicitly synchronize dependent UAV reads/writes between consecutive `Dispatch` / `Draw` calls recorded within the same command list without an explicit UAV barrier (`D3D12_RESOURCE_BARRIER_TYPE_UAV`). This PR makes `sync` emit a global `UAV_BARRIER` via the same `wait_for_shader_writes(this)` helper used by `barrier_groups` (related to #732, though not yet measured in-world). ## Changes - `crates/victory-gpu/src/list.rs`: - Extracted `wait_for_shader_writes(this)` shared by `sync` and `barrier_groups`, emitting `UAV_BARRIER` on `host_list(this)` while safely no-oping when `this` is null, `host` is `None`, or on non-Windows targets. - Kept clean-room parity with `barrier_groups` and `resource_barrier` by not decoding undocumented console `flags`/`control` bitfields without title measurements. - Added `list::tests::sync_is_safe_on_null_and_non_host_lists` (verifies `LIST_FUNCTIONS` slots 129/130, `NEWER_LIST_FUNCTIONS` slots 131/132/146, null `this`, and `host: None` lists). - Added `list::tests::sync_orders_dependent_compute_uav_dispatches` (live D3D12 `cs_5_1` 4-stage dependent compute dispatches through `sync` / `barrier_groups` under the D3D12 Debug Layer — verifies API validity, slot wiring, and end-to-end correctness; does not force hardware overlap on drivers that serialize compute work by default). ## Verification - **Hardware / Toolchain**: Windows 11 x64, NVIDIA GeForce RTX 5070 Ti + WARP (`VICTORY_D3D12_WARP=1`), D3D12 Debug Layer (`VICTORY_D3D12_DEBUG=1`), rebased onto `upstream/main` (`940d32f`) at `42b6c9e` (`1d05911`, `42b6c9e`, `0` behind / `2` ahead). - `cargo xtask policy`: passed (`182 files ok`) - `cargo clippy --workspace --all-targets --locked -- -D warnings` (default & `--all-features`): passed - `cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked -- --test-threads=1`: all passed (`victory` 12 [10 unit + 2 `census`], `victory-core` 13, `victory-formats` 38 / 5 ignored, `victory-game` 15, `victory-hle` 145 [143 unit + 1 `fidelityfx` + 1 `no_dll_planting`], `victory-loader` 38 [34 unit + 1 `crash_log` + 2 `load_probe` + 1 `title_dlls`], `victory-pe` 36, `victory-pipeline` 7, `xtask` 6) - `cargo test -p victory-gpu --locked -- --test-threads=1` (RTX 5070 Ti): `143 passed; 2 failed; 2 ignored` (pre-existing `940d32f` failures: `descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views`) - `VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1` (RTX 5070 Ti): `146 passed; 2 failed; 2 ignored` (same 2 pre-existing failures; `resolve_queries_rejects_overflowing_offset`, `sync_is_safe_on_null_and_non_host_lists`, `sync_orders_dependent_compute_uav_dispatches` passed) - `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1`: `148 passed; 0 failed; 2 ignored` - `cargo test -p victory-shader --features host --locked -- --test-threads=1` (RTX 5070 Ti): `244 passed; 3 failed; 3 ignored` (pre-existing `940d32f` failures: `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`) - **Not tested**: in-world run or GPU capture from a live title (no runnable decrypted title binary available locally). AI use: Written and rebased locally with AI assistance, independently audited and verified on RTX 5070 Ti + WARP.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:21 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 17:59 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 038503c: cargo test -p victory-gpu passes, 52 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 17:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7140004079) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 038503c: `cargo test -p victory-gpu` passes, 52 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-24 18:12 UTC · original

On Linux under Wine (vkd3d-proton, RTX 5090) the new sync_orders_dependent_compute_uav_dispatches test cannot build its shader. Wine's d3dcompiler_47 is vkd3d-shader, and it rejects RWByteAddressBuffer.Load:

D3DCompile failed (Call failed. (0x80004005)): sync_ordering_test:18:18: E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer'.

#346 hit the same limit. It reads and writes RWStructuredBuffer<uint> and serializes its root signature in code instead of using [RootSignature(...)], and its compute tests then pass under Wine. The same change here would let this test run on Linux, which #1218's cargo xtask wine-test is meant to cover.

A stacking note: #190 removes Win32_Graphics_Direct3D_Fxc from victory-gpu's windows features because nothing on that branch used it any more. With both merged, the D3DCompile import here does not resolve until the feature is added back.

Locally I skip the test when Wine is detected (wine_get_version in ntdll). With that, the full workspace passes under Wine: 395 passed, 0 failed, 6 ignored.

AI-assisted (Claude).

**@⁠neonbyte1** on GitHub · 2026-11-24 18:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7140321069) On Linux under Wine (vkd3d-proton, RTX 5090) the new `sync_orders_dependent_compute_uav_dispatches` test cannot build its shader. Wine's `d3dcompiler_47` is vkd3d-shader, and it rejects `RWByteAddressBuffer.Load`: ``` D3DCompile failed (Call failed. (0x80004005)): sync_ordering_test:18:18: E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer'. ``` #346 hit the same limit. It reads and writes `RWStructuredBuffer<uint>` and serializes its root signature in code instead of using `[RootSignature(...)]`, and its compute tests then pass under Wine. The same change here would let this test run on Linux, which #1218's `cargo xtask wine-test` is meant to cover. A stacking note: #190 removes `Win32_Graphics_Direct3D_Fxc` from `victory-gpu`'s `windows` features because nothing on that branch used it any more. With both merged, the `D3DCompile` import here does not resolve until the feature is added back. Locally I skip the test when Wine is detected (`wine_get_version` in ntdll). With that, the full workspace passes under Wine: 395 passed, 0 failed, 6 ignored. _AI-assisted (Claude)._
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-24 18:28 UTC · original

@⁠neonbyte1 Thank you for catching that vkd3d-shader compatibility gap under Wine!

Updated sync_orders_dependent_compute_uav_dispatches in 63e6c9e to:

  • Replace RWByteAddressBuffer (.Load/.Store) with RWStructuredBuffer<uint> indexing (buf_a[idx] / buf_b[idx]).
  • Remove [RootSignature(...)] from the HLSL source and serialize the 3-parameter root signature (b0 2x32-bit constants, u0 UAV, u1 UAV) via D3D12SerializeRootSignature (D3D_ROOT_SIGNATURE_VERSION_1_0).

(Good catch on the #190 stacking note regarding Win32_Graphics_Direct3D_Fxc as well — Fxc is already enabled in crates/victory-gpu/Cargo.toml on main, so if #190 lands first this test will just need that feature kept or dxcompiler.)

@⁠Zipettte Thanks for verifying 038503c on the RX 7700 XT as well!

Re-verified on 63e6c9e:

  • cargo xtask policy: 154 files ok
  • cargo clippy --workspace --all-targets --locked -- -D warnings (default & --all-features): pass
  • cargo test --workspace --locked: 344 passed, 0 failed, 6 ignored
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked (RTX 5070 Ti & VICTORY_D3D12_WARP=1): 55 passed, 0 failed, 1 ignored each (0 D3D12 debug errors)
**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-24 18:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7140698678) @⁠neonbyte1 Thank you for catching that `vkd3d-shader` compatibility gap under Wine! Updated `sync_orders_dependent_compute_uav_dispatches` in `63e6c9e` to: - Replace `RWByteAddressBuffer` (`.Load`/`.Store`) with `RWStructuredBuffer<uint>` indexing (`buf_a[idx]` / `buf_b[idx]`). - Remove `[RootSignature(...)]` from the HLSL source and serialize the 3-parameter root signature (`b0` 2x32-bit constants, `u0` UAV, `u1` UAV) via `D3D12SerializeRootSignature` (`D3D_ROOT_SIGNATURE_VERSION_1_0`). *(Good catch on the `#190` stacking note regarding `Win32_Graphics_Direct3D_Fxc` as well — `Fxc` is already enabled in `crates/victory-gpu/Cargo.toml` on `main`, so if `#190` lands first this test will just need that feature kept or `dxcompiler`.)* @⁠Zipettte Thanks for verifying `038503c` on the RX 7700 XT as well! Re-verified on `63e6c9e`: - `cargo xtask policy`: `154 files ok` - `cargo clippy --workspace --all-targets --locked -- -D warnings` (default & `--all-features`): pass - `cargo test --workspace --locked`: `344 passed, 0 failed, 6 ignored` - `VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked` (RTX 5070 Ti & `VICTORY_D3D12_WARP=1`): `55 passed, 0 failed, 1 ignored` each (0 D3D12 debug errors)
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-25 00:22 UTC · original

Rebased onto upstream main (ce2d91f) at 5a1556e (5215b2e, 5a1556e), resolving the crates/victory-gpu/src/list.rs test-module conflict cleanly while preserving resolve_queries_rejects_overflowing_offset.

Re-verified locally on 5a1556e (Windows 11 x64 / NVIDIA GeForce RTX 5070 Ti + WARP):

  • cargo xtask policy: passed (178 files ok)
  • cargo clippy --workspace --all-targets --locked -- -D warnings (default & --all-features): passed
  • cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked -- --test-threads=1: all passed (victory 12 [10 unit + 2 census], victory-core 11, victory-formats 23 / 4 ignored, victory-game 15, victory-hle 126 [124 unit + 1 fidelityfx + 1 no_dll_planting], victory-loader 26 [22 unit + 1 crash_log + 2 load_probe + 1 title_dlls], victory-pe 10, victory-pipeline 4, xtask 6)
  • cargo test -p victory-gpu --locked -- --test-threads=1 (RTX 5070 Ti): 88 passed; 2 failed; 1 ignored (only the 2 pre-existing 70564ae/ce2d91f failures: descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views)
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1 (RTX 5070 Ti): 91 passed; 2 failed; 1 ignored (same 2 pre-existing failures; resolve_queries_rejects_overflowing_offset, sync_is_safe_on_null_and_non_host_lists, and sync_orders_dependent_compute_uav_dispatches all passed)
  • VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1: 93 passed; 0 failed; 1 ignored
  • cargo test -p victory-shader --features host --locked -- --test-threads=1 (RTX 5070 Ti): 206 passed; 3 failed; 2 ignored (pre-existing 70564ae/ce2d91f failures: stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware)
**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-25 00:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7148438724) Rebased onto upstream `main` (`ce2d91f`) at `5a1556e` (`5215b2e`, `5a1556e`), resolving the `crates/victory-gpu/src/list.rs` test-module conflict cleanly while preserving `resolve_queries_rejects_overflowing_offset`. Re-verified locally on `5a1556e` (Windows 11 x64 / NVIDIA GeForce RTX 5070 Ti + WARP): - `cargo xtask policy`: passed (`178 files ok`) - `cargo clippy --workspace --all-targets --locked -- -D warnings` (default & `--all-features`): passed - `cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked -- --test-threads=1`: all passed (`victory` 12 [10 unit + 2 `census`], `victory-core` 11, `victory-formats` 23 / 4 ignored, `victory-game` 15, `victory-hle` 126 [124 unit + 1 `fidelityfx` + 1 `no_dll_planting`], `victory-loader` 26 [22 unit + 1 `crash_log` + 2 `load_probe` + 1 `title_dlls`], `victory-pe` 10, `victory-pipeline` 4, `xtask` 6) - `cargo test -p victory-gpu --locked -- --test-threads=1` (RTX 5070 Ti): `88 passed; 2 failed; 1 ignored` (only the 2 pre-existing `70564ae`/`ce2d91f` failures: `descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views`) - `VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1` (RTX 5070 Ti): `91 passed; 2 failed; 1 ignored` (same 2 pre-existing failures; `resolve_queries_rejects_overflowing_offset`, `sync_is_safe_on_null_and_non_host_lists`, and `sync_orders_dependent_compute_uav_dispatches` all passed) - `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1`: `93 passed; 0 failed; 1 ignored` - `cargo test -p victory-shader --features host --locked -- --test-threads=1` (RTX 5070 Ti): `206 passed; 3 failed; 2 ignored` (pre-existing `70564ae`/`ce2d91f` failures: `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`)
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:26 UTC · original · edited 2026-11-25 16:02 UTC

Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/list.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (merge-candidate) was for an older state of main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7149556534) · edited 2026-11-25 16:02 UTC <!-- victory-triage v1 head=42b6c9eec8783771175e138b73f5f04f9642b35c verdict=needs-rebase at=2026-11-25T16:00:20Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/list.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (merge-candidate) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-25 01:48 UTC · original

Thanks for the review and clear feedback. Addressed both items and updated the PR description at 42b6c9e:

  1. Rebase onto current upstream/main (940d32f):

    • Rebased cleanly onto 940d32f with only the 2 PR commits remaining (1d05911, 42b6c9e; git rev-list --left-right --count upstream/main...HEAD is 0 2, no merge commits carried).
    • Verified locally on 42b6c9e (Windows 11 x64 / RTX 5070 Ti + WARP):
      • cargo xtask policy: passed (182 files ok)
      • cargo clippy --workspace --all-targets --locked -- -D warnings (default & --all-features): passed
      • Non-GPU workspace crates (--locked -- --test-threads=1): all passed (victory 12, victory-core 13, victory-formats 38 / 5 ignored, victory-game 15, victory-hle 145, victory-loader 38, victory-pe 36, victory-pipeline 7, xtask 6)
      • cargo test -p victory-gpu --locked -- --test-threads=1: 143 passed; 2 failed; 2 ignored (pre-existing 940d32f failures: descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views)
      • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1: 146 passed; 2 failed; 2 ignored (same 2 pre-existing failures; all 3 list::tests::{resolve_queries_rejects_overflowing_offset, sync_is_safe_on_null_and_non_host_lists, sync_orders_dependent_compute_uav_dispatches} passed with 0 D3D12 debug errors)
      • VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1: 148 passed; 0 failed; 2 ignored
      • cargo test -p victory-shader --features host --locked -- --test-threads=1: 244 passed; 3 failed; 3 ignored (same 3 pre-existing RTX 5070 Ti 940d32f failures)
  2. Evidence & flags/control:

    • Why flags/control aren't decoded here: Under docs/asset-policy.md, list.rs avoids baking in unverified console register/cache-flush bitfields; this follows the same pattern already used by barrier_groups (which emits UAV_BARRIER whenever count > 0 without decoding _groups) and resource_barrier (which emits a global UAV_BARRIER for buffer barriers).
    • Why the previous no-op comment was incomplete: Waiting between queue submissions orders work across command lists, not within one D3D12 command list. Consecutive Dispatch/Draw calls accessing the same UAV in a single list require an explicit D3D12_RESOURCE_BARRIER_TYPE_UAV barrier under D3D12 rules.
    • Transparency on limits: I don't have a runnable decrypted title executable locally to record an in-world before/after frame time or hang capture, so I updated the PR description to frame this accurately around D3D12 intra-list correctness rather than claiming measured #732 impact, and noted that sync_orders_dependent_compute_uav_dispatches checks API validity and slot routing rather than forcing overlap on drivers that serialize dispatches by default. Happy to add a diagnostics hit counter or narrow on specific flags/control bits if someone running an in-world capture observes unwanted barrier overhead.
**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/1228#issuecomment-7149980091) Thanks for the review and clear feedback. Addressed both items and updated the PR description at `42b6c9e`: 1. **Rebase onto current `upstream/main` (`940d32f`):** - Rebased cleanly onto `940d32f` with only the 2 PR commits remaining (`1d05911`, `42b6c9e`; `git rev-list --left-right --count upstream/main...HEAD` is `0 2`, no merge commits carried). - Verified locally on `42b6c9e` (Windows 11 x64 / RTX 5070 Ti + WARP): - `cargo xtask policy`: passed (`182 files ok`) - `cargo clippy --workspace --all-targets --locked -- -D warnings` (default & `--all-features`): passed - Non-GPU workspace crates (`--locked -- --test-threads=1`): all passed (`victory` 12, `victory-core` 13, `victory-formats` 38 / 5 ignored, `victory-game` 15, `victory-hle` 145, `victory-loader` 38, `victory-pe` 36, `victory-pipeline` 7, `xtask` 6) - `cargo test -p victory-gpu --locked -- --test-threads=1`: `143 passed; 2 failed; 2 ignored` (pre-existing `940d32f` failures: `descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views`) - `VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1`: `146 passed; 2 failed; 2 ignored` (same 2 pre-existing failures; all 3 `list::tests::{resolve_queries_rejects_overflowing_offset, sync_is_safe_on_null_and_non_host_lists, sync_orders_dependent_compute_uav_dispatches}` passed with 0 D3D12 debug errors) - `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1`: `148 passed; 0 failed; 2 ignored` - `cargo test -p victory-shader --features host --locked -- --test-threads=1`: `244 passed; 3 failed; 3 ignored` (same 3 pre-existing RTX 5070 Ti `940d32f` failures) 2. **Evidence & `flags`/`control`:** - **Why `flags`/`control` aren't decoded here:** Under `docs/asset-policy.md`, `list.rs` avoids baking in unverified console register/cache-flush bitfields; this follows the same pattern already used by `barrier_groups` (which emits `UAV_BARRIER` whenever `count > 0` without decoding `_groups`) and `resource_barrier` (which emits a global `UAV_BARRIER` for buffer barriers). - **Why the previous no-op comment was incomplete:** Waiting between queue submissions orders work *across* command lists, not *within* one D3D12 command list. Consecutive `Dispatch`/`Draw` calls accessing the same UAV in a single list require an explicit `D3D12_RESOURCE_BARRIER_TYPE_UAV` barrier under D3D12 rules. - **Transparency on limits:** I don't have a runnable decrypted title executable locally to record an in-world before/after frame time or hang capture, so I updated the PR description to frame this accurately around D3D12 intra-list correctness rather than claiming measured `#732` impact, and noted that `sync_orders_dependent_compute_uav_dispatches` checks API validity and slot routing rather than forcing overlap on drivers that serialize dispatches by default. Happy to add a `diagnostics` hit counter or narrow on specific `flags`/`control` bits if someone running an in-world capture observes unwanted barrier overhead.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/list.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1228/head:github-bot/gh-1228'
git switch 'github-bot/gh-1228'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1228'
git switch 'github-bot/gh-1228'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1228'
git switch 'github-bot/gh-1228'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1228'
git switch 'main'
git merge --squash 'github-bot/gh-1228'
git switch 'main'
git merge --ff-only 'github-bot/gh-1228'
git switch 'main'
git merge 'github-bot/gh-1228'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1228
No description provided.