Skip to content

feat(agc): publish native color for read-only shader buffers - #7002

Open
Amoenus wants to merge 91 commits into
boykopovar:mainfrom
Amoenus:codex/feat-native-color-buffer-read-mainbfc
Open

Amoenus wants to merge 91 commits into
boykopovar:mainfrom
Amoenus:codex/feat-native-color-buffer-read-mainbfc

Conversation

@Amoenus

@Amoenus Amoenus commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Publish supported native MSAA color contents before logical read-only shader-buffer consumers upload or reuse them. This follows refreshed #6995's CPU handoff and retains exact #6498's strict binding guard. The current refresh below includes main 3b20a366ca, with prerequisite attribution and scope retained.

Image-alias scope: logical read-only buffer descriptors here exclude sampled/storage-image aliases. Merged #5881's matching native-MSAA storage-view path remains separate. A1x image at twice the extent over4x native color memory, format reinterpretation and SW_64KB_S publication are not implemented by this PR. Mirage report and source-only clarification; no Mirage unblock is claimed.

Preparation, final upload, compute reuse validation and moved draw snapshots request the sample-preserving handoff before command-buffer binding. Binding still only asserts that no unsupported native owner remains: it does not wait or submit. Moved snapshots check the current logical descriptor range, leaving an unused old range guarded. Writable buffers and unsupported layouts remain refused.

All writable bindings are checked before any read-only publication. During extraction, a preparation-only regression found that processing a read-only alias first could retire its native owner and let a later overlapping writable binding through. The submitted implementation checks writable bindings first and verifies refusal leaves the complete guest bytes and native owner intact. The regression never executes the overlapping writes.

The direct difference from #6995 composed with the same main is five files, +462/-15, including declared prerequisite #6498 and its retained refusal cases. The comparison base isolates the source delta; it is not a separate tested binary. The existing read-only handoff, tests and attribution are preserved. The submission continues to use the actual device-draw fixture.

Related #6808 changes native color reuse but does not implement this sample-preserving buffer handoff. Coordination and exact fork findings are maintained in #6480 and our existing comment on #6808. No duplicate implementation was found in the open/merged searches. The checker also flags #6947's adjacent snapshot early-return edit. Coordination preserves this handoff before that condition when rebasing; its combined GPU-heap/space-reuse path remains untested. General metadata/depth publication, fixed-function vertex/index inputs, dynamic BDA and console equivalence remain outside this change and are recorded in technical debt.

Tested

Current refresh (2026-10-19 UTC): head 8221cbccad incorporates main 3b20a366caa8a8de5509e7add433c55275aa6f29, refreshed #6995 d0a7c59630 and exact #6498 103e467afc, with original attribution retained.

This includes main's copied-writer overlap correction (#6365): mixed producers wait for copied ranges instead of unrelated direct GPU ranges. Main's optional timing-query change, shader position-export change, host-read coherence, copy settlement, precise write tracking and merged #6215 lifetime/device work are retained. The own synchronization/strict-binding routines and complete buffer execution fixture remain unchanged from the qualified 4e5ffdda3c checkpoint. The fixture blob is 6034ab8e44ca68842716d7a9e2e988bc91154857.

For review, direct comparison against #6995 composed with the same main is five files, +462/-15, including the declared #6498 prerequisite/refusals. The comparison base is a source composition for isolating this delta, not a separate tested binary or an additional PR.

Matching Windows build: full relinker/system libraries and all selected fixtures pass. Seventeen GPU groups repeat three times per verified physical device: buffer publication/refusals/draw recipe; CPU and explicit publication; snapshot/native readback/initial contents; default MSAA sampling/shared readback/upload/pass ordering; retirement/storage-file write/alias-copy label/two-device host-only fills; and main's mixed copied/direct ordering mode. Five CPU groups repeat three times: graphics, shader memory, copy-input budget, depth-copy budget and write tracking. 51 NVIDIA + 51 AMD + 15 CPU = 117 passes, no VUIDs/validation errors/warnings/whole-test skips/timeouts. The copied/direct fixture's internal capability-skip text is also checked and absent. Actual device identity and Khronos insertion are verified per process; each test has a 30-second bound.

Windows 11 Enterprise 26200 / WinLibs GCC 15.2 r7; RTX 5080 driver 610.62/32.0.16.1062, Radeon(TM) Graphics driver 32.0.21036.18; Khronos 1.4.363. Vulkan required, project shader cache disabled, driver caches uncontrolled, no separate game process.

Cppcheck 2.20 then clang-tidy 23.1.3 on ShaderResources, MultisampleTarget and the fixture completed in 63.632 analyzer seconds, with no parser/configuration failures or timeouts. Three Cppcheck advisories remain: trace pass-by-value advice and the two inspected conditional/checked allocation reports. Two clang analyzer paths were inspected again: the timer path assumes its null constructor frame becomes non-null without initialization; the memo path gives an unchanged const span contradictory eight/non-eight extents. The constructor/Get and span invariants rule out those reported null paths. PerformanceTimer/CaptureTrace headers match main, and the precollectImages implementation is unchanged. No confirmed new defect, suppression, automatic fix or static-clean claim.

Historical read-path controls remain scoped to 4e5f: six expected failures when only the read-only synchronization call becomes a strict native-owner refusal, then exact restoration/full matching rebuild and 12 passes. Those unchanged-code controls were not rerun on 8221; the new main/composition tests above are separate evidence. No writable-buffer, image-alias, BDA or fixed-function publication is added.

Later main a373e85e56 merges cleanly. Its inspected changes cover the optional Windows allocator, versioned register-default tables, nested-return structurization and later-slice depth HTILE clearing; the buffer synchronization, binding guard and native color snapshot/publisher are unchanged. These later changes are not included in the exact tested composition. No new Linux/Intel/full-suite/console-equivalence, title-unblock or performance claim. The peer's live 1x-image write followed by 4x reuse remains a separate unresolved scope below. Remaining declared dependencies must land; ordinary Sonic observations remain in #7260 and discussion #4443.

Previous 4e5f fork checkpoint, retained at its original pins, retained at its original pins

Validated fork checkpoint (2026-10-18 UTC; published PR head remains 131396fc0d): head 4e5ffdda3c incorporates main 0fd3555ad6ea56e2acc4caaaec9019db4314db47 through published #6995 parent 4206f220d1; current #6498 head 103e467afc is also an ancestor. Credited dependency history is retained. The merge is clean. The synchronization/binding-check functions and all three buffer-publication/refusal/draw-recipe fixtures are byte-identical to published 131396fc0d. The full difference to #6995 is five files, +462/-15, including the declared #6498 prerequisite.

Matching full Windows relinker/system-library and affected fixture builds pass. Twelve GPU groups repeat 3 times per verified physical device: buffer publication, buffer refusal, draw recipe, automatic CPU publication, explicit publication, snapshot, native readback, initialization, default multisample sampling, shared readback, upload and pass ordering. 36 NVIDIA + 36 AMD + 6 CPU = 78 passes, zero selected whole-test skips/VUIDs/validation errors/warnings. Graphics and shader-memory CPU groups each repeat 3 times. Actual device identity and Khronos 1.4.363 loading verified per GPU process; every test has a 30-second bound.

Matched read-path control: keep writable-first checks, strict binding guard, publisher and fixtures intact; replace only read-only buffer synchronization with a strict native-owner refusal. Three fresh buffer-publication runs per GPU fail with AGC graphics: a shader buffer read of ...: 6 expected failures, no timeouts or Vulkan diagnostics. Restore exact source bytes (SHA-256 checked), repeat the full matching build, then buffer publication and draw recipe each pass 3 times per GPU: 12 restored passes. No control is committed.

Windows 11 Enterprise 26200 / WinLibs GCC 15.2 r7: RTX 5080 driver 610.62/32.0.16.1062 and Radeon(TM) Graphics driver 32.0.21036.18. Vulkan required, application shader cache disabled, serial fresh processes; no concurrent game.

