fix(agc): honor enabled storage MSAA for placeholders #7573

Merged
MarcZX10 merged 2 commits from upstream-pr/7573 into main 2026-10-18 18:24:54 +00:00
MarcZX10 commented 2026-10-18 15:02:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T15:02:46Z.


What

The sampled-cache test fixture created multisampled storage placeholder images even when its Vulkan device had not enabled shaderStorageImageMultisample. The fixture now enables the optional feature whenever the selected device supports it, across the default and resource test modes. When the feature is unavailable or deliberately disabled, PlaceholderImages uses single-sample storage placeholders instead. A new CTest mode disables the feature to exercise that fallback.

Fixes #7569.

Tested

Linux, current main e5f18ea99:

  • cmake -S . -B build-pr -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_AGC_EXECUTION_TESTS=SampledCacheBudget configured successfully.
  • cmake --build build-pr --target agc_driver_sampled_cache_budget_tests --parallel 4 passed. GCC 12 first stopped at an existing dependent-template parser error in SrtDescriptorEvaluation.cpp; I applied its one-word template qualifier only in the disposable build worktree, not in this PR.
  • CTest was attempted for both the default case and without-storage-image-multisample, with Vulkan required. Both aborted before Vulkan initialization because this host's Xeon E5-1620 v2 lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA. No runtime or GPU validation pass is claimed.
  • python3 tools/check_conventions.py --base upstream/main, python3 tools/pr_overlap.py --branch codex/agc-sampled-cache-msaa-feature, and git diff --check passed.

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
  • Fixes: #7569
  • Unblocks: none
  • GPUs tested: n/a (runtime not reached; see Tested)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4910172609 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T15:02:46Z. --- ### What The sampled-cache test fixture created multisampled storage placeholder images even when its Vulkan device had not enabled `shaderStorageImageMultisample`. The fixture now enables the optional feature whenever the selected device supports it, across the default and resource test modes. When the feature is unavailable or deliberately disabled, `PlaceholderImages` uses single-sample storage placeholders instead. A new CTest mode disables the feature to exercise that fallback. Fixes #7569. ### Tested Linux, current `main` `e5f18ea99`: - `cmake -S . -B build-pr -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_AGC_EXECUTION_TESTS=SampledCacheBudget` configured successfully. - `cmake --build build-pr --target agc_driver_sampled_cache_budget_tests --parallel 4` passed. GCC 12 first stopped at an existing dependent-template parser error in `SrtDescriptorEvaluation.cpp`; I applied its one-word `template` qualifier only in the disposable build worktree, not in this PR. - CTest was attempted for both the default case and `without-storage-image-multisample`, with Vulkan required. Both aborted before Vulkan initialization because this host's Xeon E5-1620 v2 lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA. No runtime or GPU validation pass is claimed. - `python3 tools/check_conventions.py --base upstream/main`, `python3 tools/pr_overlap.py --branch codex/agc-sampled-cache-msaa-feature`, and `git diff --check` passed. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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] Fixes: #7569 - [x] Unblocks: none - [x] GPUs tested: n/a (runtime not reached; see Tested) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 15:33:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T15:33:55Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7570 core/libs/prx/libSceAgcDriver/CMakeLists.txt L2039

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

Pull request Shared files not compared
PR 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4650 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6176 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6259 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6320 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6360 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6490 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6503 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6535 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6741 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6905 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 7464 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251739780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6251739780). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T15:33:55Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7570](https://www.github.com/boykopovar/AnyPS5/pull/7570) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L2039](https://github.com/boykopovar/AnyPS5/blob/5057673804b28d217559010d7ac1f702824f240b/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L2039) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6176](https://www.github.com/boykopovar/AnyPS5/pull/6176) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6259](https://www.github.com/boykopovar/AnyPS5/pull/6259) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6320](https://www.github.com/boykopovar/AnyPS5/pull/6320) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6360](https://www.github.com/boykopovar/AnyPS5/pull/6360) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6490](https://www.github.com/boykopovar/AnyPS5/pull/6490) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6499](https://www.github.com/boykopovar/AnyPS5/pull/6499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6503](https://www.github.com/boykopovar/AnyPS5/pull/6503) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6741](https://www.github.com/boykopovar/AnyPS5/pull/6741) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6763](https://www.github.com/boykopovar/AnyPS5/pull/6763) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6905](https://www.github.com/boykopovar/AnyPS5/pull/6905) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp` | | [PR 7464](https://www.github.com/boykopovar/AnyPS5/pull/7464) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
Amoenus commented 2026-10-18 15:40:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-18T15:40:06Z.


Updated verification: corrected headfd872264e passes on both GPUs

@MarcZX10 The typed-MSAA source concern below is addressed at fd872264e2e34adecc24737873194c94b238c525. I merged that exact head into our main91ddd-based validation integration with #7570's actual-device selector. The resulting frozen compositione41aa8ef34 is pushed on codex/validate-peer7573-fd-sonic-main91. Only the CMake insertion conflicted; both selector registrations and your disabled-feature registration were retained. This is a test of that composition, not your standalone head or latest main.

Full Windows runtime/test build passed. Seven GPU groups, each in3 fresh processes on each actual GPU, passed: default sampled cache, memory, without storage-image MSAA, three resource-admission/clear modes and actual-device selection. The CPU placeholder-shape and selector groups also passed3 times each: 21 NVIDIA GPU +21 AMD GPU +6 CPU passes; no failures/skips; max4.76s. Khronos validation1.4.363.0 loaded for all42 GPU processes; zero VUIDs, validation errors or warnings. Both the CPU shape check and disabled-feature runtime check exercise the new unavailable-slot rule; no single-sample replacement is used.

Matched preceding composition893f303a5f, without #7573, reproduced six VUID-VkImageCreateInfo-usage-00968 validation errors per ordinary-default process,3/3 on each actual GPU, despite passing behavior assertions. These errors are absent in all corrected runs. The current fixture assertions also require every typed MSAA-storage View request to throw when the feature is disabled.

Hardware: NVIDIA GeForce RTX5080 10de:2c02, driver610.62/32.0.16.1062; AMD Radeon(TM) Graphics 1002:13c0, driver32.0.21036.18; Windows11 Enterprise26200. These GPUs support storage-image MSAA; the disabled case tests it deliberately not enabled on the logical device. This is not a physically feature-absent-device run, a title unblock or a full-suite claim. The separate MoltenVK report remains independent evidence.

AI-assisted validation/report: yes (Codex).

Original source review of head5394684198 (addressed by fd872264e)

@MarcZX10 Thank you for picking up #7569. I checked the public-source change before starting a duplicate fix.

There is one correctness issue in PlaceholderImages.cpp: replacing shape.samples with VK_SAMPLE_COUNT_1_BIT changes the image behind a typed multisampled storage heap into a single-sample image. PlaceholderImageShapeOf and the shader heap type still describe that heap as multisampled. The Vulkan SPIR-V environment, VUID-RuntimeSpirv-samples-08726, requires an OpTypeImage with MS=1 to bind an image with more than one sample. The new fixture only uses its ordinary single-sample resources, so passing it would not establish that this substituted multisample heap can be consumed correctly.

Could the disabled-feature path leave those storage-MSAA slots unavailable, preserving the shape, and let the existing PlaceholderImages::View refusal handle an actual request? A regression should verify that disabled-feature MSAA storage heaps cannot return a single-sample placeholder, while supported single-sample storage and sampled-MSAA heaps retain their shapes. The fixture can still enable the supported feature normally, as your patch does.

This is a source/specification review, not a claimed GPU reproduction of the new path. Our current Sonic transaction is using its frozen build; I can supply actual AMD/NVIDIA validation afterward. Our #7570 selector is separate, and its author coordination with #6937 is already recorded; we should retain that actual-device reporting in any validation composition.

AI-assisted: yes (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251802378 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6251802378). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-18T15:40:06Z. --- ### Updated verification: corrected headfd872264e passes on both GPUs @MarcZX10 The typed-MSAA source concern below is addressed at `fd872264e2e34adecc24737873194c94b238c525`. I merged that exact head into our main91ddd-based validation integration with #7570's actual-device selector. The resulting [frozen compositione41aa8ef34](https://github.com/Amoenus/AnyPS5/commit/e41aa8ef3409a0683585c3af6ac9dd9aac7ef07a) is pushed on `codex/validate-peer7573-fd-sonic-main91`. Only the CMake insertion conflicted; both selector registrations and your disabled-feature registration were retained. This is a test of that composition, not your standalone head or latest main. Full Windows runtime/test build passed. Seven GPU groups, each in3 fresh processes on **each actual GPU**, passed: default sampled cache, memory, without storage-image MSAA, three resource-admission/clear modes and actual-device selection. The CPU placeholder-shape and selector groups also passed3 times each: **21 NVIDIA GPU +21 AMD GPU +6 CPU passes; no failures/skips; max4.76s**. Khronos validation1.4.363.0 loaded for all42 GPU processes; **zero VUIDs, validation errors or warnings**. Both the CPU shape check and disabled-feature runtime check exercise the new unavailable-slot rule; no single-sample replacement is used. Matched preceding composition893f303a5f, without #7573, reproduced six `VUID-VkImageCreateInfo-usage-00968` validation errors per ordinary-default process,3/3 on each actual GPU, despite passing behavior assertions. These errors are absent in all corrected runs. The current fixture assertions also require every typed MSAA-storage `View` request to throw when the feature is disabled. Hardware: NVIDIA GeForce RTX5080 `10de:2c02`, driver610.62/32.0.16.1062; AMD Radeon(TM) Graphics `1002:13c0`, driver32.0.21036.18; Windows11 Enterprise26200. These GPUs support storage-image MSAA; the disabled case tests it deliberately not enabled on the logical device. This is not a physically feature-absent-device run, a title unblock or a full-suite claim. The separate MoltenVK report remains independent evidence. AI-assisted validation/report: yes (Codex). <details> <summary>Original source review of head5394684198 (addressed by fd872264e)</summary> @MarcZX10 Thank you for picking up #7569. I checked the public-source change before starting a duplicate fix. There is one correctness issue in `PlaceholderImages.cpp`: replacing `shape.samples` with `VK_SAMPLE_COUNT_1_BIT` changes the image behind a typed multisampled storage heap into a single-sample image. `PlaceholderImageShapeOf` and the shader heap type still describe that heap as multisampled. The [Vulkan SPIR-V environment, VUID-RuntimeSpirv-samples-08726](https://docs.vulkan.org/spec/latest/appendices/spirvenv.html#VUID-RuntimeSpirv-samples-08726), requires an `OpTypeImage` with `MS=1` to bind an image with more than one sample. The new fixture only uses its ordinary single-sample resources, so passing it would not establish that this substituted multisample heap can be consumed correctly. Could the disabled-feature path leave those storage-MSAA slots unavailable, preserving the shape, and let the existing `PlaceholderImages::View` refusal handle an actual request? A regression should verify that disabled-feature MSAA storage heaps cannot return a single-sample placeholder, while supported single-sample storage and sampled-MSAA heaps retain their shapes. The fixture can still enable the supported feature normally, as your patch does. This is a source/specification review, not a claimed GPU reproduction of the new path. Our current Sonic transaction is using its frozen build; I can supply actual AMD/NVIDIA validation afterward. Our #7570 selector is separate, and its author coordination with #6937 is already recorded; we should retain that actual-device reporting in any validation composition. AI-assisted: yes (Codex). </details>
Mustafa1p commented 2026-10-18 15:49:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mustafa1p on 2026-10-18T15:49:24Z.


Independent Windows validation for #7569/#7573, coordinated with #7570 and #6937:

I reproduced six VUID-VkImageCreateInfo-usage-00968 diagnostics in the legacy default mode on each actual GPU: AMD Radeon(TM) Graphics (1002:13c0, Windows driver 32.0.21045.5002) and NVIDIA GeForce RTX 5090 (10de, Windows driver 32.0.16.1714), Windows 11 Pro 10.0.26300. Behavioral assertions passed despite those errors. The other selected GPU modes had no validation errors or warnings.

I then composed your pinned head 5394684198bc90e65afab15bda4240e1fb4b6c46 onto local #6937/#7570 integration b4782b8a9eb0dc3f31eb3e62039d40b88801a99b, yielding 5fbe8b50449fb8adb422d54fdf27047d5ff37e98. Only the CMake insertion conflict needed resolution: retain both the selector registrations and your disabled-feature registration. The common selector and #6937 guards remain intact. This is an unpublished local composition, not a test of your standalone head or latest main.

A fresh focused Windows build passed. With LunarG VK_LAYER_KHRONOS_validation 1.4.363.0 actually loaded (verified loader insertion and actual fixture physical-device lines), the 13-case matrix passed on both requested GPUs: 26 behavioral passes, 0 failures, 0 skips. Of these, 24 are GPU executions with zero validation errors and zero validation warnings; two are CPU selector executions. The new agc_driver_sampled_cache_budget_without_storage_image_multisample case and ordinary default case both passed cleanly on each GPU. The five pending-write cases retained all RGBA/source-word/guard/publication/retirement success oracles. Source, executable, PRX and layer hashes remained stable within each run.

The matrix covers default, memory, disabled storage-MSAA, three resource modes, actual-device selection, CPU selection, and #6937's five cases. These bounded initialization/cache tests do not establish every production shader's behavior with optional features disabled, a full-suite pass, Linux coverage, or a title unblock. No duplicate implementation or PR was created. Please retain coordination with #7570 around the common constructor/registration conflict before landing.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251897381 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6251897381). Originally posted by [Mustafa1p](https://github.com/Mustafa1p) on 2026-10-18T15:49:24Z. --- Independent Windows validation for #7569/#7573, coordinated with #7570 and #6937: I reproduced six `VUID-VkImageCreateInfo-usage-00968` diagnostics in the legacy default mode on **each actual GPU**: AMD Radeon(TM) Graphics (1002:13c0, Windows driver 32.0.21045.5002) and NVIDIA GeForce RTX 5090 (10de, Windows driver 32.0.16.1714), Windows 11 Pro 10.0.26300. Behavioral assertions passed despite those errors. The other selected GPU modes had no validation errors or warnings. I then composed your pinned head `5394684198bc90e65afab15bda4240e1fb4b6c46` onto local #6937/#7570 integration `b4782b8a9eb0dc3f31eb3e62039d40b88801a99b`, yielding `5fbe8b50449fb8adb422d54fdf27047d5ff37e98`. Only the CMake insertion conflict needed resolution: retain both the selector registrations and your disabled-feature registration. The common selector and #6937 guards remain intact. This is an unpublished local composition, not a test of your standalone head or latest main. A fresh focused Windows build passed. With LunarG **VK_LAYER_KHRONOS_validation 1.4.363.0 actually loaded** (verified loader insertion and actual fixture physical-device lines), the 13-case matrix passed on both requested GPUs: **26 behavioral passes, 0 failures, 0 skips**. Of these, 24 are GPU executions with **zero validation errors and zero validation warnings**; two are CPU selector executions. The new `agc_driver_sampled_cache_budget_without_storage_image_multisample` case and ordinary default case both passed cleanly on each GPU. The five pending-write cases retained all RGBA/source-word/guard/publication/retirement success oracles. Source, executable, PRX and layer hashes remained stable within each run. The matrix covers default, memory, disabled storage-MSAA, three resource modes, actual-device selection, CPU selection, and #6937's five cases. These bounded initialization/cache tests do not establish every production shader's behavior with optional features disabled, a full-suite pass, Linux coverage, or a title unblock. No duplicate implementation or PR was created. Please retain coordination with #7570 around the common constructor/registration conflict before landing. AI-assisted: yes.
jotitadev commented 2026-10-18 15:56:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-18T15:56:59Z.


Apple GPU / MoltenVK run with the Khronos validation layer. Unlike the AMD/NVIDIA runs above, here the feature is actually missing on the device rather than disabled by the fixture. That makes it matter outside the fixture too: MoltenVK reports shaderStorageImageMultisample = false and nullDescriptor = false, but its image format properties still allow 4 samples with storage usage. So the production VulkanDevice creates the multisampled storage placeholders without the feature as well.

Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head 539468419. Method: macos-port @ b7eb6b6b + ImportWatched + PR diff, not main. The port has no Context::storageImageMultisample, so I added the 4-line stand-in from main (field in Context and the device state, set from enabled.shaderStorageImageMultisample in VulkanDevice, copied into the graphics context). The fixture and CMake hunks were applied by hand (the port's fixture also has a __APPLE__ loader branch). Driver: MoltenVK 1.4.2 (Vulkan SDK 1.4.363), VK_LAYER_KHRONOS_validation 1.4.363, ANYPS5_NO_SHADER_CACHE=1.

VUID-VkImageCreateInfo-usage-00968 errors per run:

Run port + stand-in + this PR
agc_driver_sampled_cache_budget_tests resource-admission 6 0
... resource-oversized 6 0
... resource-clear 6 0
... without-storage-image-multisample n/a 0
production VulkanDevice (agc_driver_cross_workgroup_flag_tests, which only opens the device) 6 0
  • The port's default mode builds no placeholders (it predates #6492), so it shows 0 on both trees and doesn't cover the default-mode case from #7569.
  • All runs pass their assertions with or without the PlaceholderImages.cpp hunk. With only the fixture and CMake changes, the resource modes still pass and still log 6 errors each. So the new CTest mode doesn't catch a regression unless the validation layer is on.
  • Full ^agc suite with the PR (SDK driver, -j1 --timeout 30, flip/display/lds_atomics64 excluded): 14 failures out of 434, the same set as the unchanged port. agc_driver_cross_workgroup_flag is intermittent on this machine and also fails on the unchanged port.

On @Amoenus's point: I also ran the alternative, continue instead of substituting one sample, so the slot is left empty when the feature is off. On this device that variant also gives 0 errors in every run above. The full ^agc suite gives the same 14 failures, and no test hits the View refusal ("no placeholder image for typed image heap"). That fits the emitter: it refuses a multisampled storage image type without CapabilityStorageImageMultisample (SpirvDescriptors.cpp, same check on main). So in this suite nothing asked for that slot, and leaving it empty cost nothing even without nullDescriptor. This only covers what the port's suite exercises, not titles.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2)

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251974205 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6251974205). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-18T15:56:59Z. --- Apple GPU / MoltenVK run with the Khronos validation layer. Unlike the AMD/NVIDIA runs above, here the feature is actually missing on the device rather than disabled by the fixture. That makes it matter outside the fixture too: MoltenVK reports `shaderStorageImageMultisample = false` and `nullDescriptor = false`, but its image format properties still allow 4 samples with storage usage. So the production `VulkanDevice` creates the multisampled storage placeholders without the feature as well. Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head 539468419. Method: macos-port @ b7eb6b6b + ImportWatched + PR diff, not main. The port has no `Context::storageImageMultisample`, so I added the 4-line stand-in from main (field in `Context` and the device state, set from `enabled.shaderStorageImageMultisample` in `VulkanDevice`, copied into the graphics context). The fixture and CMake hunks were applied by hand (the port's fixture also has a `__APPLE__` loader branch). Driver: MoltenVK 1.4.2 (Vulkan SDK 1.4.363), `VK_LAYER_KHRONOS_validation` 1.4.363, `ANYPS5_NO_SHADER_CACHE=1`. `VUID-VkImageCreateInfo-usage-00968` errors per run: | Run | port + stand-in | + this PR | |---|---|---| | `agc_driver_sampled_cache_budget_tests resource-admission` | 6 | 0 | | `... resource-oversized` | 6 | 0 | | `... resource-clear` | 6 | 0 | | `... without-storage-image-multisample` | n/a | 0 | | production `VulkanDevice` (`agc_driver_cross_workgroup_flag_tests`, which only opens the device) | 6 | 0 | - The port's default mode builds no placeholders (it predates #6492), so it shows 0 on both trees and doesn't cover the default-mode case from #7569. - All runs pass their assertions with or without the `PlaceholderImages.cpp` hunk. With only the fixture and CMake changes, the resource modes still pass and still log 6 errors each. So the new CTest mode doesn't catch a regression unless the validation layer is on. - Full `^agc` suite with the PR (SDK driver, `-j1 --timeout 30`, flip/display/lds_atomics64 excluded): 14 failures out of 434, the same set as the unchanged port. `agc_driver_cross_workgroup_flag` is intermittent on this machine and also fails on the unchanged port. On @Amoenus's point: I also ran the alternative, `continue` instead of substituting one sample, so the slot is left empty when the feature is off. On this device that variant also gives 0 errors in every run above. The full `^agc` suite gives the same 14 failures, and no test hits the `View` refusal ("no placeholder image for typed image heap"). That fits the emitter: it refuses a multisampled storage image type without `CapabilityStorageImageMultisample` (`SpirvDescriptors.cpp`, same check on main). So in this suite nothing asked for that slot, and leaving it empty cost nothing even without `nullDescriptor`. This only covers what the port's suite exercises, not titles. GPUs tested: Apple M2 Max (MoltenVK 1.4.2) Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-18 16:02:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T16:02:44Z.


Follow-up: I pushed fd872264e to keep typed multisampled storage placeholders unavailable whenever shaderStorageImageMultisample is not enabled. The typed shape remains multisampled; the code no longer substitutes an incompatible single-sample image, and PlaceholderImages::View refuses an unavailable slot.

The placeholder-shape test now checks that disabled-feature storage-MSAA shapes are unavailable while sampled-MSAA and single-sample shapes retain their original sample count, view type and usage. The without-storage-image-multisample fixture also asserts that every typed multisampled storage heap refuses a placeholder.

Validation on this host: both modified C++ translation units pass syntax compilation, agc_placeholder_images_tests passes, git diff --check passes, and tools/check_conventions.py --base upstream/main passes. I compiled the updated Vulkan fixture and constructor together, but could not complete its runtime case: this Linux host's CPU guard stops execution because its Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. I am not claiming a local Vulkan runtime pass. The updated hosted checks are still running.

I manually checked the #7570 overlap: the shared path is the CMake test-registration area; this PR's placeholder feature behavior does not depend on #7570.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252031577 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6252031577). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T16:02:44Z. --- Follow-up: I pushed `fd872264e` to keep typed multisampled storage placeholders unavailable whenever `shaderStorageImageMultisample` is not enabled. The typed shape remains multisampled; the code no longer substitutes an incompatible single-sample image, and `PlaceholderImages::View` refuses an unavailable slot. The placeholder-shape test now checks that disabled-feature storage-MSAA shapes are unavailable while sampled-MSAA and single-sample shapes retain their original sample count, view type and usage. The `without-storage-image-multisample` fixture also asserts that every typed multisampled storage heap refuses a placeholder. Validation on this host: both modified C++ translation units pass syntax compilation, `agc_placeholder_images_tests` passes, `git diff --check` passes, and `tools/check_conventions.py --base upstream/main` passes. I compiled the updated Vulkan fixture and constructor together, but could not complete its runtime case: this Linux host's CPU guard stops execution because its Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. I am not claiming a local Vulkan runtime pass. The updated hosted checks are still running. I manually checked the #7570 overlap: the shared path is the CMake test-registration area; this PR's placeholder feature behavior does not depend on #7570.
MarcZX10 commented 2026-10-18 16:03:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T16:03:38Z.


Hosted check update for fd872264e: eligibility, conventions, and progress report passed; relinker, Linux, and Windows build jobs were skipped by the workflow. The PR is OPEN/CLEAN. Local Vulkan runtime remains unverified on this host because the CPU guard stops execution before the test.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252040718 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6252040718). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T16:03:38Z. --- Hosted check update for `fd872264e`: eligibility, conventions, and progress report passed; relinker, Linux, and Windows build jobs were skipped by the workflow. The PR is OPEN/CLEAN. Local Vulkan runtime remains unverified on this host because the CPU guard stops execution before the test.
MarcZX10 commented 2026-10-18 16:06:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T16:06:00Z.


Thanks for checking this on MoltenVK with the feature absent on the device. That confirms the same invariant beyond the AMD/NVIDIA fixture case: the typed multisampled storage image cannot be replaced with a 1-sample placeholder. The updated head now omits the placeholder when storage MSAA is unavailable and keeps the original shape when supported; I recorded the local CPU-only checks and the host CPU limitation above.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252065499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7573#issuecomment-6252065499). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T16:06:00Z. --- Thanks for checking this on MoltenVK with the feature absent on the device. That confirms the same invariant beyond the AMD/NVIDIA fixture case: the typed multisampled storage image cannot be replaced with a 1-sample placeholder. The updated head now omits the placeholder when storage MSAA is unavailable and keeps the original shape when supported; I recorded the local CPU-only checks and the host CPU limitation above.
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!7573
No description provided.