fix(agc): name in-place draw inputs and multisampled targets in pass hazards #6175

Merged
mitul72 merged 1 commit from upstream-pr/6175 into main 2026-10-18 22:16:03 +00:00
mitul72 commented 2026-10-15 00:29:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mitul72 on 2026-10-15T00:29:34Z.


What

A recorded draw's pass access listed shader-resource reads, indirect arguments, storage images and resident color targets, but not the index and vertex ranges bound in place from host imports (DrawInputs::inPlaceReads), nor its multisampled color targets (null in RecordedDraw::targets). Consequences:

  • A later draw writing those ranges through a shader buffer found no hazard: no barrier was recorded, or the later draw continued the pass, so its writes could land before the earlier draw fetched its inputs.
  • Two passes sharing a multisampled target under different pass keys had unordered attachment writes and store operations on the image.

The in-place input ranges now join the pass reads, and MultisampleTargetView reports the target's image, which joins the pass attachments as written.

New execution tests: PassInputHazard (in-place vertex/index reads against a later shader write) and MultisampledPassOrder (multisampled target shared across pass keys).

Tested

Linux, RX 9060 XT (RADV GFX12, local Mesa). Full ctest passes except agc_driver_tessellation, which segfaults inside RADV while linking pipeline libraries on unmodified upstream 703aa8f63 as well.

The two new execution tests above.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9060 XT (RADV GFX12, local Mesa build), Linux
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4866398016 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6175). Originally posted by [mitul72](https://github.com/mitul72) on 2026-10-15T00:29:34Z. --- ### What A recorded draw's pass access listed shader-resource reads, indirect arguments, storage images and resident color targets, but not the index and vertex ranges bound in place from host imports (`DrawInputs::inPlaceReads`), nor its multisampled color targets (null in `RecordedDraw::targets`). Consequences: - A later draw writing those ranges through a shader buffer found no hazard: no barrier was recorded, or the later draw continued the pass, so its writes could land before the earlier draw fetched its inputs. - Two passes sharing a multisampled target under different pass keys had unordered attachment writes and store operations on the image. The in-place input ranges now join the pass reads, and `MultisampleTargetView` reports the target's image, which joins the pass attachments as written. New execution tests: `PassInputHazard` (in-place vertex/index reads against a later shader write) and `MultisampledPassOrder` (multisampled target shared across pass keys). ### Tested Linux, RX 9060 XT (RADV GFX12, local Mesa). Full `ctest` passes except `agc_driver_tessellation`, which segfaults inside RADV while linking pipeline libraries on unmodified upstream 703aa8f63 as well. The two new execution tests above. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 9060 XT (RADV GFX12, local Mesa build), Linux - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-15 12:16:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:16:04Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5441 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6312 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6414 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6529 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6628 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6763 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 7250 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191821182 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6175#issuecomment-6191821182). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:16:04Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 4072](https://www.github.com/boykopovar/AnyPS5/pull/4072) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6312](https://www.github.com/boykopovar/AnyPS5/pull/6312) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6414](https://www.github.com/boykopovar/AnyPS5/pull/6414) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6553](https://www.github.com/boykopovar/AnyPS5/pull/6553) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6628](https://www.github.com/boykopovar/AnyPS5/pull/6628) | `core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6763](https://www.github.com/boykopovar/AnyPS5/pull/6763) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 7250](https://www.github.com/boykopovar/AnyPS5/pull/7250) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` |
Neithennn commented 2026-10-15 15:52:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-15T15:52:31Z.


Windows NVIDIA run, since the description lists RADV only.

Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1. Head ece01209b merged onto main 92e50418f; full build succeeds.

  • agc_driver_multisampled_pass_order, agc_driver_pass_input_hazard, agc_pass_hazards: pass.
  • Full ctest -j 8: 1296/1296, including agc_driver_tessellation. Unchanged main on the same machine: 1294/1294.

No title run.

AI-assisted: yes (runs done with Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6196282247 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6175#issuecomment-6196282247). Originally posted by [Neithennn](https://github.com/Neithennn) on 2026-10-15T15:52:31Z. --- Windows NVIDIA run, since the description lists RADV only. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_NO_SHADER_CACHE=1`. Head `ece01209b` merged onto main `92e50418f`; full build succeeds. - `agc_driver_multisampled_pass_order`, `agc_driver_pass_input_hazard`, `agc_pass_hazards`: pass. - Full `ctest -j 8`: 1296/1296, including `agc_driver_tessellation`. Unchanged main on the same machine: 1294/1294. No title run. AI-assisted: yes (runs done with Claude Code).
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
boykopovar/AnyPS5!6175
No description provided.