Cppcheck 2.20 then clang-tidy 23.1.3 completed on ShaderResources, MultisampleTarget and the fixture in 63.828 analyzer seconds, no parser/configuration failures or timeouts. Three Cppcheck advisories remain: two inspected conditional/checked allocation reports, plus pass-by-value advice in unchanged main trace code. Two clang analyzer warnings were inspected: the timer trace assumes a null constructor frame becomes non-null at Finish without initialization; the memo trace assumes an unchanged const span has both a non-eight and eight-word extent. The constructor/Get invariant and unchanged span rule out those reported null paths. PerformanceTimer/CaptureTrace headers and precollectImages are byte-identical to main. No confirmed new defect, suppression, automatic fix or static-clean claim.

New-base refresh pending: main 84c1a4d9a2 subsequently landed GPU host-read coherence, alias-copy destination settlement and transient copy-budget accounting. Its test additions conflict with the shared CMake insertion point. These dependencies need renewed validation before promoting this checkpoint to the PR branch. The refreshed parent on that base is being built; the completed results above remain pinned to 4e5f/0fd. The checkpoint is preserved on our fork validation branch. Historical evidence and the peer live-alias boundary keep their explicit scope below.

Previous validation retained at its original pins

Current refresh (2026-10-18): exact head 131396fc0dfd98eb9cb7347fae9809c941feedb1, main218aa8f00b. Full Windows relinker/system-library and affected fixture builds pass. Ten GPU groups repeat3 times on each verified physical device, plus graphics/shader-memory repeat3 times: 30 NVIDIA +30 AMD +6 CPU =66 passes, no skips, VUIDs, validation errors or warnings. Khronos1.4.363 loading and actual GPU identity are verified per GPU process; all tests fit the30s bound.

Groups cover native color readback, initial contents, snapshots, GPU/CPU publication, buffer publication/refusal, the draw recipe, sampled multisample targets and native-MSAA vertex inputs. Windows11 Enterprise26200, WinLibs GCC15.2r7; RTX5080 driver610.62/32.0.16.1062; Radeon(TM) Graphics driver32.0.21036.18. Conventions pass against inspected later main5057673804. No additional title or exact-head Linux run is claimed; older Linux/negative-control evidence below retains its own pins. #7570 remains the separate sampled-cache fixture selector correction.

Current rebase validation (2026-10-18): exact head 53282f62c28a27a897f6f0de3e6deb46074f2140, main 9caecfd2d5, declared dependencies retained. Windows11 Enterprise26200 / WinLibs GCC15.2r7; Ubuntu24.04 / GCC13.3 / Mesa25.2.8 lavapipe. Vulkan required, application shader cache disabled, serial fresh processes; host driver caches uncontrolled.

  • Relinker and all system-library builds (relinker, libs) and the sample-target/CPU-graphics targets pass on both operating systems.
  • 96 selected test executions pass, three fresh runs per selected group. Longest individual test 5.07s, with a30s timeout. No whole-test skips/timeouts. Existing capability-dependent subcases keep their fixture limits.
Backend Passed executions
nvidia 30
amd 30
linux 33
cpu-windows 3
  • Every GPU process logs the intended device: NVIDIA RTX5080 10de:2c02, AMD Radeon(TM) Graphics 1002:13c0, or Linux lavapipe. Validation is loaded, with zero logged VUIDs, validation errors or warnings in these selected runs.
  • Conventions and diff whitespace pass. Cppcheck2.20 then clang-tidy23.1.3 finish across ShaderResources and the fixture without parser/configuration failures or timeouts. Four existing advisory categories remain in unchanged code: CaptureTrace copying, fixture allocation, PerformanceTimer nullability and ShaderResources nullability. The latter diagnostic is outside the modified hunks; the fixture has no clang-tidy diagnostics. No static-clean claim.
  • The branch contains the exact newly published feat(agc): publish native color before guest memory reads #6995 and fix(agc): refuse buffer aliases of native MSAA targets #6498 heads. Duplicate fixture helpers are consolidated; the original six refusal cases run under the unsupported-layout mode, while supported R_X reads have positive publication checks. Binding stays a strict assertion; writable aliases are rejected before read-only publication. The current movedOnly argument and upstream BGRA coverage remain intact. Device-draw, moved-input and unchanged-recipe cases pass; BDA and fixed-function consumer publication remain outside this change.

This is focused library/fixture validation. Historical game bring-up, fault controls and other results below retain their original pins. No new whole-title, FPS, completion or console-equivalence claim.

Earlier validation and maintenance at their original pins

Synthetic Vulkan execution fixtures. The original 57-process matrix and analysis retain pin 066f527694f9a71b8ff379bf9553dbdfc3000853. Final head 3d457b9a832c28826c826ff99de01e17872398ad includes main 29bfe31dd8a20650ba01059d44d96100c9b5e526. Its own ShaderResources implementation and fixture are unchanged; upstream shader changes received separate validation below. Both final OS builds compile relinker, libraries and the selected fixture.

Comparison baseline with that main and both prerequisites: 59ca589f0. Pre-feature production guard matches 8ae7d561e19311cdbc6278c35ff5c1bf192d89bf exactly.

  • 24 additional rebase passes: all three new modes once per NVIDIA/AMD/llvmpipe adapter, plus all three under llvmpipe core validation (12), at 2835de774 after main's dominator-bitset change; the same bounded matrix again at final 3d457b9a8 after the sampler/runtime-ABI change (12). All byte, ownership, mixed-alias and pixel oracles pass; no validation errors. There are 81 successful processes across these explicit pins, not 81 runs of the final head. Earlier controls remain at their original pins.

  • 57 successful processes: buffer publication, unsupported-buffer refusal and direct draw routing three times per verified NVIDIA/AMD/llvmpipe device (27); six existing affected modes once per device (18); those three new modes once under llvmpipe core validation (3); then all three once per device after restoring the control (9). Maximum 3.43 s. Project shader cache disabled; each mode has a 30 s timeout. Both final OS builds compile relinker, libraries and the selected fixture.

  • Buffer publication covers fresh, warmed, edge-overlapping, deferred and cached-recipe dispatches, adjacent logical ranges, a standalone written alias, and overlapping read-only/writable preparation. The latter checks all guest bytes and native-owner retention. Unsupported Standard4KB coverage retains six refusals, prepared/deferred and non-null recipe controls, adjacent reads, output bounds and unchanged native samples. Its neighbor control starts after the conservative guarded extent, not after an inferred console footprint.

  • Draw coverage executes ordinary VulkanDevice::Draw, eligible unchanged-input DrawFromRecipe, and a moved-fragment ordinary draw retaining the same cached resource template. RGBA32F output distinguishes original/current/moved raw words; covered/clear pixels, all four channels, complete source bytes/padding, output neighbors and the unused old guard are checked. This does not execute PM4 draw-key/variant selection. New shader-buffer fixtures cover 4x RGBA16F, not all formats/sample counts.

  • 18 pre-feature refusal failures: control 1e823c956 restores only pre-feature ShaderResources source/header. Both publication and draw modes fail three times per device with the existing host-only refusal. Restoration passes. This is main plus the required foundation/guard stack, not unchanged main without its dependencies.

  • Nine ordering-regression failures: control 7698eb434 retains the earlier single-pass proposal. Three preparation-only processes per device return a non-null resource plan without refusing the overlapping writable alias. The final writable-first pass fixes this. No overlapping writes, device-loss or timeout control is executed.

  • Khronos 1.4.363.0 core layer insertion confirmed for instance/device in all three llvmpipe modes: zero VUIDs/validation errors. No synchronization validation or Windows layer claim.

  • Cppcheck 2.20 followed by clang-tidy 23.1.3: 40.963 s analysis; two Cppcheck and two clang-tidy advisories in unchanged CaptureTrace, allocation-helper, PerformanceTimer and image-binding contexts. Source-context equality against the prerequisite baseline is checked. No new selected diagnostic, parser/configuration failure, suppression or automatic fix; not a clean whole-project analysis. Conventions, whitespace and registration checks pass (924 executables, not a full-suite execution).

