test(agc): enable VK_KHR_portability_subset once in the Recorder test device #21965

Merged
kurexw merged 1 commit from upstream-pr/21965 into main 2026-11-26 02:52:24 +00:00
kurexw commented 2026-11-16 23:35:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-16T23:35:46Z.


What

tests/Recorder.cpp built its test device by chaining VkPhysicalDevicePortabilitySubsetFeaturesKHR and adding VK_KHR_portability_subset by hand. A few lines later, the shared AgcDriver::Tests::PortabilitySubset::Enable helper chains the struct and adds the extension a second time. On a device that exposes VK_KHR_portability_subset (MoltenVK), the device create info therefore carried the struct twice. With the validation layer, every Recorder-binary test process logged VUID-VkDeviceCreateInfo-sType-unique twice. That error shows up in every macOS run of the AGENTS.md GPU procedure, which compares VUID- counts.

This removes the hand-written block and keeps the shared helper, which queries the features, chains them and enables the extension once. Nothing else in the file read portabilityFeatures. On devices without the extension, neither path did anything, so nothing changes there.

Tested

macOS 27.2 on an Apple M4 (MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1, x86-64 build under Rosetta).

  • Tests: all 126 tests that run agc_driver_recorder_tests, on main 459f4f8c22 and on this branch, three runs per side.
  • Environment: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer.
  • Layer check: 122 processes logged Insert instance layer "VK_LAYER_KHRONOS_validation" (layer 1.4.363) per run on both sides. None logged the missing-layer message.
main (3 runs) this branch (3 runs)
VUID- lines per run 242, all VUID-VkDeviceCreateInfo-sType-unique 0
Passed / failed 124 / 2 124 / 2, the same tests

The two failures are agc_driver_recorder ("a kept vertex window was not mirrored") and agc_small_tiled_shadow_label ("a label stored a small image inside a pending large tiled one instead of trapping its reads"). Both fail with the same message on main and are unrelated.

Not tested: Linux, Windows or other GPUs, where the extension is absent and the removed code didn't run.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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, MoltenVK 1.4.2 (LunarG Vulkan SDK 1.4.363.1), macOS 27.2
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5347221357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21965). Originally posted by [kurexw](https://github.com/kurexw) on 2026-11-16T23:35:46Z. --- ### What `tests/Recorder.cpp` built its test device by chaining `VkPhysicalDevicePortabilitySubsetFeaturesKHR` and adding `VK_KHR_portability_subset` by hand. A few lines later, the shared `AgcDriver::Tests::PortabilitySubset::Enable` helper chains the struct and adds the extension a second time. On a device that exposes `VK_KHR_portability_subset` (MoltenVK), the device create info therefore carried the struct twice. With the validation layer, every Recorder-binary test process logged `VUID-VkDeviceCreateInfo-sType-unique` twice. That error shows up in every macOS run of the AGENTS.md GPU procedure, which compares `VUID-` counts. This removes the hand-written block and keeps the shared helper, which queries the features, chains them and enables the extension once. Nothing else in the file read `portabilityFeatures`. On devices without the extension, neither path did anything, so nothing changes there. ### Tested macOS 27.2 on an Apple M4 (MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1, x86-64 build under Rosetta). - **Tests:** all 126 tests that run `agc_driver_recorder_tests`, on `main` 459f4f8c22 and on this branch, three runs per side. - **Environment:** `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `VK_LOADER_DEBUG=layer`. - **Layer check:** 122 processes logged `Insert instance layer "VK_LAYER_KHRONOS_validation"` (layer 1.4.363) per run on both sides. None logged the missing-layer message. | | main (3 runs) | this branch (3 runs) | | --- | --- | --- | | `VUID-` lines per run | 242, all `VUID-VkDeviceCreateInfo-sType-unique` | 0 | | Passed / failed | 124 / 2 | 124 / 2, the same tests | The two failures are `agc_driver_recorder` ("a kept vertex window was not mirrored") and `agc_small_tiled_shadow_label` ("a label stored a small image inside a pending large tiled one instead of trapping its reads"). Both fail with the same message on `main` and are unrelated. Not tested: Linux, Windows or other GPUs, where the extension is absent and the removed code didn't run. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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, MoltenVK 1.4.2 (LunarG Vulkan SDK 1.4.363.1), macOS 27.2 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-18 02:42:18 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the optional note below is informational.

What I ran

Reviewed head fa529d485ed6211067f2adfc4b6bfed26a436f6a. I read the prepared description, commit summary, manifest and diff, then used repo_read.py to inspect the changed code’s surrounding context and the shared portability helper. I did not run tests or other commands.

Results

Check Result Note
Diff and relevant code passed The duplicate setup is removed; the shared helper remains.
Tests not run Test results in the description are author-reported.

Findings

Blocking

None.

Non-blocking

The description reports macOS/MoltenVK results and notes that other platforms and GPUs were not tested. No additional issue was verified in the inspected code.

Sources

Not verified

I read the changed hunk and surrounding Recorder.cpp code (lines 560–665), not the entire 17,858-line file. The manifest lists only that changed file; its full text was excluded from the review folder as too large. I also read the full shared PortabilitySubset.hpp helper and selected call-site context in BdaDevice.cpp and PerformanceOverlay.cpp. I did not independently verify the author-reported test runs, other changed-file behavior, other platforms or GPUs, or physical-console behavior.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5950046605 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21965#pullrequestreview-5950046605). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T02:42:18Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the optional note below is informational. ## What I ran Reviewed head `fa529d485ed6211067f2adfc4b6bfed26a436f6a`. I read the prepared description, commit summary, manifest and diff, then used `repo_read.py` to inspect the changed code’s surrounding context and the shared portability helper. I did not run tests or other commands. ## Results | Check | Result | Note | | --- | --- | --- | | Diff and relevant code | passed | The duplicate setup is removed; the shared helper remains. | | Tests | not run | Test results in the description are author-reported. | ## Findings ### Blocking None. ### Non-blocking The description reports macOS/MoltenVK results and notes that other platforms and GPUs were not tested. No additional issue was verified in the inspected code. ## Sources - [Recorder.cpp at the reviewed commit](https://github.com/boykopovar/AnyPS5/blob/fa529d485ed6211067f2adfc4b6bfed26a436f6a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp) - [Shared PortabilitySubset helper at the reviewed commit](https://github.com/boykopovar/AnyPS5/blob/fa529d485ed6211067f2adfc4b6bfed26a436f6a/core/libs/prx/libSceAgcDriver/tests/PortabilitySubset.hpp) ## Not verified I read the changed hunk and surrounding `Recorder.cpp` code (lines 560–665), not the entire 17,858-line file. The manifest lists only that changed file; its full text was excluded from the review folder as too large. I also read the full shared `PortabilitySubset.hpp` helper and selected call-site context in `BdaDevice.cpp` and `PerformanceOverlay.cpp`. I did not independently verify the author-reported test runs, other changed-file behavior, other platforms or GPUs, or physical-console behavior. ## To get this to a good state Nothing is required.
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!21965
No description provided.