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

Closed
milescoviello wants to merge 1 commit from upstream-pr/6789 into main
milescoviello commented 2026-10-16 12:07:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T12:07:32Z.


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 eb901bcf4 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 eb901bcf4 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 #6792
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4888131212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-16T12:07:32Z. --- ### 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` eb901bcf4 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](https://github.com/boykopovar/AnyPS5/pull/6789#pullrequestreview-5547860066) on Ubuntu 24.04 with GCC 13.3: `agc_driver_graphics` passes 3 of 3, and `main` eb901bcf4 fails 3 of 3. Their [instrumented run on #6792](https://github.com/boykopovar/AnyPS5/issues/6792#issuecomment-6215466763) 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 <!-- 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] Unblocks: `agc_driver_graphics` on Linux. Closes #6792 - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Amoenus commented 2026-10-16 12:38:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-16T12:38:03Z.

Review: APPROVED


Independently validated exact head b88591fd44 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5547860066 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789#pullrequestreview-5547860066). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-16T12:38:03Z. **Review:** APPROVED --- Independently validated exact head b88591fd44e70aede651466020ea3c0e70623a6d 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](https://github.com/boykopovar/AnyPS5/issues/6792#issuecomment-6215466763) 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](https://github.com/Amoenus/AnyPS5/commit/65d979b03438b601ca857624c40bb1ee6fc26d52), 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 commented 2026-10-16 12:39:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T12:39:41Z.


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

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215693379 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789#issuecomment-6215693379). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-16T12:39:41Z. --- Thanks for checking it on both platforms, and for the instrumented run on #6792. I added both to the description. AI-assisted: yes
MarcZX10 commented 2026-10-16 13:19:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T13:19:57Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5548327964 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789#pullrequestreview-5548327964). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T13:19:57Z. **Review:** APPROVED --- 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 commented 2026-10-16 16:55:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-16T16:55:01Z.


@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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6220458882 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789#issuecomment-6220458882). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-16T16:55:01Z. --- <!-- main66-identical-storage-fix --> @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 commented 2026-10-16 17:00:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T17:00:35Z.


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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6220557292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6789#issuecomment-6220557292). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-16T17:00:35Z. --- 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

Pull request closed

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!6789
No description provided.