Windows 11 Enterprise 26200 / WinLibs GCC15.2r7; Ubuntu24.04 WSL / GCC13.3 / Mesa25.2.8 llvmpipe LLVM20.1.2. Physical device identity is verified per process. Existing CPU modes include 2/4/8 samples and XOR 0/0x8100 on hardware; software excludes unsupported 2x/8x subcases. No fresh title startup/FPS, PS5 equivalence, performance improvement or guarantee against concurrent unsynchronized guest writes is claimed.

Current rebase validation, 2026-10-17

Current head: 16ccc1935e, containing main 21a0672ab25e8170e128f03a136085101e76e2c2. It merges cleanly with later main 47a266cf975f00f7fba94013467d03bfa5e355e9; intervening main changes do not alter this MSAA implementation or these fixtures. Source pins were frozen during validation. The declared prerequisite stack and original authorship are retained; foreign dependency commits have not been replaced. Removed the duplicate test-only VulkanDeviceTestAccess definition introduced by the main merge; retained the single identical upstream accessor. Kept the adapted buffer helper/refusal cases and removed the obsolete duplicate helper block; separate-function cleanup retains the correct device lifetime. Refreshed #6498 ancestry is dd44829.

On this exact head, full relinker/system-library (relinker, libs) builds and affected fixture/CPU graphics targets pass on Windows 11 Enterprise 26200 / WinLibs GCC15.2r7 and Ubuntu24.04 / GCC13.3. agc_driver_native_color_buffer_publication, agc_driver_native_color_buffer_refusal, agc_driver_native_color_draw_recipe, agc_driver_native_msaa_vertex_input each pass three fresh processes on RTX5080 (10de:2c02, driver32.0.16.1062), Radeon Graphics (1002:13c0, driver32.0.21036.18), and Mesa25.2.8 llvmpipe (LLVM20.1.2): 24 physical-GPU test passes plus 12 software-Vulkan passes. CPU graphics passes three repetitions on each OS. Device identity verified per process, Vulkan required, project shader cache disabled, serial tests, 30s per-test bound; maximum complete selected CTest invocation 3.265s. Windows Khronos1.4.363 is confirmed loaded with zero observed validation errors/warnings. No whole-test skips/timeouts; llvmpipe's unsupported 2x/8x internal sample subcases remain excluded by the existing fixture.

Conventions and diff whitespace checks pass against the inspected later main. Earlier analyzer/regression controls remain below at their original pins; no new static-clean, full-suite, Intel/console-equivalence, title-startup or FPS claim. The first local attempts exposed duplicate fixture declarations/helpers; the counts above refer only to the corrected head.

At this final composition, main's seven shutdown-worker groups also pass three repetitions on each OS (42 CPU test passes). These are lifecycle controls, not additional GPU runs.

Earlier rebase validation retained at its original heads

Rebase validation, 2026-10-17

Current head: 75ea360469769eb18cd53142cbddf44c6a832647, containing main ef674f5af3e4d0fe44fda10e46d36ead2c262c0e and refreshed parent #6973 at b64742f8679010aba1209c01f1155f91f27ec860. Replayed this PR's own topic commits onto the refreshed parent chain; original published heads are preserved. The native-color implementation/header and combined sample fixture are byte-for-byte identical to the preceding published head. The inherited correction in #6973 gives two older MSAA control fixtures modeled RenderTarget allocations, retaining all assertions and production refusals. Thanks to @blawesom for the parent rebase handoff.

Main advanced to 6d6e33d638ab22a9270079e035b7d981dd587f3c during these runs. Its locale/aligned-new/NID-tool changes do not touch this MSAA code or contribution instructions; the tested source pins were retained, and conventions were rechecked against the new main before push.

