test(agc): verify graphics output after optimized pipeline binding #3741
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3741"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jweidenh on 2026-10-11T16:15:40Z.
What
The pipeline-library tests currently check that an optimized handle exists without drawing through it. This adds deterministic GPU readback coverage for the transition from the fast link to the optimized link, related to #2866.
A test-only Vulkan wrapper holds the background compilation until the first draw completes, waits for optimization without sleeps, and verifies that the next real draw binds the handle created with
VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT. It checks every color channel for masked wave32/wave64 output and D32/D16 depth acceptance/rejection, with separate LTO-disabled controls. The only production-header addition is a friend that lets the test copy the existing device context; pipeline behavior is unchanged.Registered tests honor the production driver policy, including NVIDIA's disabled LTO. The executable accepts an explicit
--force-ltodiagnostic override in its copied test context. For example:This supplies a repeatable diagnostic for #2866; it does not fix that issue or justify enabling LTO on NVIDIA generally.
Tested
Current head:
fcc40d42582e6790e9a10fc599ad984cbfb6410b, rebased onto0a8b1d32b12a6d6a3acd462787750b482bf78884. The only conflict was adjacent CMake test registration; both upstream sRGB cases and all eight readback cases were preserved. The C++ test and header changes are identical to the previously tested head. Release, SPIRV-Tools enabled, 30-second per-test limits.Rebase validation rebuilt the focused executable and patched libraries. Windows 11 / RTX 5090 / NVIDIA 617.42 passed all eight default/control cases without skips (7.84 s total, slowest 3.99 s), each recording the production no-LTO policy and two fast draws. Linux GCC 13.3 / lavapipe passed all four depth cases without skips (each below 0.063 s); default cases used the optimized handle, and controls used fast handles. Private self-hosted run. Unchanged explicit-LTO and mutation diagnostics were not repeated.
Original validation at
5f5e49cb61a7ff9643aec6e2574bf90be762c8f0:--force-ltocases also passed on the same GPU. Each recorded one fast draw, one draw using the completed optimized handle, and one optimized creation; every pixel matched. Each process took 0.234–0.266 seconds in this run.Pipeline::Continueto keep the fast handle made the D32 diagnostic fail withreadback draw did not bind an optimized pipeline. Restoring the source and rebuilding made it pass. The submitted tree contains no mutation.libsbuild plus all four D32/D16 default/control cases passed without skips, each below 0.064 seconds. Default cases proved optimized draws; controls proved fast draws. The masked wave cases were not selected on lavapipe because they require at least 32 subgroup lanes; they were exercised on the RTX 5090.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:20:20Z.
Rebased onto current
main: the only conflicts were adjacent edits inlibSceAgcDriver/CMakeLists.txtandVulkanDevice.hpp, both sides kept. Rebuilt and ran the eight readback cases on RADV, all passing; unchanged otherwise from the head I reviewed. Merging once CI is green.