fix(agc): exclude native MSAA spans from BDA tables #6628

Merged
MarcZX10 merged 11 commits from upstream-pr/6628 into main 2026-10-30 13:47:55 +00:00
MarcZX10 commented 2026-10-15 23:42:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T23:42:39Z.


What

Closes #6625. Excludes active native multisample color-target spans from each BDA address table while preserving the accessible parts of overlapping ranges. The table cache uses the filtered contents and does not use the unfiltered address-space serial for those tables. Clearing the target owner restores the original BDA range. Adds a regression to the multisample execution fixture for a warmed table, a refused resident span, an adjacent usable span, and access after owner retirement.

Tested

On the pre-rebase head 2705518fe7 (base f1af6c5915), Debian 12, focused target agc_driver_sample_multisample_target_tests built successfully; ctest -R '^agc_driver_sample_multisample_target$' passed 1/1 on Mesa llvmpipe (Vulkan software device, vendor 0x10005, LLVM 15.0.6).

The validation environment needed two temporary, reverted workarounds: the current baseline has a GCC compile error at SrtDescriptorEvaluation.cpp:183 (missing dependent template keyword), and this host's Xeon E5-1620 v2 lacks CPU extensions that AnyPS5 requires at startup. I applied the keyword only while building and bypassed the startup CPU check only in the locally built test binary to run the fixture on lavapipe. Neither workaround is in this PR. No physical GPU or full build was tested.

Rebased all nine PR commits onto current main bd8e13428a10d9332c2911816ab672ea1b41418f; original commit authors are preserved. I resolved the current-main conflicts by keeping its FMASK guard and BDA generation tracking together with this PR's range exclusion, cache fast path, and regression cases. On rebased head 691cb4e2c6658a61affdef66ada4fd52ba23dfcd, python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check upstream/main...HEAD pass. I could not configure the full current-head build: the isolated clone has no SDL2 submodule checkout, and this environment lacks XRandR development support. The earlier focused lavapipe results are from pre-rebase heads; I have not run a current-head compile or runtime test. The local overlap helper could not parse GitHub's large PR-list JSON response (Invalid \uXXXX escape), so it did not provide a post-rebase overlap result.

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: Mesa llvmpipe (Vulkan software device, vendor 0x10005, LLVM 15.0.6), Debian 12
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4881292363 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T23:42:39Z. --- ### What Closes #6625. Excludes active native multisample color-target spans from each BDA address table while preserving the accessible parts of overlapping ranges. The table cache uses the filtered contents and does not use the unfiltered address-space serial for those tables. Clearing the target owner restores the original BDA range. Adds a regression to the multisample execution fixture for a warmed table, a refused resident span, an adjacent usable span, and access after owner retirement. ### Tested On the pre-rebase head `2705518fe7` (base `f1af6c5915`), Debian 12, focused target `agc_driver_sample_multisample_target_tests` built successfully; `ctest -R '^agc_driver_sample_multisample_target$'` passed 1/1 on Mesa llvmpipe (Vulkan software device, vendor `0x10005`, LLVM 15.0.6). The validation environment needed two temporary, reverted workarounds: the current baseline has a GCC compile error at `SrtDescriptorEvaluation.cpp:183` (missing dependent `template` keyword), and this host's Xeon E5-1620 v2 lacks CPU extensions that AnyPS5 requires at startup. I applied the keyword only while building and bypassed the startup CPU check only in the locally built test binary to run the fixture on lavapipe. Neither workaround is in this PR. No physical GPU or full build was tested. Rebased all nine PR commits onto current `main` `bd8e13428a10d9332c2911816ab672ea1b41418f`; original commit authors are preserved. I resolved the current-main conflicts by keeping its FMASK guard and BDA generation tracking together with this PR's range exclusion, cache fast path, and regression cases. On rebased head `691cb4e2c6658a61affdef66ada4fd52ba23dfcd`, `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check upstream/main...HEAD` pass. I could not configure the full current-head build: the isolated clone has no SDL2 submodule checkout, and this environment lacks XRandR development support. The earlier focused lavapipe results are from pre-rebase heads; I have not run a current-head compile or runtime test. The local overlap helper could not parse GitHub's large PR-list JSON response (`Invalid \uXXXX escape`), so it did not provide a post-rebase overlap result. ### 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: Mesa llvmpipe (Vulkan software device, vendor `0x10005`, LLVM 15.0.6), Debian 12 - [x] AI-assisted: yes
Dextroid17 commented 2026-10-16 00:14:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T00:14:14Z.


Ran the new test on a current lavapipe, since CI skipped the build jobs here: Mesa 26.2.4, llvmpipe (LLVM 23.1.1), GCC 16.2.1, default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), clean environment, no CPU-check bypass needed. Head 767b3cbc8.

ctest -R '^agc_driver_sample_multisample_target$', 3 runs each:

  • PR as is: 3/3 pass
  • MultisampleTarget.hpp, MultisampleTarget.cpp and BdaResources.cpp reset to the merge base 5d9dcc42d, test file kept: 3/3 fail with "BDA access to a resident native multisample range was not refused"

So the new case fails without the fix and passes with it. The SrtDescriptorEvaluation.cpp compile error you mention did not appear here: that file is built into this test's target and compiled cleanly with GCC 16.2.1 at 5d9dcc42d (the PR does not touch it). I have not tried Debian 12's GCC.

One question, from reading only: the body says tables with a native MSAA span cut out skip the address-space serial. So while an active native MSAA target overlaps a range in the table, filtered is set and serial is 0. Each table build then copies the filtered range list, hashes it in full, and compares it against any cached entry with the same hash, where before it was a single spaceSerial lookup. A hit in that state also never stores the serial, so the table stays on the slow path. Is that cost expected to matter for titles that keep MSAA targets alive across many draws? I have not measured it.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205016715 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205016715). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-16T00:14:14Z. --- Ran the new test on a current lavapipe, since CI skipped the build jobs here: Mesa 26.2.4, llvmpipe (LLVM 23.1.1), GCC 16.2.1, default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), clean environment, no CPU-check bypass needed. Head 767b3cbc8. `ctest -R '^agc_driver_sample_multisample_target$'`, 3 runs each: - PR as is: 3/3 pass - `MultisampleTarget.hpp`, `MultisampleTarget.cpp` and `BdaResources.cpp` reset to the merge base 5d9dcc42d, test file kept: 3/3 fail with "BDA access to a resident native multisample range was not refused" So the new case fails without the fix and passes with it. The `SrtDescriptorEvaluation.cpp` compile error you mention did not appear here: that file is built into this test's target and compiled cleanly with GCC 16.2.1 at 5d9dcc42d (the PR does not touch it). I have not tried Debian 12's GCC. One question, from reading only: the body says tables with a native MSAA span cut out skip the address-space serial. So while an active native MSAA target overlaps a range in the table, `filtered` is set and `serial` is 0. Each table build then copies the filtered range list, hashes it in full, and compares it against any cached entry with the same hash, where before it was a single `spaceSerial` lookup. A hit in that state also never stores the serial, so the table stays on the slow path. Is that cost expected to matter for titles that keep MSAA targets alive across many draws? I have not measured it. AI-assisted: yes
MarcZX10 commented 2026-10-16 00:22:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T00:22:55Z.


Thanks for flagging this. The repeated O(N) filtering/hash path was avoidable, so I updated the PR to preserve the serial-keyed fast path while keeping the MSAA exclusion correct.

The table cache now keys a fast hit by both the cached address-space serial and a generation for the guarded MSAA ranges. Adding or removing a guard advances that generation. Stable builds can reuse the table without copying, hashing, or comparing the ranges; after a guard change, the build falls back to filtering and content comparison before caching the result under the new generation. I added a regression assertion that the repeated stable build increments the serial-hit counter.

Validation: the guest_agc_driver_resources_tests target compiled successfully in the existing Linux build after I applied a temporary, unrelated GCC parsing workaround only in /tmp/AnyPS5-6625. The executable then stopped at AnyPS5's host CPU feature gate (this Xeon lacks AVX2/BMI1/BMI2, among others), so I could not run the suite here. The workaround is not part of this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205129861 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205129861). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T00:22:55Z. --- Thanks for flagging this. The repeated O(N) filtering/hash path was avoidable, so I updated the PR to preserve the serial-keyed fast path while keeping the MSAA exclusion correct. The table cache now keys a fast hit by both the cached address-space serial and a generation for the guarded MSAA ranges. Adding or removing a guard advances that generation. Stable builds can reuse the table without copying, hashing, or comparing the ranges; after a guard change, the build falls back to filtering and content comparison before caching the result under the new generation. I added a regression assertion that the repeated stable build increments the serial-hit counter. Validation: the `guest_agc_driver_resources_tests` target compiled successfully in the existing Linux build after I applied a temporary, unrelated GCC parsing workaround only in `/tmp/AnyPS5-6625`. The executable then stopped at AnyPS5's host CPU feature gate (this Xeon lacks AVX2/BMI1/BMI2, among others), so I could not run the suite here. The workaround is not part of this PR.
fma-rc commented 2026-10-16 00:32:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-16T00:32:00Z.


I tested the updated head 4c415b513 on main 5d9dcc42d, on Linux with an RTX 5080, RADV (Radeon 610M) and lavapipe.

agc_driver_sample_multisample_target passes on all three. With MultisampleTarget.hpp/.cpp and BdaResources.hpp/.cpp reset to main and the test kept, it fails on all three with "BDA access to a resident native multisample range was not refused". The 15 tests matching ^agc_driver.*(bda|address|multisample|msaa) also pass on all three devices with the PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205245352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205245352). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-16T00:32:00Z. --- I tested the updated head 4c415b513 on main 5d9dcc42d, on Linux with an RTX 5080, RADV (Radeon 610M) and lavapipe. `agc_driver_sample_multisample_target` passes on all three. With `MultisampleTarget.hpp/.cpp` and `BdaResources.hpp/.cpp` reset to main and the test kept, it fails on all three with "BDA access to a resident native multisample range was not refused". The 15 tests matching `^agc_driver.*(bda|address|multisample|msaa)` also pass on all three devices with the PR.
Dextroid17 commented 2026-10-16 00:34:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T00:34:03Z.


Thanks for the update. I ran 7d4360ff8; the current head 4c415b513 only removes a comment in BdaResources.hpp, so the code is the same. Same setup as before (lavapipe, Mesa 26.2.4, llvmpipe LLVM 23.1.1, GCC 16.2.1, default CMake build with CMAKE_BUILD_TYPE empty, clean environment), 3 runs each:

  • agc_driver_sample_multisample_target: 3/3 pass, so the MSAA exclusion still holds.
  • agc_driver_graphics: 3/3 fail on the new assertion, "a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table".
  • With the four non-test files reset to 767b3cbc8 (new assertion kept): the same 3/3 failure. The assertion does not separate the two commits.

snapshotTableTests runs inside agc_driver_graphics (via RunBdaResourceTests), which is not among the 15 tests matched by ^agc_driver.*(bda|address|multisample|msaa) in fma-rc's run above, so the two results do not conflict.

A temporary print before the assertion (not committed) gave spaceTables 0 before and 0 after, and a.table == b.table. Cached-table serials: a=9, d=10, b=9, with a.table == d.table. So d has its own serial but the same ranges as a, takes the hash path to a's entry, and it->spaceSerial = serial re-stamps that entry to 10. b then looks up serial 9, misses, and also takes the hash path. 767b3cbc8 has the same spaceSerial re-stamp, which fits both arms failing the same way.

So the shared table is found, only through the hash path. Building b before d (with the counter read moved before b), or checking the counter on a second build right after a, would test the fast path without d in between. Whether one entry should hold more than one serial is your call; I have not measured how often that alternation happens in a title.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205270436 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205270436). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-16T00:34:03Z. --- Thanks for the update. I ran 7d4360ff8; the current head 4c415b513 only removes a comment in `BdaResources.hpp`, so the code is the same. Same setup as before (lavapipe, Mesa 26.2.4, llvmpipe LLVM 23.1.1, GCC 16.2.1, default CMake build with CMAKE_BUILD_TYPE empty, clean environment), 3 runs each: - `agc_driver_sample_multisample_target`: 3/3 pass, so the MSAA exclusion still holds. - `agc_driver_graphics`: 3/3 fail on the new assertion, "a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table". - With the four non-test files reset to 767b3cbc8 (new assertion kept): the same 3/3 failure. The assertion does not separate the two commits. `snapshotTableTests` runs inside `agc_driver_graphics` (via `RunBdaResourceTests`), which is not among the 15 tests matched by `^agc_driver.*(bda|address|multisample|msaa)` in fma-rc's run above, so the two results do not conflict. A temporary print before the assertion (not committed) gave `spaceTables` 0 before and 0 after, and `a.table == b.table`. Cached-table serials: a=9, d=10, b=9, with `a.table == d.table`. So `d` has its own serial but the same ranges as `a`, takes the hash path to `a`'s entry, and `it->spaceSerial = serial` re-stamps that entry to 10. `b` then looks up serial 9, misses, and also takes the hash path. 767b3cbc8 has the same `spaceSerial` re-stamp, which fits both arms failing the same way. So the shared table is found, only through the hash path. Building `b` before `d` (with the counter read moved before `b`), or checking the counter on a second build right after `a`, would test the fast path without `d` in between. Whether one entry should hold more than one serial is your call; I have not measured how often that alternation happens in a title. AI-assisted: yes
MarcZX10 commented 2026-10-16 00:38:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T00:38:52Z.


Fixed the serial-key aliasing reported above. A cached table now retains a bounded set of (address-space serial, MSAA generation) keys, so repeated equivalent builds can keep using the same table without replacing the prior space key. The updated code builds successfully with ninja -C /tmp/build-6625 agc_driver_graphics_tests, and git diff --check plus tools/check_conventions.py pass. I attempted the focused agc_driver_graphics CTest, but this host aborts before the test runs because its CPU lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, and FMA.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205331126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205331126). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T00:38:52Z. --- Fixed the serial-key aliasing reported above. A cached table now retains a bounded set of `(address-space serial, MSAA generation)` keys, so repeated equivalent builds can keep using the same table without replacing the prior space key. The updated code builds successfully with `ninja -C /tmp/build-6625 agc_driver_graphics_tests`, and `git diff --check` plus `tools/check_conventions.py` pass. I attempted the focused `agc_driver_graphics` CTest, but this host aborts before the test runs because its CPU lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, and FMA.
MarcZX10 commented 2026-10-16 00:43:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T00:43:31Z.


Follow-up: the convention rerun caught the replacement source comments as new comment lines. I removed them; the repository convention check now passes on the latest head. The cache behavior is unchanged from the serial-alias fix.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205388526 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205388526). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T00:43:31Z. --- Follow-up: the convention rerun caught the replacement source comments as new comment lines. I removed them; the repository convention check now passes on the latest head. The cache behavior is unchanged from the serial-alias fix.
MarcZX10 commented 2026-10-16 00:46:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T00:46:06Z.


Dextroid17, could you rerun agc_driver_graphics on the latest head 00c7025c3 when convenient? This head retains the same cache alias change and removes only source comments after the convention failure. Your earlier a=9/d=10/b=9 reproduction would directly verify that the repeated stable-space assertion now passes; my local host cannot get past the CPU feature gate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205422649 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205422649). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T00:46:06Z. --- Dextroid17, could you rerun `agc_driver_graphics` on the latest head `00c7025c3` when convenient? This head retains the same cache alias change and removes only source comments after the convention failure. Your earlier a=9/d=10/b=9 reproduction would directly verify that the repeated stable-space assertion now passes; my local host cannot get past the CPU feature gate.
Dextroid17 commented 2026-10-16 00:48:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T00:48:45Z.


Re-ran at 00c7025c3, same setup as before, 3 runs each: agc_driver_graphics and agc_driver_sample_multisample_target both pass. With BdaResources.cpp reset to 4c415b513 (test kept), agc_driver_graphics fails 3/3 with the same serial-keyed message (agc_driver_sample_multisample_target still passes 3/3), so the assertion now separates the fix from the previous head.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205461580 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6205461580). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-16T00:48:45Z. --- Re-ran at 00c7025c3, same setup as before, 3 runs each: `agc_driver_graphics` and `agc_driver_sample_multisample_target` both pass. With `BdaResources.cpp` reset to 4c415b513 (test kept), `agc_driver_graphics` fails 3/3 with the same serial-keyed message (`agc_driver_sample_multisample_target` still passes 3/3), so the assertion now separates the fix from the previous head. AI-assisted: yes
Amoenus commented 2026-10-16 04:46:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-16T04:46:21Z.

Code review location: core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp; line 135