At this exact head, Windows 11 Enterprise 26200 / WinLibs GCC 15.2.0 r7 builds the full relinker/system-library targets and affected fixtures. agc_driver_depth_storage_dispatch, agc_driver_multisample_readback, agc_driver_multisample_readback_depth, agc_driver_multisample_readback_uint128, agc_driver_multisample_readback_uint16, agc_driver_multisample_readback_uint64, agc_driver_multisample_readback_uint8, agc_driver_multisample_readback_upload, agc_driver_multisampled_pass_order, agc_driver_native_color_buffer_publication, agc_driver_native_color_buffer_refusal, agc_driver_native_color_cpu_publication, agc_driver_native_color_draw_recipe, agc_driver_native_color_initial, agc_driver_native_color_publication, agc_driver_native_color_readback, agc_driver_native_color_snapshot, agc_driver_sample_multisample_target: 3/3 on NVIDIA RTX 5080 (driver 32.0.16.1062) and AMD Radeon(TM) Graphics (32.0.21036.18), 108/108 fresh processes. Vulkan required, shader cache disabled, serial tests, actual selected vendor/device verified, 30-second timeout. python tools/check_conventions.py --base origin/main passes.

The final dependent composition #7002 at 75ea360469769eb18cd53142cbddf44c6a832647 also builds relinker/libs and affected fixtures on Ubuntu 24.04 / GCC 13.3, then passes all eighteen selected MSAA groups 3/3 on Mesa 25.2.8 llvmpipe (LLVM 20.1.2), 54/54. This Linux result belongs to that final composition; it is not a standalone Linux run of every intermediate head. Unsupported software 2x/8x subcases are explicitly excluded; no whole-suite, Intel, game-startup or FPS claim. The earlier Intel upload mismatch reported on #6973 is not resolved by our device coverage.

Checklist

Peer live-alias evidence and scope

hugodearaujo's report uses main 6efb7261b, #7532 51e5eae15, #7533 bfcb8fcdf, #6343 ce5b0c395 and older #7002 d9b584e423. Their local guard-retirement experiment reports 45 repeated cycles: create two 960x540 4x targets (R11G11B10F and R16F), perform 1920x1080 1x storage-write/overlapping texture-read accesses, then draw to the 4x targets again. This is evidence of live alias reuse, not merely allocation reuse after a target dies. It is the peer's observation at those pins, not a new local reproduction or proof of correct pixels after retiring a guard.

This PR only prepares native color for read-only shader buffers. It does not establish the reverse handoff from 1x storage writes into a later 4x target, or coherence between the overlapping image views. Retiring the guard alone does not settle that requirement. Clears before reuse and intermediate multisample reads are unconfirmed in the peer report. Keep those unknowns explicit in the broader #6480 alias work; this report does not broaden the PR's supported paths or title-unblock claim.

mitul72 and others added 6 commits October 14, 2026 18:13
…hazards

A recorded draw's pass access listed its shader-resource reads, indirect
arguments, storage images and resident color targets, but not the index
and vertex ranges it binds in place from host imports
(DrawInputs::inPlaceReads) nor its multisampled color targets (null in
RecordedDraw::targets). A later draw writing those ranges through a
shader buffer, or a pass sharing the multisampled target under another
pass key, found no hazard: the break between the passes recorded no
barrier, or the later draw continued the pass, so its writes could land
before the earlier draw fetched its inputs, and the two passes' attachment
writes and store operations on the multisampled image were unordered.

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

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 4449 docs/dev/debt/libSceAgcDriver.md L187-188
PR 6146 docs/dev/debt/libSceAgcDriver.md L85
PR 6412 docs/dev/debt/libSceAgcDriver.md L85
PR 6636 docs/dev/debt/libSceAgcDriver.md L182
PR 6669 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L499-500
PR 6760 docs/dev/debt/libSceAgcDriver.md L107
PR 6821 docs/dev/debt/libSceAgcDriver.md L8
PR 6959 docs/dev/debt/libSceAgcDriver.md L187-188
PR 7250 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L22-23, L205-206, L255, L333-335
PR 7446 docs/dev/debt/libSceAgcDriver.md L107-108
PR 7683 docs/dev/debt/libSceAgcDriver.md L106-107

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 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 4650 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5441 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6177 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6360 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6451 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6472 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6486 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6503 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6505 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6529 docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6543 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6563 docs/dev/debt/libSceAgcDriver.md
PR 6567 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6571 docs/dev/debt/libSceAgcDriver.md
PR 6606 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6612 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6628 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp
PR 6639 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6701 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6718 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6759 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6762 docs/dev/debt/libSceAgcDriver.md
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6786 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6820 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6937 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6941 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6963 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6966 docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6972 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7008 docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7233 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7258 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7369 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7390 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7650 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md

