test(agc): enable VK_KHR_portability_subset in the tests that create their own device #10920

Merged
maximilianfv merged 2 commits from upstream-pr/10920 into main 2026-11-12 19:35:48 +00:00
maximilianfv commented 2026-10-25 10:06:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by maximilianfv on 2026-10-25T10:06:10Z.


What

Thirteen AGC tests create their own Vulkan device with vkCreateDevice: BdaDevice.cpp, PerformanceOverlay.cpp, PresentationPass.cpp, Recorder.cpp and, under tests/execution/, DepthPlaneGuestLayers.cpp, DepthStorage.cpp, DepthSurfaceLastWriter.cpp, NativeMultisampleDepth.cpp, OversizedDescriptorSets.cpp, PartiallyResidentSnapshot.cpp, PooledBufferRange.cpp, SampledCacheBudget.cpp and SparseBufferHoles.cpp. None of them enables VK_KHR_portability_subset, which the spec requires whenever the physical device advertises it, so on MoltenVK each of these devices logs VUID-VkDeviceCreateInfo-pProperties-04451. Four of them (BdaDevice.cpp, Recorder.cpp, OversizedDescriptorSets.cpp, SampledCacheBudget.cpp) do not yet request portability enumeration at instance creation on main, so there the loader does not show them MoltenVK and the helper does nothing until they do; mugurc's macOS series adds that instance flag.

Enabling the extension alone is not enough: every subset feature then counts as off, so VkPhysicalDevicePortabilitySubsetFeaturesKHR with the values the device reports must be chained into VkDeviceCreateInfo as well.

A new test header, tests/PortabilitySubset.hpp, enumerates the device extensions. When the subset is advertised, it adds the extension, queries the subset features with vkGetPhysicalDeviceFeatures2 (all thirteen instances are Vulkan 1.1) and chains them into VkDeviceCreateInfo. In every case it sets the extension count and names from the test's extension vector. On a device without the subset it only does that. The subset struct and its sType are guarded by VK_ENABLE_BETA_EXTENSIONS in the Vulkan headers, so the CMake change defines it for these thirteen sources only. In DepthPlaneGuestLayers.cpp and PartiallyResidentSnapshot.cpp, the const std::array extension list became a std::vector so the helper can append to it. In PerformanceOverlay.cpp the optional memory-budget extension is now pushed into a vector instead of being passed through a pointer. The tests that enabled no extensions now pass an empty vector.

VulkanDevice.cpp is not touched. On main it does not enable the subset. mugurc's macOS series enables it there without chaining the features (20ee39de9a, "feat(agc): create the Vulkan device on MoltenVK"), and that part is left to the series.

Prior work and credit:

No code was ported from any of these.

Tested

Apple M1 Pro, macOS 27.0.1, x86_64 build under Rosetta 2, Vulkan through MoltenVK from the LunarG Vulkan SDK 1.4.363. main alone does not build on macOS, so the tree is mugurc's macOS series (ci/macos-series-2, 27e968974) merged with main at 2742004ed2, plus other open macOS fixes. Only this change was toggled. Both runs used ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and ctest -V on the 103 tests that these thirteen binaries run.

passed skipped failed Validation Error lines pProperties-04451 imageViewFormatSwizzle-04465
without this change 99 1 3 99 95 4
with this change 99 1 3 4 0 4

The skipped test is agc_driver_oversized_descriptor_sets (the device binds fewer than 4097 storage buffers per stage or set). It still creates the changed device before it skips, and its 04451 is gone with the change.

  • The same three tests fail in both runs, for reasons unrelated to this change:
    • agc_performance_overlay: the process's private memory can't be read on macOS (open #9971).
    • agc_driver_pooled_buffer_range: a MoltenVK robust-access difference.
    • agc_driver_recover_srgb_allocation.
  • The four 04465 errors come from the same four tests in both runs: agc_driver_native_multisample_depth, agc_driver_native_depth_retirement, agc_driver_native_depth_clears and agc_driver_native_depth_clear_refusals. Without this change no test device enables the subset, so these errors come from the driver's own device in the macOS series, not from the devices this PR changes.
  • No was not found but was requested by env var VK_INSTANCE_LAYERS line appears in either log, and the change adds no new VUID-.

I could not run the same tests on main because main does not build on macOS. Linux and Windows were not tested. Native drivers there don't advertise the portability subset, so the change only rebuilds the extension list; a device that does advertise it gets the same handling as MoltenVK.

uv run tools/check_conventions.py --base origin/main passes.

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 M1 Pro, MoltenVK (LunarG Vulkan SDK 1.4.363), macOS 27.0.1
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5003764016 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920). Originally posted by [maximilianfv](https://github.com/maximilianfv) on 2026-10-25T10:06:10Z. --- ### What Thirteen AGC tests create their own Vulkan device with `vkCreateDevice`: `BdaDevice.cpp`, `PerformanceOverlay.cpp`, `PresentationPass.cpp`, `Recorder.cpp` and, under `tests/execution/`, `DepthPlaneGuestLayers.cpp`, `DepthStorage.cpp`, `DepthSurfaceLastWriter.cpp`, `NativeMultisampleDepth.cpp`, `OversizedDescriptorSets.cpp`, `PartiallyResidentSnapshot.cpp`, `PooledBufferRange.cpp`, `SampledCacheBudget.cpp` and `SparseBufferHoles.cpp`. None of them enables `VK_KHR_portability_subset`, which the spec requires whenever the physical device advertises it, so on MoltenVK each of these devices logs `VUID-VkDeviceCreateInfo-pProperties-04451`. Four of them (`BdaDevice.cpp`, `Recorder.cpp`, `OversizedDescriptorSets.cpp`, `SampledCacheBudget.cpp`) do not yet request portability enumeration at instance creation on `main`, so there the loader does not show them MoltenVK and the helper does nothing until they do; mugurc's macOS series adds that instance flag. Enabling the extension alone is not enough: every subset feature then counts as off, so `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the values the device reports must be chained into `VkDeviceCreateInfo` as well. A new test header, `tests/PortabilitySubset.hpp`, enumerates the device extensions. When the subset is advertised, it adds the extension, queries the subset features with `vkGetPhysicalDeviceFeatures2` (all thirteen instances are Vulkan 1.1) and chains them into `VkDeviceCreateInfo`. In every case it sets the extension count and names from the test's extension vector. On a device without the subset it only does that. The subset struct and its `sType` are guarded by `VK_ENABLE_BETA_EXTENSIONS` in the Vulkan headers, so the CMake change defines it for these thirteen sources only. In `DepthPlaneGuestLayers.cpp` and `PartiallyResidentSnapshot.cpp`, the `const std::array` extension list became a `std::vector` so the helper can append to it. In `PerformanceOverlay.cpp` the optional memory-budget extension is now pushed into a vector instead of being passed through a pointer. The tests that enabled no extensions now pass an empty vector. `VulkanDevice.cpp` is not touched. On `main` it does not enable the subset. mugurc's macOS series enables it there without chaining the features (20ee39de9a, "feat(agc): create the Vulkan device on MoltenVK"), and that part is left to the series. Prior work and credit: - On #7886, tkcm01 (2026-10-23) reported that the nine fixtures it touches log 04451 because they never enable the subset, and suggested enabling it where the device lists it: https://github.com/boykopovar/AnyPS5/pull/7886#issuecomment-6355437374 - jotitadev (2026-10-23) then tried enabling it in those nine fixtures. That produced `imageViewFormatSwizzle-04465` and `imageViewFormatReinterpretation-04466` instead, and chaining the queried features cleared them in the two fixtures tried. He noted that this needs `VK_ENABLE_BETA_EXTENSIONS` and left it out of #7886, which used instance-level portability enumeration for the same nine fixtures and is the precedent for handling portability in each test: https://github.com/boykopovar/AnyPS5/pull/7886#issuecomment-6356775389 - @Gonic0 (2026-10-24) traced the 04451 errors to these thirteen test devices. A probe table on an M5 Pro showed that enabling the extension without the features yields `VUID-VkSamplerCreateInfo-samplerMipLodBias-04467`, and that with the features chained neither error appears. He offered the tests part to whoever takes it: https://github.com/boykopovar/AnyPS5/pull/10540#issuecomment-6388121653 . I took it here: https://github.com/boykopovar/AnyPS5/pull/10540#issuecomment-6395961829 - #7201 (marion909) enables the subset in `VulkanDevice.cpp` only, also without chaining the features. It changes other tests, but not the device creation in these thirteen. No code was ported from any of these. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Apple M1 Pro, macOS 27.0.1, x86_64 build under Rosetta 2, Vulkan through MoltenVK from the LunarG Vulkan SDK 1.4.363. `main` alone does not build on macOS, so the tree is mugurc's macOS series (`ci/macos-series-2`, 27e968974) merged with `main` at 2742004ed2, plus other open macOS fixes. Only this change was toggled. Both runs used `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `ctest -V` on the 103 tests that these thirteen binaries run. | | passed | skipped | failed | `Validation Error` lines | `pProperties-04451` | `imageViewFormatSwizzle-04465` | |---|---|---|---|---|---|---| | without this change | 99 | 1 | 3 | 99 | 95 | 4 | | with this change | 99 | 1 | 3 | 4 | 0 | 4 | The skipped test is `agc_driver_oversized_descriptor_sets` (the device binds fewer than 4097 storage buffers per stage or set). It still creates the changed device before it skips, and its 04451 is gone with the change. - The same three tests fail in both runs, for reasons unrelated to this change: - `agc_performance_overlay`: the process's private memory can't be read on macOS (open #9971). - `agc_driver_pooled_buffer_range`: a MoltenVK robust-access difference. - `agc_driver_recover_srgb_allocation`. - The four `04465` errors come from the same four tests in both runs: `agc_driver_native_multisample_depth`, `agc_driver_native_depth_retirement`, `agc_driver_native_depth_clears` and `agc_driver_native_depth_clear_refusals`. Without this change no test device enables the subset, so these errors come from the driver's own device in the macOS series, not from the devices this PR changes. - No `was not found but was requested by env var VK_INSTANCE_LAYERS` line appears in either log, and the change adds no new `VUID-`. I could not run the same tests on `main` because `main` does not build on macOS. Linux and Windows were not tested. Native drivers there don't advertise the portability subset, so the change only rebuilds the extension list; a device that does advertise it gets the same handling as MoltenVK. `uv run tools/check_conventions.py --base origin/main` passes. ### 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: Apple M1 Pro, MoltenVK (LunarG Vulkan SDK 1.4.363), macOS 27.0.1 <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-25 10:11:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T10:11:37Z.

Review: COMMENTED


I reviewed the changed device-creation paths and ran the repository convention check and diff whitespace validation. One macOS device-enumeration gap is described in the review comment below; I am holding approval until it is addressed or explained.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642688352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920#pullrequestreview-5642688352). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T10:11:37Z. **Review:** COMMENTED --- I reviewed the changed device-creation paths and ran the repository convention check and diff whitespace validation. One macOS device-enumeration gap is described in the review comment below; I am holding approval until it is addressed or explained.
MarcZX10 commented 2026-10-25 10:19:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T10:19:10Z.

Review: COMMENTED


I reviewed the exact head e04a7ecf48b09d18278073319e67770c64486f58 and the portability-subset feature-chain change. The changed fixtures add VkPhysicalDevicePortabilitySubsetFeaturesKHR to the device-create pNext chain before vkCreateDevice; PortabilitySubset::Enable checks the extension and supported feature bits before adding the extension to the create info. I initially flagged NativeMultisampleDepth.cpp, then verified its macOS instance portability-enumeration extension and flag already exist on main and withdrew that point. git diff --check and python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10920 pass. The available hosted eligibility, conventions, intake, labels, and report checks pass; product test jobs are skipped by path filters, so I am not claiming a runtime test from CI. I found no remaining blocking issue in this focused review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642713321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920#pullrequestreview-5642713321). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T10:19:10Z. **Review:** COMMENTED --- I reviewed the exact head `e04a7ecf48b09d18278073319e67770c64486f58` and the portability-subset feature-chain change. The changed fixtures add `VkPhysicalDevicePortabilitySubsetFeaturesKHR` to the device-create `pNext` chain before `vkCreateDevice`; `PortabilitySubset::Enable` checks the extension and supported feature bits before adding the extension to the create info. I initially flagged `NativeMultisampleDepth.cpp`, then verified its macOS instance portability-enumeration extension and flag already exist on `main` and withdrew that point. `git diff --check` and `python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10920` pass. The available hosted eligibility, conventions, intake, labels, and report checks pass; product test jobs are skipped by path filters, so I am not claiming a runtime test from CI. I found no remaining blocking issue in this focused review.
MarcZX10 commented 2026-10-25 10:33:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T10:33:00Z.

Review: COMMENTED


I rechecked exact head e04a7ecf48b09d18278073319e67770c64486f58 after your reply. The existing NativeMultisampleDepth.cpp setup already enables the instance portability-enumeration flag and extension; your correction is accurate, and my earlier comment on that file was mistaken.

I also reran git diff --check upstream/main...upstream/pr-10920 and python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10920; both pass. The focused test change is still awaiting a runnable Vulkan-host validation on a portability-subset device. The added helper appends the reported extension and queries/enables its feature struct; most call sites chain that struct ahead of the previous feature chain. In Recorder.cpp, however, the preexisting feature chain includes BDA/8-bit-storage and optionally dynamic-rendering, GPL, descriptor-indexing and robustness2 structs. Please confirm on an advertised-subset device that the final chain retains all of those entries and the selected feature values, since Enable() inserts the portability struct by rewriting its own pNext and device.pNext.

No product suite was run locally here. Hosted build/product paths are skipped for this test-only change, so I am leaving this as a comment pending that portability-device validation rather than approving from the policy checks alone.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642756671 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920#pullrequestreview-5642756671). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T10:33:00Z. **Review:** COMMENTED --- I rechecked exact head `e04a7ecf48b09d18278073319e67770c64486f58` after your reply. The existing `NativeMultisampleDepth.cpp` setup already enables the instance portability-enumeration flag and extension; your correction is accurate, and my earlier comment on that file was mistaken. I also reran `git diff --check upstream/main...upstream/pr-10920` and `python3 tools/check_conventions.py --base upstream/main --head upstream/pr-10920`; both pass. The focused test change is still awaiting a runnable Vulkan-host validation on a portability-subset device. The added helper appends the reported extension and queries/enables its feature struct; most call sites chain that struct ahead of the previous feature chain. In `Recorder.cpp`, however, the preexisting feature chain includes BDA/8-bit-storage and optionally dynamic-rendering, GPL, descriptor-indexing and robustness2 structs. Please confirm on an advertised-subset device that the final chain retains all of those entries and the selected feature values, since `Enable()` inserts the portability struct by rewriting its own `pNext` and `device.pNext`. No product suite was run locally here. Hosted build/product paths are skipped for this test-only change, so I am leaving this as a comment pending that portability-device validation rather than approving from the policy checks alone.
MarcZX10 commented 2026-10-25 10:38:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T10:38:00Z.

Review: APPROVED


Reviewed exact head e04a7ecf48b09d18278073319e67770c64486f58. The portability-subset helper preserves the existing pNext chain and enables the extension only when advertised. The author's M1 Pro/MoltenVK validation compares all 103 tests run by the affected binaries with and without the change; the recorder's 69 tests drop from 64 portability VUIDs to zero, with no new VUIDs. My earlier NativeMultisampleDepth setup concern was incorrect because the unchanged base already enables instance portability enumeration. git diff --check and check_conventions.py pass. Product CI jobs are skipped by path filters; the GPU validation above is author-reported, not independently rerun here.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5642770586 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920#pullrequestreview-5642770586). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T10:38:00Z. **Review:** APPROVED --- Reviewed exact head `e04a7ecf48b09d18278073319e67770c64486f58`. The portability-subset helper preserves the existing `pNext` chain and enables the extension only when advertised. The author's M1 Pro/MoltenVK validation compares all 103 tests run by the affected binaries with and without the change; the recorder's 69 tests drop from 64 portability VUIDs to zero, with no new VUIDs. My earlier NativeMultisampleDepth setup concern was incorrect because the unchanged base already enables instance portability enumeration. `git diff --check` and `check_conventions.py` pass. Product CI jobs are skipped by path filters; the GPU validation above is author-reported, not independently rerun here.
jotitadev commented 2026-10-27 03:18:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T03:18:39Z.

Review: COMMENTED


Build report on Apple silicon at head e04a7ecf48: on current main the nine tests/execution/ sources this PR changes no longer compile, because of the shared precompiled header that #10164 added after this branch's last push.

Machine: Apple M2 Max, macOS 27.2, Apple clang 21 (Xcode 27), x86_64 Release under Rosetta 2, Ninja, BUILD_TESTING=ON.
Tree: main 27ad7244d2 with the open macOS build PRs merged on top (#10366, #7631, #10659, #10660, #11249, #11358, #11047, #11048, #10669, #9263, #8477, #10876, #10552, #7804, #10540, #10676, #11447, #11437, #11554, #11119, #11049), plus this PR, which merges cleanly. That isn't plain main, but main alone doesn't build libkernel on macOS, and none of those PRs touches the execution tests or the PCH.

All nine changed execution tests fail the same way (DepthPlaneGuestLayers, DepthStorage, DepthSurfaceLastWriter, NativeMultisampleDepth, OversizedDescriptorSets, PartiallyResidentSnapshot, PooledBufferRange, SampledCacheBudget, SparseBufferHoles):

tests/execution/../PortabilitySubset.hpp:14:5: error: unknown type name 'VkPhysicalDevicePortabilitySubsetFeaturesKHR'
tests/execution/../PortabilitySubset.hpp:14:59: error: use of undeclared identifier 'VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR'
tests/execution/../PortabilitySubset.hpp:23:92: error: use of undeclared identifier 'VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME'

The compile line does have -DVK_ENABLE_BETA_EXTENSIONS. Since 3fe7aaf3b4, though, every execution test reuses one PCH (REUSE_FROM the first execution target), and that PCH includes VulkanTestDevice.hpp, so <vulkan/vulkan.h>, without the define. By the time the source is compiled, the Vulkan headers have already been included without the beta part, and their include guards keep it out. Clang uses the PCH and doesn't warn that the macro differs. I haven't checked how GCC handles it.

Including <vulkan/vulkan_beta.h> in PortabilitySubset.hpp isn't enough: it supplies the struct and the extension name, but the VkStructureType value is in vulkan_core.h under the same define. What did work: defining it for every execution test, so the shared PCH is built with it too. I added it in the foreach loop that creates the execution tests (the per-source property can then drop the nine execution sources):

    target_compile_definitions(${agcExecutionTest} PRIVATE VK_ENABLE_BETA_EXTENSIONS)

With that, the nine sources and the whole tree build again; the only remaining failures are two core/libs/tests objects that this PR doesn't touch. The four non-execution sources (BdaDevice.cpp, PerformanceOverlay.cpp, PresentationPass.cpp, Recorder.cpp) don't use the shared PCH, so their per-source property still works.

I haven't run the changed tests on the GPU in this tree yet.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5661833358 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10920#pullrequestreview-5661833358). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T03:18:39Z. **Review:** COMMENTED --- Build report on Apple silicon at head `e04a7ecf48`: on current `main` the nine `tests/execution/` sources this PR changes no longer compile, because of the shared precompiled header that #10164 added after this branch's last push. **Machine:** Apple M2 Max, macOS 27.2, Apple clang 21 (Xcode 27), x86_64 Release under Rosetta 2, Ninja, `BUILD_TESTING=ON`. **Tree:** `main` `27ad7244d2` with the open macOS build PRs merged on top (#10366, #7631, #10659, #10660, #11249, #11358, #11047, #11048, #10669, #9263, #8477, #10876, #10552, #7804, #10540, #10676, #11447, #11437, #11554, #11119, #11049), plus this PR, which merges cleanly. That isn't plain `main`, but `main` alone doesn't build libkernel on macOS, and none of those PRs touches the execution tests or the PCH. All nine changed execution tests fail the same way (`DepthPlaneGuestLayers`, `DepthStorage`, `DepthSurfaceLastWriter`, `NativeMultisampleDepth`, `OversizedDescriptorSets`, `PartiallyResidentSnapshot`, `PooledBufferRange`, `SampledCacheBudget`, `SparseBufferHoles`): ``` tests/execution/../PortabilitySubset.hpp:14:5: error: unknown type name 'VkPhysicalDevicePortabilitySubsetFeaturesKHR' tests/execution/../PortabilitySubset.hpp:14:59: error: use of undeclared identifier 'VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR' tests/execution/../PortabilitySubset.hpp:23:92: error: use of undeclared identifier 'VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME' ``` The compile line does have `-DVK_ENABLE_BETA_EXTENSIONS`. Since `3fe7aaf3b4`, though, every execution test reuses one PCH (`REUSE_FROM` the first execution target), and that PCH includes `VulkanTestDevice.hpp`, so `<vulkan/vulkan.h>`, without the define. By the time the source is compiled, the Vulkan headers have already been included without the beta part, and their include guards keep it out. Clang uses the PCH and doesn't warn that the macro differs. I haven't checked how GCC handles it. Including `<vulkan/vulkan_beta.h>` in `PortabilitySubset.hpp` isn't enough: it supplies the struct and the extension name, but the `VkStructureType` value is in `vulkan_core.h` under the same define. What did work: defining it for every execution test, so the shared PCH is built with it too. I added it in the foreach loop that creates the execution tests (the per-source property can then drop the nine execution sources): ```cmake target_compile_definitions(${agcExecutionTest} PRIVATE VK_ENABLE_BETA_EXTENSIONS) ``` With that, the nine sources and the whole tree build again; the only remaining failures are two `core/libs/tests` objects that this PR doesn't touch. The four non-execution sources (`BdaDevice.cpp`, `PerformanceOverlay.cpp`, `PresentationPass.cpp`, `Recorder.cpp`) don't use the shared PCH, so their per-source property still works. I haven't run the changed tests on the GPU in this tree yet. Written with AI assistance (Claude Code). I ran the builds and tests above on my 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!10920
No description provided.