Skip to content

test(agc): keep the vertex terminate case's code in static storage - #6789

Closed
milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:fix/vertex-terminate-test-code
Closed

milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:fix/vertex-terminate-test-code

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Now that main builds on Linux again (#6784), agc_driver_graphics fails there 3 of 3 (GCC 13.3, Release):

ShaderRecompiler::Recompile: VOP2 opcode is not implemented

It stops in the vertex case #5804 added to orderedPixelShaderTests. The request it dumps is a vertex program at 0x10000 with 12 code words, all zero. The case's vertexWords lambda builds its request from the function's constexpr local vertexBdaCode, and by the time the recompiler read the span the words were zero. Since agc_driver_graphics runs its cases in sequence, every case after this one is skipped as well. Amoenus reproduced it on main eb901bc and filed it as #6792.

How

vertexBdaCode is static constexpr, so the span points at storage that lives for the program.

Tested

Linux (Ubuntu 24.04, GCC 13.3, Release), RTX 4070 Ti, NVIDIA 595.99.

  • agc_driver_graphics: with main's Graphics.cpp it fails 3 of 3 with the line above. With this change it passes 3 of 3 (Graphics validation tests passed), including the vertex terminate case.

@Amoenus validated this head on Ubuntu 24.04 with GCC 13.3: agc_driver_graphics passes 3 of 3, and main eb901bc fails 3 of 3. Their instrumented run on #6792 shows the 12 literal words nonzero when read directly, and all 12 zero through the request's span before Recompile. On Windows 11 with WinLibs GCC 15.2 the same CPU tests pass 3 of 3 with this change.

Neither of us has confirmed why the span saw zeros with the local array. #5804's own CI ran before main stopped building on Linux.

Not checked on Windows, macOS, on AMD or on a console.

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
  • Unblocks: agc_driver_graphics on Linux. Closes Linux GCC13.3: agc_driver_graphics reports VOP2 for an all-zero vertex request #6792
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04
  • AI-assisted: yes

🤖 Generated with Claude Code

agc_driver_graphics stopped on Linux (GCC 13.3, Release) in the vertex
case boykopovar#5804 added, with "VOP2 opcode is not implemented". The request
it dumped had its 12 code words all zero: the case's lambda took its
code span from the function's constexpr local array, and the span saw
zeros by the time the recompiler read it. The array is now static
constexpr, and the whole test passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Amoenus Amoenus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently validated exact head b88591f on Ubuntu 24.04 / GCC 13.3 Release: agc_driver_graphics passes 3/3 fresh CTest processes (maximum4.40s). Unmodified main eb901bcf4 fails3/3, and restoring the original source after diagnostic instrumentation reproduces3/3 failures again.

The pre-call observation requested in #6792 shows all12 direct literal reads nonzero but all12 request-span reads already zero; serialization before Recompile matches its exception payload. Giving this immutable fixture literal static storage corrects the observed failure without changing production code or assertions. The underlying compiler/storage explanation remains unconfirmed.

With this one-line change cherry-picked onto our retained integration65d979b03, the affected target builds and the same CPU graphics group passes3/3 each on Windows11 / WinLibs GCC15.2r7 and Ubuntu / GCC13.3 (maximum6.83s). Linux's unavailable heap-mirror cases remain excluded from coverage. These are CPU/mock tests, not GPU or title validation. Unrelated GPU matrices retain their earlier source pins. AI-assisted review: Codex; builds and tests run locally.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks for checking it on both platforms, and for the instrumented run on #6792. I added both to the description.

AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one-line static-storage change matches the reproduced failure: the literal array is nonzero, but the request span was already zero before Recompile. The exact head passes the focused graphics test 3/3 on Linux, with an independent Windows/Linux report and a negative control against main. Current conventions, eligibility, intake and report checks pass; platform build jobs are skipped by repository policy. The underlying compiler/storage explanation remains unconfirmed, as the PR states.

@Amoenus

Amoenus commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@milescoviello Main 66e290f1c04a6aa08271f106d0dc83ba06561bfc now contains #6889, and I verified its complete one-line patch is identical to this PR's change. Plain main66's actual CPU graphics target builds and passes3/3 on Ubuntu24.04 WSL2 / GCC13.3 / Release (max3.29s); the journal control passes1/1. The two unavailable heap-mirror checks per graphics process are excluded.

I have closed our observed-failure report #6792 as resolved and updated #5939's CI-blocker report. This PR is now superseded at the source level; your original negative controls and validation remain useful evidence. This is selected CPU/mock coverage, not a new full-suite or GPU result. AI-assisted: Codex.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Superseded by #6889, which merged the same static constexpr change, so I am closing this. Thanks @Amoenus for checking that the patches are identical and closing #6792, and @MarcZX100 for the review.

AI-assisted: yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux GCC13.3: agc_driver_graphics reports VOP2 for an all-zero vertex request

3 participants