@akkadbakkad89

Copy link
Copy Markdown

Runtime datapoint on NVIDIA hardware. RTX 3070, Ampere, driver 617.42, Windows 11 26200, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head 3d457b9, all binaries rebuilt on this head, ctest serial:

Test Result
agc_driver_native_color_buffer_publication pass
agc_driver_native_color_buffer_refusal pass
agc_driver_native_color_draw_recipe pass
agc_driver_native_color_cpu_publication pass
agc_driver_native_color_publication pass
agc_driver_native_color_snapshot pass
agc_driver_native_color_readback pass
agc_driver_native_color_initial pass
agc_driver_msaa_layout pass
agc_driver_multisample_readback_* (uint8/16/64/128, depth, upload) pass x6
agc_driver_sample_multisample_target pass
agc_driver_sample_mask_multisample pass

18/18 pass on Ampere — read-only shader-buffer publication and the buffer-refusal boundary hold.

Amoenus and others added 12 commits October 17, 2026 10:29
…hazards

A recorded draw's pass access listed its shader-resource reads, indirect
arguments, storage images and resident color targets, but not the index
and vertex ranges it binds in place from host imports
(DrawInputs::inPlaceReads) nor its multisampled color targets (null in
RecordedDraw::targets). A later draw writing those ranges through a
shader buffer, or a pass sharing the multisampled target under another
pass key, found no hazard: the break between the passes recorded no
barrier, or the later draw continued the pass, so its writes could land
before the earlier draw fetched its inputs, and the two passes' attachment
writes and store operations on the multisampled image were unordered.

The in-place input ranges join the pass reads, and MultisampleTargetView
reports the target's image, which joins the pass attachments as written.
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
@hugodearaujo

Copy link
Copy Markdown
Contributor

@Amoenus Exact SHAs of that test: main 6efb726, with #7532 at 51e5eae, #7533 at bfcb8fc, #6343 at ce5b0c3 and this PR at d9b584e.

Yes, both 4x targets are drawn to again after the 1x accesses. In a local run with the guard retired instead of throwing (the same idea as #6808), with a print where a host multisampled target is created and where a 1x access retires a guard, the log has the same four events 45 times in a row:

  1. a host 4x target is created for 0x10e0720000 (960x540, R11G11B10F);
  2. a host 4x target is created for 0x10dc450000 (960x540, R16F);
  3. compute shader 0x10b4f58600 writes 0x10e0720000+0x870000 through the 1x storage view (1920x1080, R11G11B10F), which retires the first guard;
  4. a texture read of 0x10dc1d0000+0x480000 (1920x1080, R16F, overlapping the first 0x200000 bytes of the second target) retires the second guard.

The next cycle then creates both 4x targets again for the same memory, so this is a live alias reused every cycle, not memory reused after the target is dead. My prints covered only those two points, so I can't say whether a cycle starts with a clear, or whether the 4x targets are also read as multisampled resources between the steps.

@github-actions github-actions Bot added unblocks title Names a title ID on the Unblocks line needs rebase Conflicts with main, rebase needed labels Oct 18, 2026
@Amoenus

Amoenus commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

@hugodearaujo Recorded your exact pins and repeated live-alias sequence in the PR report. Drawing to both 4x targets again distinguishes this from dead-allocation reuse.

The important scope boundary is that #7002 handles read-only shader buffers; it does not establish coherence from the 1x storage write back into subsequent 4x use. The guard-retirement experiment therefore does not by itself validate that handoff. Clears before reuse and any intervening multisample reads remain unknown, as you noted. This belongs in the broader #6480 alias work; I have kept it separate from this PR's supported paths and validation claims.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants