test(agc): support draw profiling in the graphics fixture #11566

Merged
B-Howell merged 4 commits from upstream-pr/11566 into main 2026-11-05 11:04:13 +00:00
B-Howell commented 2026-10-26 20:31:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-10-26T20:31:19Z.


What

Extend the mocked Vulkan timestamp-query lifecycle in the AGC graphics test fixture and register agc_graphics_profile_draw so the fixture exercises draw profiling.

Tested

Current-main integration verification: merge commit c6cbfa693601609cb2209fda8b1b5b1fc65c56d4 (tree 5e019e0213794591df8d0e2869aaf7dfd5087796) preserves published ancestry and merges frozen origin/main fdd1753204a4732e1011539cc9d3bb69f70b27a6. The contribution against that main remains only the two test-related files, with 45 additions and 2 deletions. Candidate and baseline production source both use that exact main commit and recursive submodule pins. For a fair paired fixture check, the baseline received a byte-identical test-only overlay of the same two files (SHA-256 values recorded); this does not create a production-code difference or a negative-control result.

Both focused Release builds passed with WinLibs GCC 15.2.0, the same Release/testing options and FFmpeg dependency pin. The baseline and candidate each built agc_driver_graphics_tests and agc_driver_recorder_tests with parallelism 2; no install-rule skip was used.

  • Candidate: agc_driver_graphics passes 1/1 (8.712s) and agc_graphics_profile_draw passes 1/1 (8.781s). These run the enlarged graphics fixture with mocked Vulkan, respectively without and with APS5_PROFILE_DRAW=1; they exercise query-pool lifecycle and profiling plumbing.
  • Pinned-main fixture overlay: the same agc_driver_graphics passes 1/1 (9.496s) and agc_graphics_profile_draw passes 1/1 (9.401s). This is a paired fixture compatibility check on main production source with the test-only overlay, not evidence that unmodified main registers the profile test.
  • Real-device recorder checks pass 2/2 on each arm: agc_gpu_timing_complete and agc_gpu_timing_incomplete. All six invocations ran serially under one exclusive GPU-lock acquisition; no test was skipped, and every individual test ran under 30 seconds.
  • Both real recorder arms selected the same NVIDIA GeForce RTX 4080 SUPER, driver 617.42, PCI bus 0000:01:00.0, on Windows 11 Pro 10.0.26300. They used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, the same pinned local validation-layer package and verbose CTest. Each real recorder arm shows two Khronos instance insertions and two device insertions; neither log has a VUID- message or the requested-layer-missing diagnostic.
  • The two arms show the same loader-warning categories: four notices that VK_INSTANCE_LAYERS adds Khronos validation and two informational lookups where the installed AMD implicit layer lacks vkGetDeviceProcAddr. Mock fixture runs are not used as evidence of real Vulkan layer insertion.
  • Exact source, recursive submodule pins, executables/runtime libraries/shader archives/dependency hashes, registration counts, full logs and JUnit XML were checked and retained in the private qualification receipt. This verifies only the focused fixture and recorder cases; it makes no title, performance, full-suite, combined-other-PR, hosted-CI or upstream-landing claim. Existing approvals remain attributed to their recorded published heads.

Historical published-head b1d/319621 qualification (retained verbatim):

Current-main integration verification: commit b1d83958a3e225477f61fc2ac812a6eb71923398 (verified source tree bdfba15fe64927bf7c3ea8c35a062c166f9f8509), preserving published ancestry and merging pinned main 319621ba2e578bd053b0baba2877fe70520e0737. Both focused Release builds passed with WinLibs GCC 15.2.0, using the same compiler, Release/testing options and FFmpeg dependency pin. The contribution against that main remains only the two test-related files, with 45 additions and 2 deletions.

  • Candidate: agc_driver_graphics and agc_graphics_profile_draw each pass 1/1. These run the full enlarged graphics fixture with mocked Vulkan, respectively without and with APS5_PROFILE_DRAW=1; they verify mock query lifecycle and profiling plumbing. Separately, real-device agc_gpu_timing_complete and agc_gpu_timing_incomplete pass 2/2.
  • Pinned main: default agc_driver_graphics passes 1/1, and the two real-device recorder timing checks pass 2/2. Running main's default graphics fixture with APS5_PROFILE_DRAW=1 fails with the exact control diagnostic AGC graphics: missing Vulkan function: vkCreateQueryPool (CTest exit 8). Main has no agc_graphics_profile_draw registration; the control selects agc_driver_graphics explicitly.
  • All six CTest invocations ran serially on the same machine under one exclusive GPU-lock acquisition; both real-device recorder arms selected the same RTX 4080 SUPER, using ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, the same local validation-layer package and verbose CTest. Each real recorder arm proves two actual Khronos instance insertions and two device insertions, with zero VUID- messages, no missing requested validation layer and zero skips. The mock fixture runs do not establish actual validation-layer insertion. Both recorder arms retain the same four environment-layer warnings and two implicit AMD-layer vkGetDeviceProcAddr lookup diagnostics.
  • Exact source, EXE/runtime-library/shader-archive/dependency hashes, registration counts and complete logs/XML were retained and checked before/after collection. This qualification applies to the pinned main and source tree above. It establishes focused fixture behavior, with no title, performance, full-suite, combined-other-PR, hosted-CI or upstream-landing claim; existing approvals remain attributed to their recorded published heads.

Earlier published-head evidence (historical pins and qualifications retained):

Windows 11 Pro 10.0.26300; MSYS2 UCRT64 GCC; NVIDIA GeForce RTX 4080 SUPER, driver 617.42. The retained baseline receipt is b9c30ee505; its build and both GPU timing tests passed. Final candidate 1e38ada86f is based on main da1d222d52. The only intervening AGC-file change is PCH wiring for execution-test targets, outside these focused graphics/recorder targets, so the baseline was not rebuilt. Baseline agc_driver_graphics passed; with APS5_PROFILE_DRAW=1, it failed as expected on missing mock vkCreateQueryPool. On the candidate, agc_graphics_profile_draw, agc_driver_graphics, agc_gpu_timing_complete, and agc_gpu_timing_incomplete passed. The Vulkan validation layer loaded from VkLayer_khronos_validation.dll; validation reported 0 VUIDs and no requested-layer-missing warning. Builds used CMake's CMAKE_SKIP_INSTALL_RULES=ON to skip unused install/export generation without changing compile, runtime, ABI, or unwind settings. Mock timestamps verify query lifecycle and profiling plumbing only; they are not real GPU performance evidence.

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: NVIDIA GeForce RTX 4080 SUPER, driver 617.42, Windows 11 Pro 10.0.26300
  • AI-assisted: yes

2026-10-31 test-registration split follow-through

Candidate 9d7892e7f91aca9a29790f401bd7638e77e9d01f (tree 27573dbc13fa89a250bee1c2690baa9d753e7a1a) is an ordinary merge of published c6cbfa693601609cb2209fda8b1b5b1fc65c56d4 with frozen main 613f9b8edf056318b14ff96fe3aceda59a419323, which contains the landed #12862 registration split. The only resolution moves this PR's profile-test registration and properties into tests/cmake/agc_driver_graphics_tests.cmake; the mock timestamp source is retained. Against that main, the contribution remains two test-related files, 45 additions and 2 deletions. This is a frozen-main qualification, not a claim that the remote tip cannot advance.

Windows Release/Ninja with WinLibs GCC 15.2.0 r7: both focused graphics-target builds passed, with at most two compiler jobs. The same cache/options, recursive dependency pins and existing FFmpeg package at pin 9ac4cfd195f1 were used for both arms. Generated CTest metadata preserves all 3,200 baseline registrations and adds exactly one agc_graphics_profile_draw, including its profiling/no-shader-cache environment, skip code 77, 60-second timeout, source working directory and Windows runtime-library path.

  • Frozen main: default agc_driver_graphics passed 1/1 (14.31s). With APS5_PROFILE_DRAW=1, that same registered test failed with the specific control diagnostic AGC graphics: missing Vulkan function: vkCreateQueryPool (CTest exit 8, 0.94s). Main does not register the new profile test.
  • Candidate: agc_driver_graphics passed 1/1 (13.69s), and agc_graphics_profile_draw passed 1/1 (14.13s). All four executions were serial, with no skips; these are mocked Vulkan fixture checks, not real-device timing or performance measurements.

The preceding real-recorder/GPU results remain historical at their stated source/binary pins, including c6cbfa versus fdd175; they are not retargeted to this candidate. No new GPU, title, Linux, full-suite, hosted-CI or upstream-landing result is claimed. Compiler warnings are retained, not described as resolved. The initial configure's FFmpeg certificate-download failure was retained; configuration used the repository-supported existing same-pin package instead of disabling TLS verification. No source workaround or dependency change was made.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5024203476 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11566). Originally posted by [B-Howell](https://github.com/B-Howell) on 2026-10-26T20:31:19Z. --- ### What Extend the mocked Vulkan timestamp-query lifecycle in the AGC graphics test fixture and register `agc_graphics_profile_draw` so the fixture exercises draw profiling. ### 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. --> Current-main integration verification: merge commit `c6cbfa693601609cb2209fda8b1b5b1fc65c56d4` (tree `5e019e0213794591df8d0e2869aaf7dfd5087796`) preserves published ancestry and merges frozen `origin/main` `fdd1753204a4732e1011539cc9d3bb69f70b27a6`. The contribution against that main remains only the two test-related files, with 45 additions and 2 deletions. Candidate and baseline production source both use that exact main commit and recursive submodule pins. For a fair paired fixture check, the baseline received a byte-identical test-only overlay of the same two files (SHA-256 values recorded); this does not create a production-code difference or a negative-control result. Both focused Release builds passed with WinLibs GCC 15.2.0, the same Release/testing options and FFmpeg dependency pin. The baseline and candidate each built `agc_driver_graphics_tests` and `agc_driver_recorder_tests` with parallelism 2; no install-rule skip was used. - Candidate: `agc_driver_graphics` passes 1/1 (8.712s) and `agc_graphics_profile_draw` passes 1/1 (8.781s). These run the enlarged graphics fixture with mocked Vulkan, respectively without and with `APS5_PROFILE_DRAW=1`; they exercise query-pool lifecycle and profiling plumbing. - Pinned-main fixture overlay: the same `agc_driver_graphics` passes 1/1 (9.496s) and `agc_graphics_profile_draw` passes 1/1 (9.401s). This is a paired fixture compatibility check on main production source with the test-only overlay, not evidence that unmodified main registers the profile test. - Real-device recorder checks pass 2/2 on each arm: `agc_gpu_timing_complete` and `agc_gpu_timing_incomplete`. All six invocations ran serially under one exclusive GPU-lock acquisition; no test was skipped, and every individual test ran under 30 seconds. - Both real recorder arms selected the same NVIDIA GeForce RTX 4080 SUPER, driver 617.42, PCI bus 0000:01:00.0, on Windows 11 Pro 10.0.26300. They used `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, the same pinned local validation-layer package and verbose CTest. Each real recorder arm shows two Khronos instance insertions and two device insertions; neither log has a `VUID-` message or the requested-layer-missing diagnostic. - The two arms show the same loader-warning categories: four notices that `VK_INSTANCE_LAYERS` adds Khronos validation and two informational lookups where the installed AMD implicit layer lacks `vkGetDeviceProcAddr`. Mock fixture runs are not used as evidence of real Vulkan layer insertion. - Exact source, recursive submodule pins, executables/runtime libraries/shader archives/dependency hashes, registration counts, full logs and JUnit XML were checked and retained in the private qualification receipt. This verifies only the focused fixture and recorder cases; it makes no title, performance, full-suite, combined-other-PR, hosted-CI or upstream-landing claim. Existing approvals remain attributed to their recorded published heads. Historical published-head b1d/319621 qualification (retained verbatim): Current-main integration verification: commit `b1d83958a3e225477f61fc2ac812a6eb71923398` (verified source tree `bdfba15fe64927bf7c3ea8c35a062c166f9f8509`), preserving published ancestry and merging pinned main `319621ba2e578bd053b0baba2877fe70520e0737`. Both focused Release builds passed with WinLibs GCC 15.2.0, using the same compiler, Release/testing options and FFmpeg dependency pin. The contribution against that main remains only the two test-related files, with 45 additions and 2 deletions. - Candidate: `agc_driver_graphics` and `agc_graphics_profile_draw` each pass 1/1. These run the full enlarged graphics fixture with mocked Vulkan, respectively without and with `APS5_PROFILE_DRAW=1`; they verify mock query lifecycle and profiling plumbing. Separately, real-device `agc_gpu_timing_complete` and `agc_gpu_timing_incomplete` pass 2/2. - Pinned main: default `agc_driver_graphics` passes 1/1, and the two real-device recorder timing checks pass 2/2. Running main's default graphics fixture with `APS5_PROFILE_DRAW=1` fails with the exact control diagnostic `AGC graphics: missing Vulkan function: vkCreateQueryPool` (CTest exit 8). Main has no `agc_graphics_profile_draw` registration; the control selects `agc_driver_graphics` explicitly. - All six CTest invocations ran serially on the same machine under one exclusive GPU-lock acquisition; both real-device recorder arms selected the same RTX 4080 SUPER, using `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, the same local validation-layer package and verbose CTest. Each real recorder arm proves two actual Khronos instance insertions and two device insertions, with zero `VUID-` messages, no missing requested validation layer and zero skips. The mock fixture runs do not establish actual validation-layer insertion. Both recorder arms retain the same four environment-layer warnings and two implicit AMD-layer `vkGetDeviceProcAddr` lookup diagnostics. - Exact source, EXE/runtime-library/shader-archive/dependency hashes, registration counts and complete logs/XML were retained and checked before/after collection. This qualification applies to the pinned main and source tree above. It establishes focused fixture behavior, with no title, performance, full-suite, combined-other-PR, hosted-CI or upstream-landing claim; existing approvals remain attributed to their recorded published heads. Earlier published-head evidence (historical pins and qualifications retained): Windows 11 Pro 10.0.26300; MSYS2 UCRT64 GCC; NVIDIA GeForce RTX 4080 SUPER, driver 617.42. The retained baseline receipt is b9c30ee505; its build and both GPU timing tests passed. Final candidate 1e38ada86f is based on main da1d222d52. The only intervening AGC-file change is PCH wiring for execution-test targets, outside these focused graphics/recorder targets, so the baseline was not rebuilt. Baseline `agc_driver_graphics` passed; with `APS5_PROFILE_DRAW=1`, it failed as expected on missing mock `vkCreateQueryPool`. On the candidate, `agc_graphics_profile_draw`, `agc_driver_graphics`, `agc_gpu_timing_complete`, and `agc_gpu_timing_incomplete` passed. The Vulkan validation layer loaded from `VkLayer_khronos_validation.dll`; validation reported 0 VUIDs and no requested-layer-missing warning. Builds used CMake's `CMAKE_SKIP_INSTALL_RULES=ON` to skip unused install/export generation without changing compile, runtime, ABI, or unwind settings. Mock timestamps verify query lifecycle and profiling plumbing only; they are not real GPU performance evidence. ### 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: NVIDIA GeForce RTX 4080 SUPER, driver 617.42, Windows 11 Pro 10.0.26300 - [x] AI-assisted: yes ### 2026-10-31 test-registration split follow-through Candidate `9d7892e7f91aca9a29790f401bd7638e77e9d01f` (tree `27573dbc13fa89a250bee1c2690baa9d753e7a1a`) is an ordinary merge of published `c6cbfa693601609cb2209fda8b1b5b1fc65c56d4` with frozen main `613f9b8edf056318b14ff96fe3aceda59a419323`, which contains the landed #12862 registration split. The only resolution moves this PR's profile-test registration and properties into `tests/cmake/agc_driver_graphics_tests.cmake`; the mock timestamp source is retained. Against that main, the contribution remains two test-related files, 45 additions and 2 deletions. This is a frozen-main qualification, not a claim that the remote tip cannot advance. Windows Release/Ninja with WinLibs GCC 15.2.0 r7: both focused graphics-target builds passed, with at most two compiler jobs. The same cache/options, recursive dependency pins and existing FFmpeg package at pin `9ac4cfd195f1` were used for both arms. Generated CTest metadata preserves all 3,200 baseline registrations and adds exactly one `agc_graphics_profile_draw`, including its profiling/no-shader-cache environment, skip code 77, 60-second timeout, source working directory and Windows runtime-library path. - Frozen main: default `agc_driver_graphics` passed 1/1 (14.31s). With `APS5_PROFILE_DRAW=1`, that same registered test failed with the specific control diagnostic `AGC graphics: missing Vulkan function: vkCreateQueryPool` (CTest exit 8, 0.94s). Main does not register the new profile test. - Candidate: `agc_driver_graphics` passed 1/1 (13.69s), and `agc_graphics_profile_draw` passed 1/1 (14.13s). All four executions were serial, with no skips; these are mocked Vulkan fixture checks, not real-device timing or performance measurements. The preceding real-recorder/GPU results remain historical at their stated source/binary pins, including `c6cbfa` versus `fdd175`; they are not retargeted to this candidate. No new GPU, title, Linux, full-suite, hosted-CI or upstream-landing result is claimed. Compiler warnings are retained, not described as resolved. The initial configure's FFmpeg certificate-download failure was retained; configuration used the repository-supported existing same-pin package instead of disabling TLS verification. No source workaround or dependency change was made.
MarcZX10 commented 2026-10-26 22:26:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T22:26:14Z.

Review: APPROVED


Reviewed exact head 1e38ada86ffa741c36f817c1c92102875fb66f22; no actionable findings. The mock query-pool implementation bounds-checks reset/read indices, returns VK_NOT_READY until all requested timestamp queries are populated, and writes 64-bit results using the requested stride. The new test registration opts into profiling and disables the shader cache; the report correctly distinguishes mocked lifecycle coverage from real GPU performance evidence. The author reports the focused Windows GPU and validation-layer runs passed with no VUIDs; hosted eligibility, conventions, intake, labels and relinker checks pass, while unrelated product jobs are skipped. I did not rerun the Windows GPU test locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5659942510 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11566#pullrequestreview-5659942510). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T22:26:14Z. **Review:** APPROVED --- Reviewed exact head `1e38ada86ffa741c36f817c1c92102875fb66f22`; no actionable findings. The mock query-pool implementation bounds-checks reset/read indices, returns `VK_NOT_READY` until all requested timestamp queries are populated, and writes 64-bit results using the requested stride. The new test registration opts into profiling and disables the shader cache; the report correctly distinguishes mocked lifecycle coverage from real GPU performance evidence. The author reports the focused Windows GPU and validation-layer runs passed with no VUIDs; hosted eligibility, conventions, intake, labels and relinker checks pass, while unrelated product jobs are skipped. I did not rerun the Windows GPU test locally.
MarcZX10 commented 2026-10-31 21:27:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T21:27:45Z.

Review: APPROVED


Re-checked — new head, looks good

I reviewed head 9d7892e7f91aca9a29790f401bd7638e77e9d01f against base 613f9b8edf056318b14ff96fe3aceda59a419323; the diff remains limited to the graphics fixture and its CMake test registration, and I confirmed the fragment is included by the directory's CONFIGURE_DEPENDS glob. Local git diff --check and python3 tools/check_conventions.py --base 613f9b8edf056318b14ff96fe3aceda59a419323 passed. Hosted Windows, eligibility, conventions, library portability, labels, and report checks pass; Linux and specialized jobs are skipped. The author reports the exact-head focused Release fixture and GPU recorder tests passed; I did not independently rerun them. I did not build or run CTest locally. I found no blocking issue and approve this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5724995054 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11566#pullrequestreview-5724995054). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T21:27:45Z. **Review:** APPROVED --- # Re-checked — new head, looks good I reviewed head `9d7892e7f91aca9a29790f401bd7638e77e9d01f` against base `613f9b8edf056318b14ff96fe3aceda59a419323`; the diff remains limited to the graphics fixture and its CMake test registration, and I confirmed the fragment is included by the directory's `CONFIGURE_DEPENDS` glob. Local `git diff --check` and `python3 tools/check_conventions.py --base 613f9b8edf056318b14ff96fe3aceda59a419323` passed. Hosted Windows, eligibility, conventions, library portability, labels, and report checks pass; Linux and specialized jobs are skipped. The author reports the exact-head focused Release fixture and GPU recorder tests passed; I did not independently rerun them. I did not build or run CTest locally. I found no blocking issue and approve this head.
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!11566
No description provided.