@@ -133,8 +114,32 @@ BdaResources::BdaResources(const Context& context, const GuestBufferMemory& memo
     const auto cached = memory.CachedAddressTable();
     std::vector<ShaderRecompiler::BdaAbi::Range> built;
     if (!cached.has_value()) built = memory.AddressRanges();
-    const auto& ranges = cached.has_value() ? *cached->ranges : built;
+    const auto& addressRanges = cached.has_value() ? *cached->ranges : built;
     const auto serial = cached.has_value() ? cached->serial : 0;
+    auto guardSerial = MultisampleTargetRangeGeneration();
+    if (tableCacheEnabled() && serial != 0) {
+        auto& cache = Tables();
+        std::lock_guard lock(cache.mutex);
+        if (cache.device != context.device) {
+            cache.entries.clear();
+            cache.device = context.device;
+        }
+        for (auto it = cache.entries.begin(); it != cache.entries.end(); ++it) {
+            const auto key = std::pair{serial, guardSerial};
+            if (std::find(it->spaceKeys.begin(), it->spaceKeys.end(), key) == it->spaceKeys.end()) continue;
+            if (auto shared = it->buffer.lock(); shared != nullptr) {
+                ++cache.hits;
+                ++cache.classes.spaceTables;
+                table = std::move(shared);
+                cache.entries.splice(cache.entries.begin(), cache.entries, it);
+                return;

[P1] Restore the descriptor length on the serial-keyed hit. This return bypasses the tableBytes calculation below, leaving it at the member default of zero. Table() then returns a descriptor with range == 0 even though its cached buffer contains an 80-byte table in snapshotTableTests. The existing counter assertion still passes. A descriptor-range assertion reproduces this 5/5; assigning tableBytes = shared->Bytes().size(); here makes it pass 5/5. Proposed fix and regression: github.com/Amoenus/AnyPS5@b4cadea0c0 and github.com/Amoenus/AnyPS5@02e69aa438.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4291012872 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#discussion_r4291012872). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-16T04:46:21Z. **Code review location:** `core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`; line 135 ~~~~diff @@ -133,8 +114,32 @@ BdaResources::BdaResources(const Context& context, const GuestBufferMemory& memo const auto cached = memory.CachedAddressTable(); std::vector<ShaderRecompiler::BdaAbi::Range> built; if (!cached.has_value()) built = memory.AddressRanges(); - const auto& ranges = cached.has_value() ? *cached->ranges : built; + const auto& addressRanges = cached.has_value() ? *cached->ranges : built; const auto serial = cached.has_value() ? cached->serial : 0; + auto guardSerial = MultisampleTargetRangeGeneration(); + if (tableCacheEnabled() && serial != 0) { + auto& cache = Tables(); + std::lock_guard lock(cache.mutex); + if (cache.device != context.device) { + cache.entries.clear(); + cache.device = context.device; + } + for (auto it = cache.entries.begin(); it != cache.entries.end(); ++it) { + const auto key = std::pair{serial, guardSerial}; + if (std::find(it->spaceKeys.begin(), it->spaceKeys.end(), key) == it->spaceKeys.end()) continue; + if (auto shared = it->buffer.lock(); shared != nullptr) { + ++cache.hits; + ++cache.classes.spaceTables; + table = std::move(shared); + cache.entries.splice(cache.entries.begin(), cache.entries, it); + return; ~~~~ --- [P1] Restore the descriptor length on the serial-keyed hit. This return bypasses the `tableBytes` calculation below, leaving it at the member default of zero. `Table()` then returns a descriptor with `range == 0` even though its cached buffer contains an 80-byte table in `snapshotTableTests`. The existing counter assertion still passes. A descriptor-range assertion reproduces this 5/5; assigning `tableBytes = shared->Bytes().size();` here makes it pass 5/5. Proposed fix and regression: https://github.com/Amoenus/AnyPS5/commit/b4cadea0c05853f8a7036193c37fcb264ff73dd6 and https://github.com/Amoenus/AnyPS5/commit/02e69aa43850c8a8f16e3f5eae4440bb7a039e9b.
Amoenus commented 2026-10-16 04:46:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-16T04:46:21Z.

Review: DISMISSED


Independent Windows validation at upstream head 00c7025c3a2908ecfc1ae292c142a354e149eb3d / main 5d9dcc42d2ec5401aebd089028b8d4d7410a77b4.

The native-MSAA exclusion works on both physical GPUs: five fresh runs per GPU of agc_driver_sample_multisample_target pass. With the four production files restored to main and the regression retained, five per GPU fail with BDA access to a resident native multisample range was not refused. The neighboring BDA span test also passes five per GPU with the PR.

I found one regression in the new serial-keyed cache path: it returns before initializing tableBytes. The existing graphics test checks the cache counter and buffer identity, but not the bound descriptor length. Adding that assertion fails 5/5 with:

AGC graphics: a cached BDA descriptor lost its byte range: 0 instead of 80

Proposed correction: set tableBytes = shared->Bytes().size(); in the fast-hit branch before returning. Regression assertion; one-line correction. Please take these into this PR if useful; I have not opened a competing PR.

With that correction, full Windows build, libs, conventions and test-registration checks pass. agc_driver_graphics, agc_driver_bda_device, and the two execution fixtures all pass five fresh runs each (the execution fixtures on each GPU). After the main-code negative control, restoring the corrected branch gives the same five-run positive results again. Slowest test process in the full-build pass: 5.211 s. Cppcheck 2.20.0 and clang-tidy 23.1.3 report no selected diagnostics or parser errors for the two proposal translation units.

GPUs: NVIDIA GeForce RTX 5080 (10de:2c02), driver 610.62 / 32.0.16.1062; AMD Radeon(TM) Graphics (1002:13c0), driver 32.0.21036.18. Windows 11 Enterprise 10.0.26200. Each execution run verifies the selected physical device, requires Vulkan and disables the shader cache.

Scope: synthetic public fixtures, no title replay or new game-progress claim. All Windows compositions include only #6452's independent indirect-test alignment correction alongside the stated PR/test changes; no host CPU-check bypass or parsing workaround. Original composition, main-production negative control, corrected composition.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5543176733 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#pullrequestreview-5543176733). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-16T04:46:21Z. **Review:** DISMISSED --- Independent Windows validation at upstream head `00c7025c3a2908ecfc1ae292c142a354e149eb3d` / main `5d9dcc42d2ec5401aebd089028b8d4d7410a77b4`. The native-MSAA exclusion works on both physical GPUs: five fresh runs per GPU of `agc_driver_sample_multisample_target` pass. With the four production files restored to main and the regression retained, five per GPU fail with `BDA access to a resident native multisample range was not refused`. The neighboring BDA span test also passes five per GPU with the PR. I found one regression in the new serial-keyed cache path: it returns before initializing `tableBytes`. The existing graphics test checks the cache counter and buffer identity, but not the bound descriptor length. Adding that assertion fails 5/5 with: ```text AGC graphics: a cached BDA descriptor lost its byte range: 0 instead of 80 ``` Proposed correction: set `tableBytes = shared->Bytes().size();` in the fast-hit branch before returning. [Regression assertion](https://github.com/Amoenus/AnyPS5/commit/02e69aa43850c8a8f16e3f5eae4440bb7a039e9b); [one-line correction](https://github.com/Amoenus/AnyPS5/commit/b4cadea0c05853f8a7036193c37fcb264ff73dd6). Please take these into this PR if useful; I have not opened a competing PR. With that correction, full Windows build, `libs`, conventions and test-registration checks pass. `agc_driver_graphics`, `agc_driver_bda_device`, and the two execution fixtures all pass five fresh runs each (the execution fixtures on each GPU). After the main-code negative control, restoring the corrected branch gives the same five-run positive results again. Slowest test process in the full-build pass: 5.211 s. Cppcheck 2.20.0 and clang-tidy 23.1.3 report no selected diagnostics or parser errors for the two proposal translation units. GPUs: NVIDIA GeForce RTX 5080 (10de:2c02), driver 610.62 / 32.0.16.1062; AMD Radeon(TM) Graphics (1002:13c0), driver 32.0.21036.18. Windows 11 Enterprise 10.0.26200. Each execution run verifies the selected physical device, requires Vulkan and disables the shader cache. Scope: synthetic public fixtures, no title replay or new game-progress claim. All Windows compositions include only #6452's independent indirect-test alignment correction alongside the stated PR/test changes; no host CPU-check bypass or parsing workaround. [Original composition](https://github.com/Amoenus/AnyPS5/commit/4d903ff8c37478c0ae8db20af76f11b5a5cd783e), [main-production negative control](https://github.com/Amoenus/AnyPS5/commit/4046ea3f2221abf66a73467d31e1daf151674bb6), [corrected composition](https://github.com/Amoenus/AnyPS5/tree/codex/fix-pr6628-cache-range). AI-assisted: yes.
MarcZX10 commented 2026-10-16 05:18:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T05:18:56Z.


Fixed the serial-keyed cache hit to restore tableBytes from the shared buffer before returning, and added a regression assertion that the cached descriptor range matches the original nonzero range. The update is commit 9a52e1a42.

git diff --check and tools/check_conventions.py --base upstream/main pass. I could not run the focused BDA test locally: the existing build directory lacks its test executable and its configured source worktree currently has an invalid symlink at 3rdparty/LibAtrac9. The configured AGC driver library target reports no work to do, but that does not validate the new test. The reviewer's Windows GPU test results remain the platform validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6208667787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6208667787). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T05:18:56Z. --- Fixed the serial-keyed cache hit to restore `tableBytes` from the shared buffer before returning, and added a regression assertion that the cached descriptor range matches the original nonzero range. The update is commit `9a52e1a42`. `git diff --check` and `tools/check_conventions.py --base upstream/main` pass. I could not run the focused BDA test locally: the existing build directory lacks its test executable and its configured source worktree currently has an invalid symlink at `3rdparty/LibAtrac9`. The configured AGC driver library target reports no work to do, but that does not validate the new test. The reviewer's Windows GPU test results remain the platform validation.
MarcZX10 commented 2026-10-16 05:19:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T05:19:09Z.

Code review location: core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp; line 135

@@ -133,8 +114,32 @@ BdaResources::BdaResources(const Context& context, const GuestBufferMemory& memo
     const auto cached = memory.CachedAddressTable();
     std::vector<ShaderRecompiler::BdaAbi::Range> built;
     if (!cached.has_value()) built = memory.AddressRanges();
-    const auto& ranges = cached.has_value() ? *cached->ranges : built;
+    const auto& addressRanges = cached.has_value() ? *cached->ranges : built;
     const auto serial = cached.has_value() ? cached->serial : 0;
+    auto guardSerial = MultisampleTargetRangeGeneration();
+    if (tableCacheEnabled() && serial != 0) {
+        auto& cache = Tables();
+        std::lock_guard lock(cache.mutex);
+        if (cache.device != context.device) {
+            cache.entries.clear();
+            cache.device = context.device;
+        }
+        for (auto it = cache.entries.begin(); it != cache.entries.end(); ++it) {
+            const auto key = std::pair{serial, guardSerial};
+            if (std::find(it->spaceKeys.begin(), it->spaceKeys.end(), key) == it->spaceKeys.end()) continue;
+            if (auto shared = it->buffer.lock(); shared != nullptr) {
+                ++cache.hits;
+                ++cache.classes.spaceTables;
+                table = std::move(shared);
+                cache.entries.splice(cache.entries.begin(), cache.entries, it);
+                return;

Fixed on the PR head in 9a52e1a42: the serial-keyed hit now restores tableBytes from the shared buffer, and the graphics regression asserts that the cached range is both equal to the original and nonzero. Your Windows GPU runs provide the positive test result. On my Linux host, git diff --check and the conventions check pass; I could not rerun the focused test because the available build dir is tied to a separate worktree with a broken 3rdparty/LibAtrac9 symlink and lacks the executable.

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4291172701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#discussion_r4291172701). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T05:19:09Z. **Code review location:** `core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`; line 135 ~~~~diff @@ -133,8 +114,32 @@ BdaResources::BdaResources(const Context& context, const GuestBufferMemory& memo const auto cached = memory.CachedAddressTable(); std::vector<ShaderRecompiler::BdaAbi::Range> built; if (!cached.has_value()) built = memory.AddressRanges(); - const auto& ranges = cached.has_value() ? *cached->ranges : built; + const auto& addressRanges = cached.has_value() ? *cached->ranges : built; const auto serial = cached.has_value() ? cached->serial : 0; + auto guardSerial = MultisampleTargetRangeGeneration(); + if (tableCacheEnabled() && serial != 0) { + auto& cache = Tables(); + std::lock_guard lock(cache.mutex); + if (cache.device != context.device) { + cache.entries.clear(); + cache.device = context.device; + } + for (auto it = cache.entries.begin(); it != cache.entries.end(); ++it) { + const auto key = std::pair{serial, guardSerial}; + if (std::find(it->spaceKeys.begin(), it->spaceKeys.end(), key) == it->spaceKeys.end()) continue; + if (auto shared = it->buffer.lock(); shared != nullptr) { + ++cache.hits; + ++cache.classes.spaceTables; + table = std::move(shared); + cache.entries.splice(cache.entries.begin(), cache.entries, it); + return; ~~~~ --- Fixed on the PR head in `9a52e1a42`: the serial-keyed hit now restores `tableBytes` from the shared buffer, and the graphics regression asserts that the cached range is both equal to the original and nonzero. Your Windows GPU runs provide the positive test result. On my Linux host, `git diff --check` and the conventions check pass; I could not rerun the focused test because the available build dir is tied to a separate worktree with a broken `3rdparty/LibAtrac9` symlink and lacks the executable.
MarcZX10 commented 2026-10-16 05:19:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T05:19:57Z.


Fixed the serial-keyed cache hit to restore tableBytes from the shared buffer before returning, and added a regression assertion that the cached descriptor range matches the original nonzero range. The update is commit 9a52e1a42.

git diff --check and tools/check_conventions.py --base upstream/main pass. I could not run the focused BDA test locally: the existing build directory lacks its test executable and its configured source worktree currently has an invalid symlink at 3rdparty/LibAtrac9. The configured AGC driver library target reports no work to do, but that does not validate the new test. The reviewer's Windows GPU test results remain the platform validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6208679778 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6208679778). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T05:19:57Z. --- Fixed the serial-keyed cache hit to restore `tableBytes` from the shared buffer before returning, and added a regression assertion that the cached descriptor range matches the original nonzero range. The update is commit `9a52e1a42`. `git diff --check` and `tools/check_conventions.py --base upstream/main` pass. I could not run the focused BDA test locally: the existing build directory lacks its test executable and its configured source worktree currently has an invalid symlink at `3rdparty/LibAtrac9`. The configured AGC driver library target reports no work to do, but that does not validate the new test. The reviewer's Windows GPU test results remain the platform validation.
MarcZX10 commented 2026-10-16 05:33:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T05:33:04Z.


Additional Linux validation on the current PR head 6e20bd394: configured a fresh Debian 12 / GCC 12.2 Release build with BUILD_TESTING=ON, built agc_driver_graphics_tests, and ran ctest -R '^agc_driver_graphics$'; 1/1 passed on Mesa llvmpipe.

The build required a temporary, reverted template keyword correction in the unrelated baseline SrtDescriptorEvaluation.cpp for GCC 12. The test binary also required a temporary, reverted bypass of AnyPS5's host CPU feature gate because this Xeon E5-1620 v2 lacks AVX2/BMI1/BMI2/MOVBE/FMA. Neither workaround is part of the PR. The worktree is clean after restoring both files. This is a software Vulkan run, not a physical GPU test.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6208834139 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6208834139). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T05:33:04Z. --- Additional Linux validation on the current PR head `6e20bd394`: configured a fresh Debian 12 / GCC 12.2 Release build with `BUILD_TESTING=ON`, built `agc_driver_graphics_tests`, and ran `ctest -R '^agc_driver_graphics$'`; 1/1 passed on Mesa llvmpipe. The build required a temporary, reverted `template` keyword correction in the unrelated baseline `SrtDescriptorEvaluation.cpp` for GCC 12. The test binary also required a temporary, reverted bypass of AnyPS5's host CPU feature gate because this Xeon E5-1620 v2 lacks AVX2/BMI1/BMI2/MOVBE/FMA. Neither workaround is part of the PR. The worktree is clean after restoring both files. This is a software Vulkan run, not a physical GPU test.
Dextroid17 commented 2026-10-16 13:53:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T13:53:03Z.


Re-ran the current head 6e20bd394 on Linux. Its tree is identical to 9a52e1a42 named above (git diff 9a52e1a42 6e20bd394 is empty; only the commit message changed). Same setup as before: lavapipe (Mesa 26.2.4, llvmpipe LLVM 23.1.1), GCC 16.2.1, default CMake build with CMAKE_BUILD_TYPE empty, clean environment. No CPU-gate bypass and no source workaround were needed on this host, unlike the Debian 12 run above.

  • As is, 3 runs: agc_driver_graphics and agc_driver_sample_multisample_target both pass 3/3.
  • With Graphics/src/BdaResources.cpp reset to 00c7025c3 (this removes only the tableBytes line; the test is kept) and rebuilt, 3 runs: agc_driver_graphics fails 3/3 with "a cached BDA descriptor lost its byte range: 0 instead of 80". agc_driver_sample_multisample_target still passes 3/3.
  • Restored and rebuilt, 1 run: agc_driver_graphics passes.

This gives the same failure Amoenus reported on Windows, here on the PR's own head on Linux: the new assertion fails without the one-line fix and passes with it.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217010934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6217010934). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-16T13:53:03Z. --- Re-ran the current head 6e20bd394 on Linux. Its tree is identical to 9a52e1a42 named above (`git diff 9a52e1a42 6e20bd394` is empty; only the commit message changed). Same setup as before: lavapipe (Mesa 26.2.4, llvmpipe LLVM 23.1.1), GCC 16.2.1, default CMake build with CMAKE_BUILD_TYPE empty, clean environment. No CPU-gate bypass and no source workaround were needed on this host, unlike the Debian 12 run above. - As is, 3 runs: `agc_driver_graphics` and `agc_driver_sample_multisample_target` both pass 3/3. - With `Graphics/src/BdaResources.cpp` reset to 00c7025c3 (this removes only the `tableBytes` line; the test is kept) and rebuilt, 3 runs: `agc_driver_graphics` fails 3/3 with "a cached BDA descriptor lost its byte range: 0 instead of 80". `agc_driver_sample_multisample_target` still passes 3/3. - Restored and rebuilt, 1 run: `agc_driver_graphics` passes. This gives the same failure Amoenus reported on Windows, here on the PR's own head on Linux: the new assertion fails without the one-line fix and passes with it. AI-assisted: yes
MarcZX10 commented 2026-10-16 15:34:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T15:34:28Z.


Thanks for the current-head rerun and mutation control. The 3/3 pass with the line present and 3/3 failure when it is removed confirms this regression is exercised.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6218950045 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6218950045). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T15:34:28Z. --- Thanks for the current-head rerun and mutation control. The 3/3 pass with the line present and 3/3 failure when it is removed confirms this regression is exercised.
MarcZX10 commented 2026-10-16 18:43:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T18:43:35Z.


Thanks for identifying the uninitialized tableBytes fast-hit result. The fix is in the current head. Dextroid17’s current-head Linux mutation run confirms agc_driver_graphics passes with the assignment and fails 3/3 when that line is removed; agc_driver_sample_multisample_target passes 3/3. This matches your Windows finding and covers the regression you requested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222363403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6222363403). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T18:43:35Z. --- Thanks for identifying the uninitialized `tableBytes` fast-hit result. The fix is in the current head. Dextroid17’s current-head Linux mutation run confirms `agc_driver_graphics` passes with the assignment and fails 3/3 when that line is removed; `agc_driver_sample_multisample_target` passes 3/3. This matches your Windows finding and covers the regression you requested.
MarcZX10 commented 2026-10-16 20:30:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T20:30:34Z.


Rebased onto current main a7f108030 and pushed as 6b337eff0. I resolved the overlap in SampleMultisampleTarget.cpp by retaining both main’s sample-store coverage and this PR’s native-MSAA BDA-span regression; the BDA cache and target changes auto-merged. All six commits remain authored by MarcZX100. The focused agc_driver_sample_multisample_target_tests target builds successfully. CTest starts but this Xeon E5-1620 v2 is rejected by the project CPU guard (missing LZCNT, BMI1/2, MOVBE, AVX2, FMA), so I could not execute the runtime test locally. During the build only, I temporarily added the GCC 12 dependent template keyword in unrelated SrtDescriptorEvaluation.cpp; I reverted it before publishing and it is absent from the PR diff. git diff --check and conventions pass on the rebased diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6224126755 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6224126755). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T20:30:34Z. --- Rebased onto current `main` `a7f108030` and pushed as `6b337eff0`. I resolved the overlap in `SampleMultisampleTarget.cpp` by retaining both main’s sample-store coverage and this PR’s native-MSAA BDA-span regression; the BDA cache and target changes auto-merged. All six commits remain authored by MarcZX100. The focused `agc_driver_sample_multisample_target_tests` target builds successfully. CTest starts but this Xeon E5-1620 v2 is rejected by the project CPU guard (missing LZCNT, BMI1/2, MOVBE, AVX2, FMA), so I could not execute the runtime test locally. During the build only, I temporarily added the GCC 12 dependent `template` keyword in unrelated `SrtDescriptorEvaluation.cpp`; I reverted it before publishing and it is absent from the PR diff. `git diff --check` and conventions pass on the rebased diff.
MarcZX10 commented 2026-10-16 20:38:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T20:38:46Z.


Thanks for identifying the cached descriptor length regression. I confirmed the proposed tableBytes = shared->Bytes().size() assignment and its nonzero-range regression assertion are present in the current rebased head 6b337eff0. The earlier Windows positive/negative-control run validates that fix, and the current head has also been rebased onto a7f108030; six changed C++ files compile locally. The local CTest run remains blocked by this host CPU feature guard, so I am not claiming a post-rebase GPU runtime pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6224253301 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6224253301). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T20:38:46Z. --- Thanks for identifying the cached descriptor length regression. I confirmed the proposed `tableBytes = shared->Bytes().size()` assignment and its nonzero-range regression assertion are present in the current rebased head `6b337eff0`. The earlier Windows positive/negative-control run validates that fix, and the current head has also been rebased onto `a7f108030`; six changed C++ files compile locally. The local CTest run remains blocked by this host CPU feature guard, so I am not claiming a post-rebase GPU runtime pass.
MarcZX10 commented 2026-10-17 00:43:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T00:43:39Z.


Rebased onto current main (f3263dfbf) and pushed as 88f30bae1. The overlap in MultisampleTarget.cpp preserves main's DCC/CMASK metadata invalidation and this PR's BDA cache generation tracking; metadata retirement now advances the generation when it invalidates metadata without removing the range. Commit authors remain MarcZX100.

Validation on the rebased head: git diff --check and tools/check_conventions.py --base upstream/main --head HEAD pass. agc_driver_sample_multisample_target_tests builds successfully in the configured Linux Release tree. CTest aborts before assertions because this Xeon E5-1620 v2 host lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA. The earlier Windows positive/negative-control results and Linux mutation run documented above still cover the BDA descriptor-length regression; no new post-rebase GPU runtime pass is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6227497143 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6227497143). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T00:43:39Z. --- Rebased onto current `main` (`f3263dfbf`) and pushed as `88f30bae1`. The overlap in `MultisampleTarget.cpp` preserves main's DCC/CMASK metadata invalidation and this PR's BDA cache generation tracking; metadata retirement now advances the generation when it invalidates metadata without removing the range. Commit authors remain MarcZX100. Validation on the rebased head: `git diff --check` and `tools/check_conventions.py --base upstream/main --head HEAD` pass. `agc_driver_sample_multisample_target_tests` builds successfully in the configured Linux Release tree. CTest aborts before assertions because this Xeon E5-1620 v2 host lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA. The earlier Windows positive/negative-control results and Linux mutation run documented above still cover the BDA descriptor-length regression; no new post-rebase GPU runtime pass is claimed.
akkadbakkad89 commented 2026-10-17 08:02:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T08:02:41Z.


Runtime datapoint on real NVIDIA hardware (the PR coverage so far is llvmpipe-only).

RTX 3070, Ampere, driver 617.42, Windows 11 26200, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head 88f30bae1, all binaries rebuilt on this head, ctest serial:

Test Result
agc_driver_graphics (BdaResources span-exclusion unit cases) pass
agc_driver_sample_multisample_target (BDA/table regression) pass
agc_driver_sample_mask_multisample pass
agc_driver_native_multisample_depth pass
agc_driver_native_depth_retirement pass
agc_driver_native_depth_clears pass
agc_driver_native_depth_clear_refusals pass

7/7 pass. The BDA table filtering and post-clear re-access hold on Ampere.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231507929 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6231507929). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T08:02:41Z. --- Runtime datapoint on real NVIDIA hardware (the PR coverage so far is llvmpipe-only). RTX 3070, Ampere, driver 617.42, Windows 11 26200, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head 88f30bae1, all binaries rebuilt on this head, ctest serial: | Test | Result | |---|---| | agc_driver_graphics (BdaResources span-exclusion unit cases) | pass | | agc_driver_sample_multisample_target (BDA/table regression) | pass | | agc_driver_sample_mask_multisample | pass | | agc_driver_native_multisample_depth | pass | | agc_driver_native_depth_retirement | pass | | agc_driver_native_depth_clears | pass | | agc_driver_native_depth_clear_refusals | pass | 7/7 pass. The BDA table filtering and post-clear re-access hold on Ampere.
MarcZX10 commented 2026-10-17 14:04:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T14:04:37Z.


Thanks for the current-head RTX 3070 run. The 7/7 results add independent Ampere coverage for the BDA range exclusion, table regression, and the adjacent native-depth tests; I have noted the exact Windows/driver scope.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234841321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6234841321). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T14:04:37Z. --- Thanks for the current-head RTX 3070 run. The 7/7 results add independent Ampere coverage for the BDA range exclusion, table regression, and the adjacent native-depth tests; I have noted the exact Windows/driver scope.
MarcZX10 commented 2026-10-17 17:53:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T17:53:42Z.


Rebased the seven existing commits onto current main (66702f1c) as 103f8a1e4; the conflict in SampleMultisampleTarget.cpp was limited to combining main’s VulkanDeviceTestAccess helper with this PR’s platform headers. check_conventions.py --base upstream/main --head HEAD and git diff --check upstream/main...HEAD pass. I attempted a local Release test configuration, but it stops before build because this worktree lacks the SDL2 submodule and the host lacks XRandR development files. I have not claimed post-rebase build or GPU tests; the earlier RTX 3070 results are on 88f30bae1. Please run full CI/device validation on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238075325 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6238075325). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T17:53:42Z. --- Rebased the seven existing commits onto current `main` (`66702f1c`) as `103f8a1e4`; the conflict in `SampleMultisampleTarget.cpp` was limited to combining main’s `VulkanDeviceTestAccess` helper with this PR’s platform headers. `check_conventions.py --base upstream/main --head HEAD` and `git diff --check upstream/main...HEAD` pass. I attempted a local Release test configuration, but it stops before build because this worktree lacks the SDL2 submodule and the host lacks XRandR development files. I have not claimed post-rebase build or GPU tests; the earlier RTX 3070 results are on `88f30bae1`. Please run full CI/device validation on this head.
fma-rc commented 2026-10-17 18:46:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-17T18:46:07Z.

Review: CHANGES_REQUESTED


@MarcZX100 I ran the PR's tests on 103f8a1e4. agc_driver_sample_multisample_target fails after the rebase on every device I have: RTX 5080 (driver 615.78.08), Radeon 610M and 680M (RADV) and lavapipe. It passes 3 of 3 on main f219248f0 on the 680M. The other 22 tests (BDA, MSAA, image address) pass.

On the 680M it fails with:

AGC graphics: the draw-input source is not guarded as a native target

That is the file the rebase conflict was in, so the merge of main's VulkanDeviceTestAccess helper with the PR's changes there is the first place I would look.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5559442046 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#pullrequestreview-5559442046). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-17T18:46:07Z. **Review:** CHANGES_REQUESTED --- @MarcZX100 I ran the PR's tests on 103f8a1e4. `agc_driver_sample_multisample_target` fails after the rebase on every device I have: RTX 5080 (driver 615.78.08), Radeon 610M and 680M (RADV) and lavapipe. It passes 3 of 3 on `main` f219248f0 on the 680M. The other 22 tests (BDA, MSAA, image address) pass. On the 680M it fails with: `AGC graphics: the draw-input source is not guarded as a native target` That is the file the rebase conflict was in, so the merge of main's `VulkanDeviceTestAccess` helper with the PR's changes there is the first place I would look.
MarcZX10 commented 2026-10-17 20:49:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T20:49:29Z.


Thanks for the post-rebase run across NVIDIA, RADV and lavapipe. I traced this to the test sequence: it clears the multisample target registry to exercise the unguarded BDA control, then runs the native-index guard assertions against the old source without registering it again. I added a fresh draw after that cleanup so the source is registered before the index checks (a18761e3a). The target-specific build was attempted, but this checkout currently stops in unrelated SrtDescriptorEvaluation.cpp:183 on GCC 12 (expected template keyword before dependent template name); git diff --check and tools/check_conventions.py --base 66702f1c --head HEAD pass. Please rerun the failing execution test on this head when convenient.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240820481 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6240820481). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T20:49:29Z. --- Thanks for the post-rebase run across NVIDIA, RADV and lavapipe. I traced this to the test sequence: it clears the multisample target registry to exercise the unguarded BDA control, then runs the native-index guard assertions against the old source without registering it again. I added a fresh draw after that cleanup so the source is registered before the index checks (`a18761e3a`). The target-specific build was attempted, but this checkout currently stops in unrelated `SrtDescriptorEvaluation.cpp:183` on GCC 12 (`expected template keyword before dependent template name`); `git diff --check` and `tools/check_conventions.py --base 66702f1c --head HEAD` pass. Please rerun the failing execution test on this head when convenient.
MarcZX10 commented 2026-10-17 21:11:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T21:11:27Z.


Thanks for rerunning the rebased head a18761e3a. The reported agc_driver_sample_multisample_target result passes 3/3 on current lavapipe; that confirms the re-registration fix for the sequence I asked you to rerun. I also note your GCC 16 build did not reproduce the unrelated GCC 12 parser failure I saw locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6241167449 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6241167449). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T21:11:27Z. --- Thanks for rerunning the rebased head `a18761e3a`. The reported `agc_driver_sample_multisample_target` result passes 3/3 on current lavapipe; that confirms the re-registration fix for the sequence I asked you to rerun. I also note your GCC 16 build did not reproduce the unrelated GCC 12 parser failure I saw locally.
fma-rc commented 2026-10-18 01:07:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-18T01:07:02Z.


@MarcZX100 b137da7875 does not build here (GCC 16.2.1): SampleMultisampleTarget.cpp:729: error: conflicting declaration 'const auto state'. Line 722 already declares const auto state = TargetState(color); in the same scope.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244048212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6244048212). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-18T01:07:02Z. --- @MarcZX100 `b137da7875` does not build here (GCC 16.2.1): `SampleMultisampleTarget.cpp:729: error: conflicting declaration 'const auto state'`. Line 722 already declares `const auto state = TargetState(color);` in the same scope.
MarcZX10 commented 2026-10-18 01:50:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T01:50:30Z.


Thanks for catching the redeclaration. Fixed on the PR head in 2705518fe: the later duplicate const auto state was removed; the earlier state remains in scope and is reused. git diff --check and python3 tools/check_conventions.py --base upstream/main pass. I have not rebuilt this AGC execution target in this worktree.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244427420 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6244427420). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T01:50:30Z. --- Thanks for catching the redeclaration. Fixed on the PR head in `2705518fe`: the later duplicate `const auto state` was removed; the earlier `state` remains in scope and is reused. `git diff --check` and `python3 tools/check_conventions.py --base upstream/main` pass. I have not rebuilt this AGC execution target in this worktree.
MarcZX10 commented 2026-10-18 02:15:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T02:15:42Z.


I attempted a Linux build of agc_driver_sample_multisample_target_tests at current head 2705518fe721eee5a89d856242e45f0f426c829a. CMake configuration succeeded, but GCC 12 stopped compiling the existing shader recompiler dependency at core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183 (read.read->Flags<MemoryFlags>() is parsed as a dependent template; it needs the template disambiguator). The failure occurs before this PR’s test target is linked, so I could not validate the test here. The worktree remains clean; unrelated to your change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244627636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6244627636). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T02:15:42Z. --- I attempted a Linux build of `agc_driver_sample_multisample_target_tests` at current head `2705518fe721eee5a89d856242e45f0f426c829a`. CMake configuration succeeded, but GCC 12 stopped compiling the existing shader recompiler dependency at `core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183` (`read.read->Flags<MemoryFlags>()` is parsed as a dependent template; it needs the `template` disambiguator). The failure occurs before this PR’s test target is linked, so I could not validate the test here. The worktree remains clean; unrelated to your change.
Dextroid17 commented 2026-10-18 11:06:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-18T11:06:06Z.


@MarcZX100 I built and ran the tests on 2705518fe for you. Host: CachyOS, GCC 16.2.1, Release, env -i, lavapipe, 3 runs per arm via ctest. The tests were the PR's two (agc_driver_sample_multisample_target, agc_driver_graphics) plus agc_driver_bda_device:

  • PR head: all three pass 3/3.
  • PR head with the four production files reset to the merge base f1af6c591 (BdaResources.hpp/.cpp, MultisampleTarget.hpp/.cpp), tests kept: agc_driver_sample_multisample_target fails 3/3 with BDA access to a resident native multisample range was not refused. agc_driver_graphics fails 3/3 with a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table. agc_driver_bda_device passes.
  • PR head merged with main at 9caecfd2d (237 commits ahead of the branch): the merge has no conflicts, and all three pass 3/3.

SrtDescriptorEvaluation.cpp compiled here on GCC 16.2.1 at 2705518fe.

My earlier approval of this head was posted without results. These are the results.

Not run: GCC 12, a Debug build, the wider AGC test set, Windows, NVIDIA/AMD, or a PS5.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249099793 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6249099793). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-18T11:06:06Z. --- @MarcZX100 I built and ran the tests on `2705518fe` for you. Host: CachyOS, GCC 16.2.1, Release, `env -i`, lavapipe, 3 runs per arm via ctest. The tests were the PR's two (`agc_driver_sample_multisample_target`, `agc_driver_graphics`) plus `agc_driver_bda_device`: - **PR head:** all three pass 3/3. - **PR head with the four production files reset to the merge base `f1af6c591`** (`BdaResources.hpp/.cpp`, `MultisampleTarget.hpp/.cpp`), tests kept: `agc_driver_sample_multisample_target` fails 3/3 with `BDA access to a resident native multisample range was not refused`. `agc_driver_graphics` fails 3/3 with `a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table`. `agc_driver_bda_device` passes. - **PR head merged with main at `9caecfd2d` (237 commits ahead of the branch):** the merge has no conflicts, and all three pass 3/3. `SrtDescriptorEvaluation.cpp` compiled here on GCC 16.2.1 at `2705518fe`. My earlier approval of this head was posted without results. These are the results. Not run: GCC 12, a Debug build, the wider AGC test set, Windows, NVIDIA/AMD, or a PS5. AI-assisted: yes
MarcZX10 commented 2026-10-19 16:52:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:52:32Z.


