Skip to content

test(agc): verify graphics output after optimized pipeline binding - #3741

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
jweidenh:codex/optimized-pipeline-readback
Oct 11, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
jweidenh:codex/optimized-pipeline-readback

Conversation

@jweidenh

@jweidenh jweidenh commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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-lto diagnostic override in its copied test context. For example:

agc_driver_pipeline_optimized_readback_tests.exe color32 --force-lto

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 onto 0a8b1d32b12a6d6a3acd462787750b482bf78884. 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:

  • Windows 11 build 26300, RTX 5090, NVIDIA 617.42, supported WinLibs GCC 15.2.0 r7: all eight registered tests passed without skips in 3.62 seconds total. They confirmed the production no-LTO policy and two fast-linked draws each.
  • The four explicit --force-lto cases 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.
  • Negative control on Windows: temporarily forcing Pipeline::Continue to keep the fast handle made the D32 diagnostic fail with readback draw did not bind an optimized pipeline. Restoring the source and rebuilding made it pass. The submitted tree contains no mutation.
  • Local self-hosted Linux runner, GCC 13.3, lavapipe: full libs build 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.
  • Conventions, test registration, and whitespace checks passed. No full test suite, title/FPS benchmark, Ampere/Ada GPU, or other NVIDIA driver was tested.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased onto current main: the only conflicts were adjacent edits in libSceAgcDriver/CMakeLists.txt and VulkanDevice.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.

@adriadam10
adriadam10 force-pushed the codex/optimized-pipeline-readback branch from fcc40d4 to 2b8f151 Compare October 11, 2026 22:20
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 11, 2026
@adriadam10
adriadam10 merged commit 325e0a8 into boykopovar:main Oct 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants