test(agc): enable the portability subset with its features in the recorder tests' device #13942

Merged
imellag merged 2 commits from upstream-pr/13942 into main 2026-11-06 11:40:15 +00:00
imellag commented 2026-10-31 13:18:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-31T13:18:13Z.


What

agc_driver_recorder_tests creates its own Vulkan device in tests/Recorder.cpp and never enables VK_KHR_portability_subset. The spec requires it whenever the physical device lists it (VUID-VkDeviceCreateInfo-pProperties-04451), and MoltenVK does. So with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on macOS, every registration of that executable that creates the device logs the error. That hides any real validation error in those tests, as on #8887, whose new agc_storage_flush_wait_mip_chain runs in this executable.

When the device lists the extension, the test now queries VkPhysicalDevicePortabilitySubsetFeaturesKHR, enables the extension, and chains the queried features into the device's pNext. Enabling the extension alone isn't enough: the layer then treats every portability feature as off, and the same 77 tests log 148 other errors (imageViewFormatReinterpretation-04466 134 times, imageView2DOn3DImage-04459 10, vertexAttributeAccessBeyondStride-04457 4). The struct is in Vulkan's beta header, so Recorder.cpp gets VK_ENABLE_BETA_EXTENSIONS, the way #11554 does it for VulkanDevice.cpp. On devices without the extension, which covers Linux and Windows drivers, nothing changes.

Tested

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. main doesn't build the driver on macOS on its own, so both sides use the support branch support/macos-boot-1030c (05bd71a66b): main 21a556f567 + the open macOS PRs. None of them touches this test.

With ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, the 77 registrations of agc_driver_recorder_tests:

  • Base: 76 of 77 pass, and the log has VUID-VkDeviceCreateInfo-pProperties-04451 150 times.
  • Extension enabled without its features: 76 of 77, and the 148 portability errors listed above.
  • This change: 76 of 77, no VUID- line.
  • The failing test is agc_recorder_failed_check on all three sides; it is outside this change.
  • The loader adds VK_LAYER_KHRONOS_validation from VK_INSTANCE_LAYERS in every log, and none has was not found but was requested by env var VK_INSTANCE_LAYERS.
  • Not run on Linux or Windows: there the device doesn't list the extension, so the new branch is skipped.

tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py reports one conflicting line, with #13931 (pipeline binaries): it adds its own feature structs at the same place before VkDeviceCreateInfo in Recorder.cpp, so whichever lands second keeps both blocks. It could not compare 58 PRs that conflict with main.

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: none
  • Unblocks: none
  • GPUs tested: Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097853163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13942). Originally posted by [imellag](https://github.com/imellag) on 2026-10-31T13:18:13Z. --- ### What `agc_driver_recorder_tests` creates its own Vulkan device in `tests/Recorder.cpp` and never enables `VK_KHR_portability_subset`. The spec requires it whenever the physical device lists it (`VUID-VkDeviceCreateInfo-pProperties-04451`), and MoltenVK does. So with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on macOS, every registration of that executable that creates the device logs the error. That hides any real validation error in those tests, as on #8887, whose new `agc_storage_flush_wait_mip_chain` runs in this executable. When the device lists the extension, the test now queries `VkPhysicalDevicePortabilitySubsetFeaturesKHR`, enables the extension, and chains the queried features into the device's `pNext`. Enabling the extension alone isn't enough: the layer then treats every portability feature as off, and the same 77 tests log 148 other errors (`imageViewFormatReinterpretation-04466` 134 times, `imageView2DOn3DImage-04459` 10, `vertexAttributeAccessBeyondStride-04457` 4). The struct is in Vulkan's beta header, so `Recorder.cpp` gets `VK_ENABLE_BETA_EXTENSIONS`, the way #11554 does it for `VulkanDevice.cpp`. On devices without the extension, which covers Linux and Windows drivers, nothing changes. ### Tested macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. `main` doesn't build the driver on macOS on its own, so both sides use the support branch [`support/macos-boot-1030c`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030c) (`05bd71a66b`): `main` `21a556f567` + the open macOS PRs. None of them touches this test. With `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, the 77 registrations of `agc_driver_recorder_tests`: - Base: 76 of 77 pass, and the log has `VUID-VkDeviceCreateInfo-pProperties-04451` 150 times. - Extension enabled without its features: 76 of 77, and the 148 portability errors listed above. - This change: 76 of 77, no `VUID-` line. - The failing test is `agc_recorder_failed_check` on all three sides; it is outside this change. - The loader adds `VK_LAYER_KHRONOS_validation` from `VK_INSTANCE_LAYERS` in every log, and none has `was not found but was requested by env var VK_INSTANCE_LAYERS`. - Not run on Linux or Windows: there the device doesn't list the extension, so the new branch is skipped. `tools/check_conventions.py --base upstream/main` passes. `tools/pr_overlap.py` reports one conflicting line, with #13931 (pipeline binaries): it adds its own feature structs at the same place before `VkDeviceCreateInfo` in `Recorder.cpp`, so whichever lands second keeps both blocks. It could not compare 58 PRs that conflict with `main`. ### 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: none - [x] Unblocks: none - [x] GPUs tested: Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 13:31:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T13:31:55Z.

Review: APPROVED


Reviewed — looks good

The exact-head change correctly enables the portability-subset extension and the feature set it advertises for the recorder-test device; the author reports that this removes the validation errors on MoltenVK.

What I ran

Head 6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e; base 73f4f7e06e4f210a8c6570e335fd654dc0a86134; merge preview was clean. Environment: Linux, Python 3.11.2, GCC 12.2.0.

git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e
python3 tools/check_conventions.py --base 73f4f7e06e4f210a8c6570e335fd654dc0a86134 --head 6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e --title "test(agc): enable the portability subset with its features in the recorder tests' device" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13942-6e03c6ba7e3a/pr-body.md
python3 tools/pr_stack_check.py 13942 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13942-6e03c6ba7e3a/stack

Results

Check Result
Diff whitespace Passed.
Conventions and PR template Passed.
Merge preview Clean against the stated base.
Hosted Windows and library-portability checks Passed.
Linux and specialized jobs Skipped by the workflow.
Local build or C++ tests Not run.
macOS/MoltenVK validation scenario Author-reported: 76/77 registrations passed on base, extension-only, and this change; the VUID count dropped from 150 to zero with this change. I did not independently run this scenario.
ABI and test-quality helper checks Not executable from the detached PR snapshot because the local helper scripts are absent; these checks do not indicate a code failure.
Unedited conventions-check output
All conventions checks passed.

Findings

Blocking

  • None found in the reviewed change.

Non-blocking

  • None.

Sources

Not verified

  • I did not independently reproduce the macOS/MoltenVK validation run, build AnyPS5 locally, or test on a physical console. Linux and specialized hosted jobs were skipped.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722910780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13942#pullrequestreview-5722910780). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T13:31:55Z. **Review:** APPROVED --- # Reviewed — looks good The exact-head change correctly enables the portability-subset extension and the feature set it advertises for the recorder-test device; the author reports that this removes the validation errors on MoltenVK. ## What I ran Head `6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e`; base `73f4f7e06e4f210a8c6570e335fd654dc0a86134`; merge preview was clean. Environment: Linux, Python 3.11.2, GCC 12.2.0. ```sh git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e python3 tools/check_conventions.py --base 73f4f7e06e4f210a8c6570e335fd654dc0a86134 --head 6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e --title "test(agc): enable the portability subset with its features in the recorder tests' device" --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13942-6e03c6ba7e3a/pr-body.md python3 tools/pr_stack_check.py 13942 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13942-6e03c6ba7e3a/stack ``` ## Results | Check | Result | |---|---| | Diff whitespace | Passed. | | Conventions and PR template | Passed. | | Merge preview | Clean against the stated base. | | Hosted Windows and library-portability checks | Passed. | | Linux and specialized jobs | Skipped by the workflow. | | Local build or C++ tests | Not run. | | macOS/MoltenVK validation scenario | Author-reported: 76/77 registrations passed on base, extension-only, and this change; the VUID count dropped from 150 to zero with this change. I did not independently run this scenario. | | ABI and test-quality helper checks | Not executable from the detached PR snapshot because the local helper scripts are absent; these checks do not indicate a code failure. | <details><summary>Unedited conventions-check output</summary> ```text All conventions checks passed. ``` </details> ## Findings ### Blocking - None found in the reviewed change. ### Non-blocking - None. ## Sources - The reviewed device-creation and feature-query change: [`Recorder.cpp` at head `6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e`](https://github.com/boykopovar/AnyPS5/blob/6e03c6ba7e3ad04c533db2fb1215997ecc5fa92e/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp). ## Not verified - I did not independently reproduce the macOS/MoltenVK validation run, build AnyPS5 locally, or test on a physical console. Linux and specialized hosted jobs were skipped.
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!13942
No description provided.