Repository navigation
GPU: order shader writes on command list pipeline syncs (#732) - #1228
Ctrl-Alt-Haze wants to merge 2 commits into
Conversation
…d-sync-uav GPU: order shader writes on command list pipeline syncs (Marvisak#1228)
|
On Linux under Wine (vkd3d-proton, RTX 5090) the new #346 hit the same limit. It reads and writes A stacking note: #190 removes Locally I skip the test when Wine is detected ( AI-assisted (Claude). |
|
@neonbyte1 Thank you for catching that Updated
(Good catch on the @Zipettte Thanks for verifying Re-verified on
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63e6c9e to
5a1556e
Compare
|
Rebased onto upstream Re-verified locally on
|
|
Automated triage for the maintainers. This pull request no longer merges cleanly into Generated by Claude Code |
5a1556e to
42b6c9e
Compare
|
Thanks for the review and clear feedback. Addressed both items and updated the PR description at
|
Forward guest syncs to an ordering barrier on the existing host command list and preserve the original slot and D3D12 regression tests. Linux GPU crate tests and Windows MSVC workspace test compilation passed.
Summary
Console command-list pipeline syncs (
LIST_FUNCTIONSslots 129/130 andNEWER_LIST_FUNCTIONSslots 131/132/146) previously resolved to an empty no-opsyncwith 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 consecutiveDispatch/Drawcalls recorded within the same command list without an explicit UAV barrier (D3D12_RESOURCE_BARRIER_TYPE_UAV).This PR makes
syncemit a globalUAV_BARRIERvia the samewait_for_shader_writes(this)helper used bybarrier_groups(related to #732, though not yet measured in-world).Changes
crates/victory-gpu/src/list.rs:wait_for_shader_writes(this)shared bysyncandbarrier_groups, emittingUAV_BARRIERonhost_list(this)while safely no-oping whenthisis null,hostisNone, or on non-Windows targets.barrier_groupsandresource_barrierby not decoding undocumented consoleflags/controlbitfields without title measurements.list::tests::sync_is_safe_on_null_and_non_host_lists(verifiesLIST_FUNCTIONSslots 129/130,NEWER_LIST_FUNCTIONSslots 131/132/146, nullthis, andhost: Nonelists).list::tests::sync_orders_dependent_compute_uav_dispatches(live D3D12cs_5_14-stage dependent compute dispatches throughsync/barrier_groupsunder 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
VICTORY_D3D12_WARP=1), D3D12 Debug Layer (VICTORY_D3D12_DEBUG=1), rebased ontoupstream/main(940d32f) at42b6c9e(1d05911,42b6c9e,0behind /2ahead).cargo xtask policy: passed (182 files ok)cargo clippy --workspace --all-targets --locked -- -D warnings(default &--all-features): passedcargo test --workspace --exclude victory-gpu --exclude victory-shader --locked -- --test-threads=1: all passed (victory12 [10 unit + 2census],victory-core13,victory-formats38 / 5 ignored,victory-game15,victory-hle145 [143 unit + 1fidelityfx+ 1no_dll_planting],victory-loader38 [34 unit + 1crash_log+ 2load_probe+ 1title_dlls],victory-pe36,victory-pipeline7,xtask6)cargo test -p victory-gpu --locked -- --test-threads=1(RTX 5070 Ti):143 passed; 2 failed; 2 ignored(pre-existing940d32ffailures: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_dispatchespassed)VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1:148 passed; 0 failed; 2 ignoredcargo test -p victory-shader --features host --locked -- --test-threads=1(RTX 5070 Ti):244 passed; 3 failed; 3 ignored(pre-existing940d32ffailures: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)AI use: Written and rebased locally with AI assistance, independently audited and verified on RTX 5070 Ti + WARP.