fix(agc-driver): rasterize nothing through a zero-scale viewport #2197

Merged
XairRrR merged 1 commit from upstream-pr/2197 into main 2026-10-10 04:45:01 +00:00
XairRrR commented 2026-10-09 11:29:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-09T11:29:34Z.


What

Uncharted: Legacy of Thieves Collection (PPSA05684) stops on main with:

AGC graphics: unsupported viewport transform: scale=(0, -0, 1), offset=(0, 0, 0), depth=(0, 1), negativeOneToOne=0

A viewport whose X or Y scale is zero maps every vertex onto one line, so a triangle, strip, fan or rect-list draw through it covers no pixel. Such draws now get a valid 1x1 Vulkan viewport and an empty scissor instead of throwing. Points, lines, and negative or non-finite scales still throw. Test in tests/Graphics.cpp (DepthClipTests).

Tested

Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09).

  • The branch alone on current main (d70b8998): tools/check_conventions.py passes; of the 513 ctest tests all pass except agc_driver_dcc_keys_first_write, which fails the same way on main (an unchanged pending image was uploaded again). agc_driver_storage_cache_budget passes run alone; under ctest -j8 a local 3 GB RSS limit stopped it.
  • Uncharted: Legacy of Thieves Collection (PPSA05684): with this and the other changes of its bring-up, the title boots past the stop quoted above and reaches its main menu.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4799796046 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2197). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-09T11:29:34Z. --- ### What Uncharted: Legacy of Thieves Collection (PPSA05684) stops on `main` with: ``` AGC graphics: unsupported viewport transform: scale=(0, -0, 1), offset=(0, 0, 0), depth=(0, 1), negativeOneToOne=0 ``` A viewport whose X or Y scale is zero maps every vertex onto one line, so a triangle, strip, fan or rect-list draw through it covers no pixel. Such draws now get a valid 1x1 Vulkan viewport and an empty scissor instead of throwing. Points, lines, and negative or non-finite scales still throw. Test in `tests/Graphics.cpp` (`DepthClipTests`). ### Tested Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09). - The branch alone on current `main` (d70b8998): `tools/check_conventions.py` passes; of the 513 ctest tests all pass except `agc_driver_dcc_keys_first_write`, which fails the same way on `main` (`an unchanged pending image was uploaded again`). `agc_driver_storage_cache_budget` passes run alone; under `ctest -j8` a local 3 GB RSS limit stopped it. - Uncharted: Legacy of Thieves Collection (PPSA05684): with this and the other changes of its bring-up, the title boots past the stop quoted above and reaches its main menu. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
rmz-24 commented 2026-10-09 13:07:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rmz-24 on 2026-10-09T13:07:54Z.


Windows run: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON, full build plus libs. 0fc522d9 cherry-picked onto current main d70b8998 (applies cleanly).

  • On this host agc_driver_dcc_keys_first_write passes on main and with this change, so the failure noted in the description (an unchanged pending image was uploaded again) doesn't reproduce on Windows/NVIDIA. agc_driver_storage_cache_budget also passes under ctest -j8 here (14 s).
  • Full ctest: 510/510.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6081509974 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2197#issuecomment-6081509974). Originally posted by [rmz-24](https://github.com/rmz-24) on 2026-10-09T13:07:54Z. --- Windows run: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`, full build plus `libs`. 0fc522d9 cherry-picked onto current `main` d70b8998 (applies cleanly). - On this host `agc_driver_dcc_keys_first_write` passes on `main` and with this change, so the failure noted in the description (`an unchanged pending image was uploaded again`) doesn't reproduce on Windows/NVIDIA. `agc_driver_storage_cache_budget` also passes under `ctest -j8` here (14 s). - Full ctest: 510/510. AI-assisted: yes
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!2197
No description provided.