test(agc): skip the MSAA storage-promotion remap on sample-order devices #9455

Merged
jotitadev merged 2 commits from upstream-pr/9455 into main 2026-10-27 12:09:08 +00:00
jotitadev commented 2026-10-21 22:34:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-21T22:34:12Z.


What

agc_driver_multisample_retirement fails deterministically on some devices with MSAA storage promotion did not retain its source image (MultisampleRetirement.cpp, in StorageRemap). This happens on a device with programmable sample locations but only a 1x1 location grid (for example lavapipe): MayReorderSamples is true there, so the driver creates the multisampled color target with storage usage from the start to write the guest's sample order back. MultisampleTargetStorageView then returns that already-storable image and makeStorable is a no-op, so storage access does not allocate a new image and the owner's generation does not change. StorageRemap asserted the opposite (promoted.generation != old.generation), which only holds when the target is not born storable.

The fix skips StorageRemap on exactly those devices, mirroring OrderRemap, which uses the same MayReorderSamples && SampleOrderStorageFormat != VK_FORMAT_UNDEFINED condition and already runs only there. No coverage is lost: the born-storable target's retirement lifetime is covered by OrderRemap on those devices, and StorageRemap still exercises the promotion path (a storable image allocated on first storage access, retiring the color-only owner) on every device whose MSAA targets are not born storable — for example NVIDIA, whose 4x sample-location grid is 2x2, so MayReorderSamples is false and the target is created color-only.

StorageTwin (added to main in 4375cf06a, fix(agc): resolve and render a multisampled target through its sRGB twin format) makes the same assumption: it requires the storage view to be a new image (MSAA storage promotion kept the rendered image). On the same born-storable devices it now fails there once StorageRemap is skipped. The second commit makes that check expect the same image when the target is born storable (same condition), and a new image everywhere else; the twin-view checks of that case still run on every device.

Tested

This branch rebased onto main a8bc4474c (2026-10-27); the main and first-commit-only arms were run on main 4297464b1, which has the same MultisampleRetirement.cpp and MultisampleTarget.cpp. Ubuntu 26.04, GCC 15.2, Release, same command and the three variables, layer 1.4.341, RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), 3 runs each:

agc_driver_multisample_retirement RTX 3070 lavapipe
main (4297464b1) pass fail MSAA storage promotion did not retain its source image (StorageRemap)
first commit only (eb6f3f94e) pass fail MSAA storage promotion kept the rendered image (StorageTwin)
this branch pass pass, StorageRemap skipped, StorageTwin runs

0 VUID- in every run, no missing-layer message. Both devices run StorageTwin (both have shaderStorageImageMultisample).

The runs below are from before StorageTwin existed:

Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Run as ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layer 1.4.341, Ubuntu vulkan-validationlayers 1.4.341.0-1), on origin/main d6eafa54d and with this change applied on the same checkout. Two devices on the same host, selected with VK_ICD_FILENAMES: NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8).

agc_driver_multisample_retirement RTX 3070 lavapipe
main pass, 0 VUID- fail (MSAA storage promotion did not retain its source image), 0 VUID-
this change pass, 0 VUID- pass (StorageRemap skipped: "...born storable with no promotion to retire..."), 0 VUID-

No log reports was not found but was requested by env var VK_INSTANCE_LAYERS; VK_LOADER_DEBUG=layer confirms the validation layer is inserted at instance and device level on both devices. No VUID- message on main or with this change, so no new VUID-. Full logs are in the review thread.

The earlier runs on a6dcea927 with ANYPS5_NO_SHADER_CACHE=1 gave the same pass/fail table (RTX 3070 2/2 pass both ways; lavapipe 3/3 fail on main, 3/3 pass with this change).

The driver log confirms the mechanism: NVIDIA reports a 2x2 largest sample-location grid at 4 samples (so StorageRemap runs and the promotion allocates a new image), lavapipe reports 1x1 at 4 samples (so the target is born storable and StorageRemap is skipped).

Apple M2 Max (macOS 27.2, x86-64 under Rosetta, on #8658 564e005acb because main does not link on macOS), same command and the three variables, layer 1.4.363 from the LunarG SDK, MoltenVK 1.4.2 and MoltenVK main + SPIRV-Cross #2704: fails identically on the base and with this change (the device cannot write the multisampled color target's format as a storage image at its sample count), only the pre-existing VUID-VkDeviceCreateInfo-pProperties-04451 (portability subset) on both, no new VUID-. MoltenVK has a 1x1 grid but no shaderStorageImageMultisample, so this change's condition is false and StorageRemap throws; that is the case #8604 skips. Logs in the review thread.

Not run: Windows, the full agc suite rebuild.

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: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04; Apple M2 Max (MoltenVK 1.4.2 and main, macOS 27.2)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959265684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9455). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-21T22:34:12Z. --- ### What `agc_driver_multisample_retirement` fails deterministically on some devices with `MSAA storage promotion did not retain its source image` (`MultisampleRetirement.cpp`, in `StorageRemap`). This happens on a device with programmable sample locations but only a 1x1 location grid (for example lavapipe): `MayReorderSamples` is true there, so the driver creates the multisampled color target with storage usage from the start to write the guest's sample order back. `MultisampleTargetStorageView` then returns that already-storable image and `makeStorable` is a no-op, so storage access does not allocate a new image and the owner's generation does not change. `StorageRemap` asserted the opposite (`promoted.generation != old.generation`), which only holds when the target is *not* born storable. The fix skips `StorageRemap` on exactly those devices, mirroring `OrderRemap`, which uses the same `MayReorderSamples && SampleOrderStorageFormat != VK_FORMAT_UNDEFINED` condition and already runs only there. No coverage is lost: the born-storable target's retirement lifetime is covered by `OrderRemap` on those devices, and `StorageRemap` still exercises the promotion path (a storable image allocated on first storage access, retiring the color-only owner) on every device whose MSAA targets are not born storable — for example NVIDIA, whose 4x sample-location grid is 2x2, so `MayReorderSamples` is false and the target is created color-only. `StorageTwin` (added to `main` in `4375cf06a`, `fix(agc): resolve and render a multisampled target through its sRGB twin format`) makes the same assumption: it requires the storage view to be a new image (`MSAA storage promotion kept the rendered image`). On the same born-storable devices it now fails there once `StorageRemap` is skipped. The second commit makes that check expect the same image when the target is born storable (same condition), and a new image everywhere else; the twin-view checks of that case still run on every device. ### Tested This branch rebased onto `main` `a8bc4474c` (2026-10-27); the `main` and first-commit-only arms were run on `main` `4297464b1`, which has the same `MultisampleRetirement.cpp` and `MultisampleTarget.cpp`. Ubuntu 26.04, GCC 15.2, Release, same command and the three variables, layer 1.4.341, RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), 3 runs each: | `agc_driver_multisample_retirement` | RTX 3070 | lavapipe | |---|---|---| | `main` (`4297464b1`) | pass | **fail** `MSAA storage promotion did not retain its source image` (`StorageRemap`) | | first commit only (`eb6f3f94e`) | pass | **fail** `MSAA storage promotion kept the rendered image` (`StorageTwin`) | | this branch | pass | pass, `StorageRemap` skipped, `StorageTwin` runs | 0 `VUID-` in every run, no missing-layer message. Both devices run `StorageTwin` (both have `shaderStorageImageMultisample`). The runs below are from before `StorageTwin` existed: Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Run as `ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (layer 1.4.341, Ubuntu `vulkan-validationlayers` 1.4.341.0-1), on `origin/main` `d6eafa54d` and with this change applied on the same checkout. Two devices on the same host, selected with `VK_ICD_FILENAMES`: NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8). | `agc_driver_multisample_retirement` | RTX 3070 | lavapipe | |---|---|---| | `main` | pass, 0 `VUID-` | **fail** (`MSAA storage promotion did not retain its source image`), 0 `VUID-` | | this change | pass, 0 `VUID-` | pass (`StorageRemap` skipped: "...born storable with no promotion to retire..."), 0 `VUID-` | No log reports `was not found but was requested by env var VK_INSTANCE_LAYERS`; `VK_LOADER_DEBUG=layer` confirms the validation layer is inserted at instance and device level on both devices. No `VUID-` message on `main` or with this change, so no new `VUID-`. Full logs are in the review thread. The earlier runs on `a6dcea927` with `ANYPS5_NO_SHADER_CACHE=1` gave the same pass/fail table (RTX 3070 2/2 pass both ways; lavapipe 3/3 fail on `main`, 3/3 pass with this change). The driver log confirms the mechanism: NVIDIA reports a 2x2 largest sample-location grid at 4 samples (so `StorageRemap` runs and the promotion allocates a new image), lavapipe reports 1x1 at 4 samples (so the target is born storable and `StorageRemap` is skipped). Apple M2 Max (macOS 27.2, x86-64 under Rosetta, on #8658 `564e005acb` because `main` does not link on macOS), same command and the three variables, layer 1.4.363 from the LunarG SDK, MoltenVK 1.4.2 and MoltenVK `main` + SPIRV-Cross #2704: fails identically on the base and with this change (`the device cannot write the multisampled color target's format as a storage image at its sample count`), only the pre-existing `VUID-VkDeviceCreateInfo-pProperties-04451` (portability subset) on both, no new `VUID-`. MoltenVK has a 1x1 grid but no `shaderStorageImageMultisample`, so this change's condition is false and `StorageRemap` throws; that is the case #8604 skips. Logs in the review thread. Not run: Windows, the full agc suite rebuild. ### 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: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04; Apple M2 Max (MoltenVK 1.4.2 and main, macOS 27.2) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-21 23:14:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:14:07Z.

Review: DISMISSED


The focused before/after reproduction is useful, but this test is under libSceAgcDriver, and the repository rule requires the same focused test on main and this change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Please attach both logs, confirm neither reports the requested layer missing, and compare for new VUID- messages. The current report mentions only ANYPS5_NO_SHADER_CACHE=1, so I am holding approval until that required validation evidence is recorded. Hosted full Linux/Windows jobs were skipped; I did not run the Vulkan test locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607375109 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9455#pullrequestreview-5607375109). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T23:14:07Z. **Review:** DISMISSED --- The focused before/after reproduction is useful, but this test is under `libSceAgcDriver`, and the repository rule requires the same focused test on `main` and this change with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. Please attach both logs, confirm neither reports the requested layer missing, and compare for new `VUID-` messages. The current report mentions only `ANYPS5_NO_SHADER_CACHE=1`, so I am holding approval until that required validation evidence is recorded. Hosted full Linux/Windows jobs were skipped; I did not run the Vulkan test locally.
jotitadev commented 2026-10-22 06:50:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T06:50:38Z.


Ran the required validation-layer comparison for agc_driver_multisample_retirement.

  • Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON
  • main: d6eafa54d (current main). Change: PR head eb6f3f94e diff applied on the same d6eafa54d checkout (the diff is test-only and applies cleanly; no rebase needed)
  • Devices on the same host, selected with VK_ICD_FILENAMES: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8)
  • Layer: VK_LAYER_KHRONOS_validation 1.4.341 (Ubuntu vulkan-validationlayers 1.4.341.0-1, unpacked and added with VK_ADD_LAYER_PATH)
  • Command, identical for all four runs:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
VK_ADD_LAYER_PATH=$HOME/vvl/layer VK_ICD_FILENAMES=<nvidia_icd.json|lvp_icd.json> \
ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30
RTX 3070 lavapipe
main Passed, 0 VUID- Failed (MSAA storage promotion did not retain its source image), 0 VUID-
this change Passed, 0 VUID- Passed (StorageRemap skipped), 0 VUID-
  • None of the four logs contains was not found but was requested by env var VK_INSTANCE_LAYERS.
  • The layer is loaded on both devices: a second run of each case with VK_LOADER_DEBUG=layer shows Insert instance layer "VK_LAYER_KHRONOS_validation" and Inserted device layer "VK_LAYER_KHRONOS_validation". The codebase registers no debug messenger, so the layer reports to stdout with its default callback.
  • VUID- messages: none on main, none with this change, on either device, so no new VUID-. On lavapipe main stops at the failing StorageRemap check, so the subtests after it run only with this change, and they also log no VUID-.
Log: main, RTX 3070
# head: d6eafa54d0464258574fd2f71889754d05a5bc93 (main)
# diff vs origin/main:
# env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
# cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30
UpdateCTestConfiguration  from :/home/jota/anyps5-9455/build/DartConfiguration.tcl
Test project /home/jota/anyps5-9455/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 730
    Start 730: agc_driver_multisample_retirement

730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests
730: Working Directory: /home/jota/anyps5-9455
730: Environment variables: 
730:  ANYPS5_NO_SHADER_CACHE=1
730:  APS5_NO_PIPELINE_JOURNAL=1
730: Test timeout computed to be: 30
730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO
730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil)
730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5c470f868010
730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5c470f869000
730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1
730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5c4710101970 name=NVIDIA GeForce RTX 3070 api=0x404149 type=2
730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5c4710101970 queueFamily=0
730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3070 vendor=0x10de device=0x2484 subgroup=32
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=8192.0 MiB flags=0x1
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 1 size=23061.5 MiB flags=0x0
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 2 size=246.0 MiB flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=1 flags=0x0
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 1 heap=0 flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 2 heap=0 flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 3 heap=1 flags=0x6
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 4 heap=1 flags=0xe
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 5 heap=2 flags=0x7
730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
730: [src/VulkanDevice.cpp:1892 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5c471024ef00 queue=0x5c47103dace0 family=0
730: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
730: 32 idle MSAA remaps: created=32 destroyed=31 live=1
730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes
1/1 Test #730: agc_driver_multisample_retirement ...   Passed    0.32 sec

The following tests passed:
	agc_driver_multisample_retirement

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.35 sec
# ctest rc=0
Log: this change, RTX 3070
# head: d6eafa54d0464258574fd2f71889754d05a5bc93 (pr)
# diff vs origin/main:
 .../prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp     | 4 ++++
 1 file changed, 4 insertions(+)
# env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
# cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30
UpdateCTestConfiguration  from :/home/jota/anyps5-9455/build/DartConfiguration.tcl
Test project /home/jota/anyps5-9455/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 730
    Start 730: agc_driver_multisample_retirement

730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests
730: Working Directory: /home/jota/anyps5-9455
730: Environment variables: 
730:  ANYPS5_NO_SHADER_CACHE=1
730:  APS5_NO_PIPELINE_JOURNAL=1
730: Test timeout computed to be: 30
730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO
730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil)
730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5f34322e8010
730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5f34322e9000
730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1
730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5f3432b81d80 name=NVIDIA GeForce RTX 3070 api=0x404149 type=2
730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5f3432b81d80 queueFamily=0
730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3070 vendor=0x10de device=0x2484 subgroup=32
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=8192.0 MiB flags=0x1
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 1 size=23061.5 MiB flags=0x0
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 2 size=246.0 MiB flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=1 flags=0x0
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 1 heap=0 flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 2 heap=0 flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 3 heap=1 flags=0x6
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 4 heap=1 flags=0xe
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 5 heap=2 flags=0x7
730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
730: [src/VulkanDevice.cpp:1892 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5f3432ccf2c0 queue=0x5f3432e5e9b0 family=0
730: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
730: 32 idle MSAA remaps: created=32 destroyed=31 live=1
730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes
1/1 Test #730: agc_driver_multisample_retirement ...   Passed    0.41 sec

The following tests passed:
	agc_driver_multisample_retirement

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.44 sec
# ctest rc=0
Log: main, lavapipe
# head: d6eafa54d0464258574fd2f71889754d05a5bc93 (main)
# diff vs origin/main:
# env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json
# cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30
UpdateCTestConfiguration  from :/home/jota/anyps5-9455/build/DartConfiguration.tcl
Test project /home/jota/anyps5-9455/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 730
    Start 730: agc_driver_multisample_retirement

730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests
730: Working Directory: /home/jota/anyps5-9455
730: Environment variables: 
730:  ANYPS5_NO_SHADER_CACHE=1
730:  APS5_NO_PIPELINE_JOURNAL=1
730: Test timeout computed to be: 30
730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO
730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil)
730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5cf0c153a010
730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5cf0c153b000
730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1
730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5cf0c15f8af0 name=llvmpipe (LLVM 21.1.8, 256 bits) api=0x40414f type=4
730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5cf0c15f8af0 queueFamily=0
730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=llvmpipe (LLVM 21.1.8, 256 bits) vendor=0x10005 device=0x0 subgroup=8
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=30748.7 MiB flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=0 flags=0xf
730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=13 narrowSubgroupClock=0
730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1
730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5cf0c16561b0 queue=0x5cf0c1657948 family=0
730: [write-watch] host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared
730: [write-watch] dma-buf imports keep write protection: yes (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 0 after the import, 1 seen after a CPU store); imported ranges stay watched
730: 32 idle MSAA remaps: created=32 destroyed=31 live=1
730: AGC graphics: MSAA storage promotion did not retain its source image
1/1 Test #730: agc_driver_multisample_retirement ...***Failed    0.07 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.10 sec

The following tests FAILED:
	730 - agc_driver_multisample_retirement (Failed)
Errors while running CTest
Output from these tests are in: /home/jota/anyps5-9455/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
# ctest rc=8
Log: this change, lavapipe
# head: d6eafa54d0464258574fd2f71889754d05a5bc93 (pr)
# diff vs origin/main:
 .../prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp     | 4 ++++
 1 file changed, 4 insertions(+)
# env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json
# cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30
UpdateCTestConfiguration  from :/home/jota/anyps5-9455/build/DartConfiguration.tcl
Test project /home/jota/anyps5-9455/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 730
    Start 730: agc_driver_multisample_retirement

730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests
730: Working Directory: /home/jota/anyps5-9455
730: Environment variables: 
730:  ANYPS5_NO_SHADER_CACHE=1
730:  APS5_NO_PIPELINE_JOURNAL=1
730: Test timeout computed to be: 30
730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO
730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil)
730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5f79e7bcb010
730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5f79e7bcc000
730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1
730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5f79e7c89af0 name=llvmpipe (LLVM 21.1.8, 256 bits) api=0x40414f type=4
730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5f79e7c89af0 queueFamily=0
730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=llvmpipe (LLVM 21.1.8, 256 bits) vendor=0x10005 device=0x0 subgroup=8
730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=30748.7 MiB flags=0x1
730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=0 flags=0xf
730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=13 narrowSubgroupClock=0
730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1
730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5f79e7ce71b0 queue=0x5f79e7ce8948 family=0
730: [write-watch] host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared
730: [write-watch] dma-buf imports keep write protection: yes (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 0 after the import, 1 seen after a CPU store); imported ranges stay watched
730: 32 idle MSAA remaps: created=32 destroyed=31 live=1
730: the device stores a multisampled color target in the guest sample order, so it is born storable with no promotion to retire; the MSAA storage-promotion remap is skipped
730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes
1/1 Test #730: agc_driver_multisample_retirement ...   Passed    0.07 sec

The following tests passed:
	agc_driver_multisample_retirement

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.09 sec
# ctest rc=0
Layer insertion (VK_LOADER_DEBUG=layer, same command)
--- main-nv
[Vulkan Loader] INFO | LAYER:   Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
[Vulkan Loader] INFO | LAYER:   Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
--- pr-nv
[Vulkan Loader] INFO | LAYER:   Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
[Vulkan Loader] INFO | LAYER:   Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
--- main-lvp
[Vulkan Loader] INFO | LAYER:   Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
[Vulkan Loader] INFO | LAYER:   Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
--- pr-lvp
[Vulkan Loader] INFO | LAYER:   Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
[Vulkan Loader] INFO | LAYER:   Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6334654965 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9455#issuecomment-6334654965). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T06:50:38Z. --- Ran the required validation-layer comparison for `agc_driver_multisample_retirement`. - Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON` - `main`: `d6eafa54d` (current `main`). Change: PR head `eb6f3f94e` diff applied on the same `d6eafa54d` checkout (the diff is test-only and applies cleanly; no rebase needed) - Devices on the same host, selected with `VK_ICD_FILENAMES`: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) - Layer: `VK_LAYER_KHRONOS_validation` 1.4.341 (Ubuntu `vulkan-validationlayers` 1.4.341.0-1, unpacked and added with `VK_ADD_LAYER_PATH`) - Command, identical for all four runs: ``` ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \ VK_ADD_LAYER_PATH=$HOME/vvl/layer VK_ICD_FILENAMES=<nvidia_icd.json|lvp_icd.json> \ ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 ``` | | RTX 3070 | lavapipe | |---|---|---| | `main` | Passed, 0 `VUID-` | **Failed** (`MSAA storage promotion did not retain its source image`), 0 `VUID-` | | this change | Passed, 0 `VUID-` | Passed (`StorageRemap` skipped), 0 `VUID-` | - None of the four logs contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. - The layer is loaded on both devices: a second run of each case with `VK_LOADER_DEBUG=layer` shows `Insert instance layer "VK_LAYER_KHRONOS_validation"` and `Inserted device layer "VK_LAYER_KHRONOS_validation"`. The codebase registers no debug messenger, so the layer reports to stdout with its default callback. - `VUID-` messages: none on `main`, none with this change, on either device, so no new `VUID-`. On lavapipe `main` stops at the failing `StorageRemap` check, so the subtests after it run only with this change, and they also log no `VUID-`. <details><summary>Log: main, RTX 3070</summary> ``` # head: d6eafa54d0464258574fd2f71889754d05a5bc93 (main) # diff vs origin/main: # env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json # cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 UpdateCTestConfiguration from :/home/jota/anyps5-9455/build/DartConfiguration.tcl Test project /home/jota/anyps5-9455/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 730 Start 730: agc_driver_multisample_retirement 730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests 730: Working Directory: /home/jota/anyps5-9455 730: Environment variables: 730: ANYPS5_NO_SHADER_CACHE=1 730: APS5_NO_PIPELINE_JOURNAL=1 730: Test timeout computed to be: 30 730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO 730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil) 730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5c470f868010 730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5c470f869000 730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1 730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5c4710101970 name=NVIDIA GeForce RTX 3070 api=0x404149 type=2 730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5c4710101970 queueFamily=0 730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3070 vendor=0x10de device=0x2484 subgroup=32 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=8192.0 MiB flags=0x1 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 1 size=23061.5 MiB flags=0x0 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 2 size=246.0 MiB flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=1 flags=0x0 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 1 heap=0 flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 2 heap=0 flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 3 heap=1 flags=0x6 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 4 heap=1 flags=0xe 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 5 heap=2 flags=0x7 730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0 730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1 730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 730: [src/VulkanDevice.cpp:1892 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5c471024ef00 queue=0x5c47103dace0 family=0 730: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched 730: 32 idle MSAA remaps: created=32 destroyed=31 live=1 730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes 1/1 Test #730: agc_driver_multisample_retirement ... Passed 0.32 sec The following tests passed: agc_driver_multisample_retirement 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.35 sec # ctest rc=0 ``` </details> <details><summary>Log: this change, RTX 3070</summary> ``` # head: d6eafa54d0464258574fd2f71889754d05a5bc93 (pr) # diff vs origin/main: .../prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp | 4 ++++ 1 file changed, 4 insertions(+) # env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json # cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 UpdateCTestConfiguration from :/home/jota/anyps5-9455/build/DartConfiguration.tcl Test project /home/jota/anyps5-9455/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 730 Start 730: agc_driver_multisample_retirement 730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests 730: Working Directory: /home/jota/anyps5-9455 730: Environment variables: 730: ANYPS5_NO_SHADER_CACHE=1 730: APS5_NO_PIPELINE_JOURNAL=1 730: Test timeout computed to be: 30 730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO 730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil) 730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5f34322e8010 730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5f34322e9000 730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1 730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5f3432b81d80 name=NVIDIA GeForce RTX 3070 api=0x404149 type=2 730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5f3432b81d80 queueFamily=0 730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3070 vendor=0x10de device=0x2484 subgroup=32 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=8192.0 MiB flags=0x1 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 1 size=23061.5 MiB flags=0x0 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 2 size=246.0 MiB flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=1 flags=0x0 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 1 heap=0 flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 2 heap=0 flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 3 heap=1 flags=0x6 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 4 heap=1 flags=0xe 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 5 heap=2 flags=0x7 730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0 730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1 730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 730: [src/VulkanDevice.cpp:1892 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5f3432ccf2c0 queue=0x5f3432e5e9b0 family=0 730: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched 730: 32 idle MSAA remaps: created=32 destroyed=31 live=1 730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes 1/1 Test #730: agc_driver_multisample_retirement ... Passed 0.41 sec The following tests passed: agc_driver_multisample_retirement 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.44 sec # ctest rc=0 ``` </details> <details><summary>Log: main, lavapipe</summary> ``` # head: d6eafa54d0464258574fd2f71889754d05a5bc93 (main) # diff vs origin/main: # env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json # cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 UpdateCTestConfiguration from :/home/jota/anyps5-9455/build/DartConfiguration.tcl Test project /home/jota/anyps5-9455/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 730 Start 730: agc_driver_multisample_retirement 730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests 730: Working Directory: /home/jota/anyps5-9455 730: Environment variables: 730: ANYPS5_NO_SHADER_CACHE=1 730: APS5_NO_PIPELINE_JOURNAL=1 730: Test timeout computed to be: 30 730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO 730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil) 730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5cf0c153a010 730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5cf0c153b000 730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1 730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5cf0c15f8af0 name=llvmpipe (LLVM 21.1.8, 256 bits) api=0x40414f type=4 730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5cf0c15f8af0 queueFamily=0 730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=llvmpipe (LLVM 21.1.8, 256 bits) vendor=0x10005 device=0x0 subgroup=8 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=30748.7 MiB flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=0 flags=0xf 730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=13 narrowSubgroupClock=0 730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1 730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5cf0c16561b0 queue=0x5cf0c1657948 family=0 730: [write-watch] host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared 730: [write-watch] dma-buf imports keep write protection: yes (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 0 after the import, 1 seen after a CPU store); imported ranges stay watched 730: 32 idle MSAA remaps: created=32 destroyed=31 live=1 730: AGC graphics: MSAA storage promotion did not retain its source image 1/1 Test #730: agc_driver_multisample_retirement ...***Failed 0.07 sec 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.10 sec The following tests FAILED: 730 - agc_driver_multisample_retirement (Failed) Errors while running CTest Output from these tests are in: /home/jota/anyps5-9455/build/Testing/Temporary/LastTest.log Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely. # ctest rc=8 ``` </details> <details><summary>Log: this change, lavapipe</summary> ``` # head: d6eafa54d0464258574fd2f71889754d05a5bc93 (pr) # diff vs origin/main: .../prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp | 4 ++++ 1 file changed, 4 insertions(+) # env: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/jota/vvl/layer VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json # cmd: ctest --test-dir build -R ^agc_driver_multisample_retirement -V -j1 --timeout 30 UpdateCTestConfiguration from :/home/jota/anyps5-9455/build/DartConfiguration.tcl Test project /home/jota/anyps5-9455/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 730 Start 730: agc_driver_multisample_retirement 730: Test command: /home/jota/anyps5-9455/build/tests/agc_driver_multisample_retirement_tests 730: Working Directory: /home/jota/anyps5-9455 730: Environment variables: 730: ANYPS5_NO_SHADER_CACHE=1 730: APS5_NO_PIPELINE_JOURNAL=1 730: Test timeout computed to be: 30 730: [src/HostCpu.cpp:193 operator()] host CPU Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, CLFLUSHOPT, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SHA, CLWB, RDPID, SSE4A, CLZERO 730: [src/VulkanDevice.cpp:1013 VulkanDevice] VulkanDevice constructor window=(nil) 730: [src/VulkanDevice.cpp:1022 VulkanDevice] Vulkan loader loaded library=0x5f79e7bcb010 730: [src/VulkanDevice.cpp:1060 VulkanDevice] Vulkan instance created instance=0x5f79e7bcc000 730: [src/VulkanDevice.cpp:1071 VulkanDevice] Physical device count=1 730: [src/VulkanDevice.cpp:1104 VulkanDevice] Physical device candidate=0x5f79e7c89af0 name=llvmpipe (LLVM 21.1.8, 256 bits) api=0x40414f type=4 730: [src/VulkanDevice.cpp:1151 VulkanDevice] Physical device selected physical=0x5f79e7c89af0 queueFamily=0 730: [src/VulkanDevice.cpp:1165 VulkanDevice] Selected GPU name=llvmpipe (LLVM 21.1.8, 256 bits) vendor=0x10005 device=0x0 subgroup=8 730: [src/VulkanDevice.cpp:1167 VulkanDevice] Memory heap 0 size=30748.7 MiB flags=0x1 730: [src/VulkanDevice.cpp:1168 VulkanDevice] Memory type 0 heap=0 flags=0xf 730: [src/VulkanDevice.cpp:1241 VulkanDevice] Shader clock driver=13 narrowSubgroupClock=0 730: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1 730: [src/VulkanDevice.cpp:1624 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 730: [src/VulkanDevice.cpp:2003 VulkanDevice] Vulkan device ready device=0x5f79e7ce71b0 queue=0x5f79e7ce8948 family=0 730: [write-watch] host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared 730: [write-watch] dma-buf imports keep write protection: yes (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 0 after the import, 1 seen after a CPU store); imported ranges stay watched 730: 32 idle MSAA remaps: created=32 destroyed=31 live=1 730: the device stores a multisampled color target in the guest sample order, so it is born storable with no promotion to retire; the MSAA storage-promotion remap is skipped 730: retired MSAA allocations stay bounded, recorded clears and storage promotions retain their images, sampled aliases release their parents after the last batch, and sample-order targets keep their retired images until their batch completes 1/1 Test #730: agc_driver_multisample_retirement ... Passed 0.07 sec The following tests passed: agc_driver_multisample_retirement 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.09 sec # ctest rc=0 ``` </details> <details><summary>Layer insertion (<code>VK_LOADER_DEBUG=layer</code>, same command)</summary> ``` --- main-nv [Vulkan Loader] INFO | LAYER: Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) [Vulkan Loader] INFO | LAYER: Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) --- pr-nv [Vulkan Loader] INFO | LAYER: Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) [Vulkan Loader] INFO | LAYER: Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) --- main-lvp [Vulkan Loader] INFO | LAYER: Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) [Vulkan Loader] INFO | LAYER: Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) --- pr-lvp [Vulkan Loader] INFO | LAYER: Insert instance layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) [Vulkan Loader] INFO | LAYER: Inserted device layer "VK_LAYER_KHRONOS_validation" (/home/jota/vvl/root/usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so) ``` </details> Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
GiannisG1 commented 2026-10-22 11:42:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-10-22T11:42:23Z.


Ran agc_driver_multisample_retirement with this PR (eb6f3f94e) and #8604 (0089f4f63) merged together (clean), Linux Mint 22.3, GCC 13.3, Release, 3 runs each:

Device Sample-location grid in the driver log shaderStorageImageMultisample Result
Intel HD 630, Mesa 25.2.8 ANV 1x1 at 2, 4 and 8 samples false skipped 3/3 (#8604's guard; OrderRemap skips its own case)
GTX 1050 Ti, 580.173.02 2x2 at 4 samples true passes 3/3, StorageRemap runs
llvmpipe, Mesa 25.2.8 none logged true passes 3/3, StorageRemap runs

The HD 630 is the case listed here as not run: a 1x1 grid without the feature, so the target is color-only and this PR's condition is false; StorageRemap would still reach the storage view and throw, and #8604 skips it. None of these devices has the born-storable target, so this PR's skip branch itself is not exercised here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339881787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9455#issuecomment-6339881787). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-10-22T11:42:23Z. --- Ran `agc_driver_multisample_retirement` with this PR (`eb6f3f94e`) and #8604 (`0089f4f63`) merged together (clean), Linux Mint 22.3, GCC 13.3, Release, 3 runs each: | Device | Sample-location grid in the driver log | `shaderStorageImageMultisample` | Result | |---|---|---|---| | Intel HD 630, Mesa 25.2.8 ANV | 1x1 at 2, 4 and 8 samples | false | skipped 3/3 (#8604's guard; `OrderRemap` skips its own case) | | GTX 1050 Ti, 580.173.02 | 2x2 at 4 samples | true | passes 3/3, `StorageRemap` runs | | llvmpipe, Mesa 25.2.8 | none logged | true | passes 3/3, `StorageRemap` runs | The HD 630 is the case listed here as not run: a 1x1 grid without the feature, so the target is color-only and this PR's condition is false; `StorageRemap` would still reach the storage view and throw, and #8604 skips it. None of these devices has the born-storable target, so this PR's skip branch itself is not exercised here.
Dextroid17 commented 2026-10-22 11:58:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-22T11:58:00Z.


Linux, llvmpipe (LLVM 23.1.1, 256 bits) via lavapipe, Mesa 26.2.4, GALLIUM_OVERRIDE_CPU_CAPS=avx, i9-11900K, CachyOS, GCC 16.2.1, Release, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, -j1; main 7e2ba73e4 with eb6f3f94e applied (local merge, clean, the 4-line test change only). Driver log: 4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1.

Head. agc_driver_multisample_retirement passes 6 of 6 (3 plain, 3 under VK_LAYER_KHRONOS_validation 1.4.363 with Insert instance layer confirmed per run), every run printing the new "born storable with no promotion to retire" line, 0 VUID-.

Negative control. MultisampleRetirement.cpp from 7e2ba73e4, the only change in the build tree, rebuilt: fails 6 of 6, always MSAA storage promotion did not retain its source image, 0 VUID-. A second lavapipe build after @jotitadev's 26.0.3 with the same 1x1 grid and the same failure, so it is not specific to one lavapipe build.

Why 25.2.8 and 26.x disagree. @GiannisG1's llvmpipe on Mesa 25.2.8 (https://github.com/boykopovar/AnyPS5/pull/9455#issuecomment-6339881787) logs no grid and passes with StorageRemap running; @jotitadev's 26.0.3 and this 26.2.4 log 1x1 and fail on main's test file. By reading, the line between them is Mesa 25.3.0: its release notes list "lavapipe: implement VK_EXT_sample_locations", lvp_device.c at mesa-25.3.0 sets .EXT_sample_locations = true and reports maxSampleLocationGridSize 1x1 with sampleLocationSubPixelBits 4, and mesa-25.2.8 has no mention of the extension. The Linux job's self-hosted runner has mesa-vulkan-drivers 25.2.8-0ubuntu0.24.04.4 (dpkg-query step of run 39746931544, the push build of main 7e2ba73e4, where test 731 passes), which fits: on that Mesa the driver logs no grid, so StorageRemap runs and passes, as in @GiannisG1's row. A lavapipe at 25.3.0 or later on that runner should, by this reading, log the 1x1 grid and fail main's StorageRemap the way both 26.x builds do; not run. This also answers the "I have not isolated which" in https://github.com/boykopovar/AnyPS5/pull/8998#issuecomment-6339202410: main 7e2ba73e4 alone fails here 6 of 6, and the remaining difference to CI fits the Mesa line above.

AI-assisted: yes (Claude Code); runs on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340165980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9455#issuecomment-6340165980). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-22T11:58:00Z. --- Linux, llvmpipe (LLVM 23.1.1, 256 bits) via lavapipe, Mesa 26.2.4, `GALLIUM_OVERRIDE_CPU_CAPS=avx`, i9-11900K, CachyOS, GCC 16.2.1, Release, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `-j1`; `main` `7e2ba73e4` with `eb6f3f94e` applied (local merge, clean, the 4-line test change only). Driver log: `4 samples 1x1, 8 samples 1x1; maxSampleLocationGridSize for every count 1x1`. **Head.** `agc_driver_multisample_retirement` passes 6 of 6 (3 plain, 3 under `VK_LAYER_KHRONOS_validation` 1.4.363 with `Insert instance layer` confirmed per run), every run printing the new "born storable with no promotion to retire" line, 0 `VUID-`. **Negative control.** `MultisampleRetirement.cpp` from `7e2ba73e4`, the only change in the build tree, rebuilt: fails 6 of 6, always `MSAA storage promotion did not retain its source image`, 0 `VUID-`. A second lavapipe build after @jotitadev's 26.0.3 with the same 1x1 grid and the same failure, so it is not specific to one lavapipe build. **Why 25.2.8 and 26.x disagree.** @GiannisG1's llvmpipe on Mesa 25.2.8 (https://github.com/boykopovar/AnyPS5/pull/9455#issuecomment-6339881787) logs no grid and passes with `StorageRemap` running; @jotitadev's 26.0.3 and this 26.2.4 log 1x1 and fail on main's test file. By reading, the line between them is Mesa 25.3.0: its release notes list "lavapipe: implement VK_EXT_sample_locations", `lvp_device.c` at `mesa-25.3.0` sets `.EXT_sample_locations = true` and reports `maxSampleLocationGridSize` 1x1 with `sampleLocationSubPixelBits` 4, and `mesa-25.2.8` has no mention of the extension. The Linux job's self-hosted runner has `mesa-vulkan-drivers 25.2.8-0ubuntu0.24.04.4` (`dpkg-query` step of run 39746931544, the push build of `main` `7e2ba73e4`, where test 731 passes), which fits: on that Mesa the driver logs no grid, so `StorageRemap` runs and passes, as in @GiannisG1's row. A lavapipe at 25.3.0 or later on that runner should, by this reading, log the 1x1 grid and fail main's `StorageRemap` the way both 26.x builds do; not run. This also answers the "I have not isolated which" in https://github.com/boykopovar/AnyPS5/pull/8998#issuecomment-6339202410: `main` `7e2ba73e4` alone fails here 6 of 6, and the remaining difference to CI fits the Mesa line above. AI-assisted: yes (Claude Code); runs on this machine.
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!9455
No description provided.