Repository navigation
fix(agc): order direct reads after copied writes - #1359
Conversation
4c454c5 to
94e50d1
Compare
|
Rebased on Fedora 44 Release: |
94e50d1 to
779e2ab
Compare
779e2ab to
6aa7e9c
Compare
|
Windows data point for this PR, with a title. Slay the Princess (PPSA24423) intermittently aborts with Tree: AI-assisted (Claude Code). |
|
Correction to my comment above: I ran the control. Plain AI-assisted (Claude Code). |
|
Source-only older-stack Windows cross-test port prepared at https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-copied-direct-ordering head6175e8551 (author retained from d799e59). Resolved overlaps by preserving existing import build-floor bookkeeping, runtime table helper and depth retirement, with completion waits before those decisions. Conventions pass. Not built/staged and no native or 007 result for this port yet; current game still runs the preceding artifact. Will run the added ordering fixture after the quiet import-window comparison finishes. AI-assisted: yes (Codex). |
|
Native Windows cross-test of the isolated port6175e85512b0d8e76e930948f3635a0bab0825a9: copied/direct ordering, storage CPU snapshot, upload lifetime and upload failure all passed1.73s, no skips, RTX5070Ti/GCC15.2. Negative control restored only the three production source files to parentc4981fb10 while retaining your new fixture/shader: agc_copied_direct_ordering fails in0.35s with "fresh direct consumer ran before copied write-back" (CTest8). Production fix restored; rebuilding for the final restored check. Nothing staged into the game yet. SleglJan has reported a separate terrain readback/completion-label ordering case on share/007-hull-v1; coordinating comparison before combining changes. AI-assisted: yes (Codex). |
|
Combined Windows cross-test with #4017 now built: cfeae7d, https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-retirement-ordering-cross-test . Your credited6175 port (canonical d799e59) applies cleanly on the locked-retirement5dd integration. Native copied_direct_ordering, host_import_retirement, driver_host_import_at_map, storage_cpu_snapshot, storage_upload_lifetime/failure all pass2.05s; graphics, bda_device, tessellation pass5.32s. All nine execute without CTest skips. Separate production-only negative control for your ordering behavior is recorded above; no new causality claim from these combined checks. Guarded warm007 run started with graphics SHA2560D503946D34725F16ECDAA41B581313ABE0021B5CC9CB2E0D063DFF192AE80AA. Same cache/config; no profile/capture or compute optimization disable. Goal is to distinguish copied-write ordering from the unsupported image-table operations that remain in the previous run. No gameplay/FPS success claim yet. AI-assisted: Codex. |
d799e59 to
62f9702
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Rebased onto current main (conflicts were adjacency only: the test list in libSceAgcDriver/CMakeLists.txt and GuestBufferMemory::UploadFinish, where I kept main's StorageTexture::FlushPending loop together with the new completion waits). Checked on RADV: agc_copied_direct_ordering, agc_storage_written_buffer_order, agc_host_import_*, agc_storage_*, agc_descriptor_pool_*, guest_memory and agc_driver_graphics pass. The regression fixture failing without the fix is covered by the author's lavapipe run and @Scramblrrrr's Windows run (RTX 5070 Ti); merging once the full Build is green.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Wait for overlapping CPU writebacks and completion labels before importing buffers or accepting cached image resources. Cover texture data and compression metadata, retain asynchronous disjoint and GPU-only dependencies, and avoid recursive completion waits. Reproduced fresh-buffer and cached-image failures with CPU Vulkan before fixing them. Regression covers fresh/reused bindings, dispatch/draw copied writers, texel/metadata updates, labels and no-wait cases; passes CPU Vulkan and RX 6600 synchronization validation. Graphics and guest-memory suites pass. The Skyrim loading GPU fault remains unattributed. AI-assisted implementation and independent code review.
…n Windows Co-Authored-By: Claude <noreply@anthropic.com>
|
The full Build failed on Windows only in |
62f9702 to
3949fb9
Compare
What
Complete overlapping copied-buffer writebacks and CPU completion labels before fresh or reused shader resources read guest memory directly. Apply the same ordering to sampled/storage texture contents and compression metadata, before accepting current refresh/revalidation proofs. Disjoint work and GPU-only writes stay asynchronous; completion callbacks cannot recurse into these waits.
Rebased only this correctness change on
d146ec1b6. The old #1324/#1357 import stack is removed. Current import retirement, span/window behavior and storage refresh proofs are retained. The old TechnicalDebt addition belonged to the removed import stack and is absent from this diff.Depends on: none. Related #1157 is a separate DMA-wait optimization.
Tested
Fedora 44, GCC 16 Release, RX 6600/RADV and lavapipe. The standalone
agc_copied_direct_orderingtest passes on both with Vulkan core and synchronization validation and no validation diagnostics or skipped cases. It covers fresh/reused direct buffers, dispatch/draw copied-writer registries, overlapping completion labels, cached images, compression metadata, disjoint consumers and GPU-only no-wait behavior. Fixtures use the current typed-image binding ABI.With the same regression fixture and all production files restored to main
d146ec1b6, lavapipe fails withfresh direct consumer ran before copied write-back. Restoring this fix passes.Seven focused CTests pass: copied/direct ordering, graphics, guest memory, import unmap, storage upload lifetime/failure, and descriptor pool recycling (3.47 seconds total). Conventions and whitespace checks pass. No title attribution or Windows result is claimed for this change; full Linux/Windows CI and maintainer re-review remain.
Checklist
d146ec1b6; related work checked and unrelated prerequisites removed.