Thanks for the current-head and baseline-control runs. The PR head passes all three tests 3/3, while resetting the four production files to the merge base makes the two issue-specific checks fail 3/3; the merged-main composition passes all three. That addresses the earlier post-rebase failure report with a clear control. I’ll keep the test results tied to the exact head and composition you exercised.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272482370 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6272482370). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:52:32Z. --- Thanks for the current-head and baseline-control runs. The PR head passes all three tests 3/3, while resetting the four production files to the merge base makes the two issue-specific checks fail 3/3; the merged-main composition passes all three. That addresses the earlier post-rebase failure report with a clear control. I’ll keep the test results tied to the exact head and composition you exercised.
MarcZX10 commented 2026-10-20 09:12:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T09:12:02Z.


Thanks again for the earlier 3/3 validation on head 2705518fe. I rebased the nine commits onto current main e9a5a0c849 and pushed head 710c8a1efd. The test-fixture conflict was resolved by retaining both main's DCC/HTILE coverage and this PR's BDA checks; the duplicate state declaration is also removed.

The current hosted conventions, labels, eligibility and report checks pass, while the platform/build jobs are skipped. I could not complete a local build of this rebased worktree because required submodules are unavailable, so I am not claiming current-head runtime results. When convenient, could you review the rebased head and let me know if the conflict resolution or new main changes need adjustment?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287566294 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6287566294). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T09:12:02Z. --- Thanks again for the earlier 3/3 validation on head `2705518fe`. I rebased the nine commits onto current `main` `e9a5a0c849` and pushed head `710c8a1efd`. The test-fixture conflict was resolved by retaining both main's DCC/HTILE coverage and this PR's BDA checks; the duplicate `state` declaration is also removed. The current hosted conventions, labels, eligibility and report checks pass, while the platform/build jobs are skipped. I could not complete a local build of this rebased worktree because required submodules are unavailable, so I am not claiming current-head runtime results. When convenient, could you review the rebased head and let me know if the conflict resolution or new main changes need adjustment?
xXPBSXx commented 2026-10-21 07:44:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T07:44:14Z.


Windows data point for 710c8a1ef merged onto main 338f22e49 (clean, git merge-tree rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. ctest -N -R '^agc_driver_graphics$' lists exactly that one test; ctest --no-tests=error -R '^agc_driver_graphics$' was run three times per tree.

  • With the PR: passes 3 of 3 (11.5-11.8 s).
  • Same tree with BdaResources.cpp and MultisampleTarget.cpp (under Graphics/src) restored to main (the new test cases and the headers kept): fails 3 of 3 (ordinary test failure, not a crash).
  • One further run of that no-fix tree on main 9be6ccf60 with the full output kept: it fails with AGC graphics: a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table.
    Not tested: the new SampleMultisampleTarget execution test (a GPU test, not run), other platforms, a title run.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310798848 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#issuecomment-6310798848). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T07:44:14Z. --- Windows data point for `710c8a1ef` merged onto `main` `338f22e49` (clean, `git merge-tree` rc 0): Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. `ctest -N -R '^agc_driver_graphics$'` lists exactly that one test; `ctest --no-tests=error -R '^agc_driver_graphics$'` was run three times per tree. - With the PR: passes 3 of 3 (11.5-11.8 s). - Same tree with `BdaResources.cpp` and `MultisampleTarget.cpp` (under `Graphics/src`) restored to `main` (the new test cases and the headers kept): fails 3 of 3 (ordinary test failure, not a crash). - One further run of that no-fix tree on `main` `9be6ccf60` with the full output kept: it fails with `AGC graphics: a repeated build with a stable address-space and MSAA guard generation missed the serial-keyed BDA table`. Not tested: the new `SampleMultisampleTarget` execution test (a GPU test, not run), other platforms, a title run. AI-assisted (Claude Code).
fma-rc commented 2026-10-24 23:42:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-24T23:42:23Z.

Review: APPROVED


The agc_driver_sample_multisample_target failure I reported is gone at 79cb249d6: it passes on the RTX 5080 (615.78.08), the 680M (RADV, Mesa 26.2.4) and lavapipe. I read the diff again and found nothing else to change.

The branch now conflicts with main f26434afa in BdaResources.cpp and MultisampleTarget.cpp, so it needs one more rebase before it can merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5640627123 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#pullrequestreview-5640627123). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-24T23:42:23Z. **Review:** APPROVED --- The `agc_driver_sample_multisample_target` failure I reported is gone at 79cb249d6: it passes on the RTX 5080 (615.78.08), the 680M (RADV, Mesa 26.2.4) and lavapipe. I read the diff again and found nothing else to change. The branch now conflicts with `main` f26434afa in `BdaResources.cpp` and `MultisampleTarget.cpp`, so it needs one more rebase before it can merge.
adriadam10 commented 2026-10-25 07:41:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-25T07:41:08Z.

Review: CHANGES_REQUESTED


The full Build on this head fails on Linux (run 40170250296): agc_driver_sample_multisample_target aborts at SampleMultisampleTarget.cpp:723:

BDA access to an ordinary neighboring range failed: [gpu] deferred write-back failed: BDA access failed: address=0x78f8a77b00fc instruction=0x24 bytes=1 stage=4 reason=1

  • The case comes from this PR's CheckBdaSpan(..., false) calls (not on main). On the runner /dev/udmabuf is not accessible ([gpu] open /dev/udmabuf: Permission denied; ... GPU stores through FLAT/GLOBAL addresses do not reach it), so the byte store from the BDA span never reaches guest memory. The earlier passing runs were on hosts where that device works.
  • Please make the test independent of that: skip the store-checking part (exit 77 with a skipped, no ... line matching the check_skips.py regex) when dma-buf imports are unavailable, or check the ordinary-range access in a way that does not need GPU stores to reach copied memory. The refusal case (refused=true) can still run everywhere.
  • Please also confirm reason=1 really is only the missing dma-buf path and not the filtered table dropping the neighboring range.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642101592 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6628#pullrequestreview-5642101592). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-25T07:41:08Z. **Review:** CHANGES_REQUESTED --- The full Build on this head fails on Linux (run 40170250296): `agc_driver_sample_multisample_target` aborts at `SampleMultisampleTarget.cpp:723`: `BDA access to an ordinary neighboring range failed: [gpu] deferred write-back failed: BDA access failed: address=0x78f8a77b00fc instruction=0x24 bytes=1 stage=4 reason=1` - The case comes from this PR's `CheckBdaSpan(..., false)` calls (not on `main`). On the runner `/dev/udmabuf` is not accessible (`[gpu] open /dev/udmabuf: Permission denied; ... GPU stores through FLAT/GLOBAL addresses do not reach it`), so the byte store from the BDA span never reaches guest memory. The earlier passing runs were on hosts where that device works. - Please make the test independent of that: skip the store-checking part (exit 77 with a `skipped, no ...` line matching the `check_skips.py` regex) when dma-buf imports are unavailable, or check the ordinary-range access in a way that does not need GPU stores to reach copied memory. The refusal case (`refused=true`) can still run everywhere. - Please also confirm `reason=1` really is only the missing dma-buf path and not the filtered table dropping the neighboring range.
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!6628
No description provided.