Skip to content

fix(agc): preserve position export layout on undecodable tail - #6375

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
sanxchep:codex/shader-export-layout-fallback
Oct 18, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
sanxchep:codex/shader-export-layout-fallback

Conversation

@sanxchep

Copy link
Copy Markdown
Contributor

What

PositionExportLayout removes the guest's PA_CL_VS_OUT_CNTL position export bits only when decoding proves they are unused. When optional inspection reaches an unimplemented opcode in a padded program tail, it keeps those bits. Other decoder errors still propagate, and shader compilation is unchanged.

Add a regression case for the undecodable tail alongside the existing position export checks. Found during My First Gran Turismo (PPSA24156) bring-up. This change does not make the game playable.

Tested

  • Rebuilt agc_driver_vertex_clip_cull_draw_tests on a branch based on current main.
  • ctest --test-dir build --output-on-failure -R '^agc_driver_vertex_clip_cull_draw': 2/2 passed, including the no-key variant.
  • python3 tools/check_conventions.py --base origin/main: passed.
  • Ubuntu 24.04.5 LTS, x86_64, Linux 7.0.0-38-generic; MSI Katana 17 B13VGK, Intel Core i9-13900H, 32 GB RAM.
  • NVIDIA GeForce RTX 4070 Laptop GPU (8188 MiB, driver 595.84) ran the Vulkan tests. Intel Iris Xe Graphics is present but was not tested.
  • The isolated branch was not run against the full title; PPSA24156 still needs separate graphics fixes.

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; this fallback only retains guest metadata when optional export inspection cannot decode the tail
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none; PPSA24156 still needs other fixes
  • GPUs tested: NVIDIA GeForce RTX 4070 Laptop GPU, driver 595.84, Ubuntu 24.04.5 LTS; Intel Iris Xe not tested
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5115 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 5431 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6612 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6867 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 7644 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp

@github-actions github-actions Bot added agc libSceAgc* unblocks title Names a title ID on the Unblocks line labels Oct 15, 2026
@adriadam10 adriadam10 self-assigned this Oct 18, 2026
@adriadam10
adriadam10 merged commit 925b85e into boykopovar:main Oct 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants