fix(agc): normalize unused viewport depth ranges #6535

Merged
gguerra26 merged 2 commits from upstream-pr/6535 into main 2026-10-19 08:14:03 +00:00
gguerra26 commented 2026-10-15 19:19:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gguerra26 on 2026-10-15T19:19:40Z.


What

Balatro (PPSA21402) uses a viewport depth range of [-1, 1] for color-only draws. On Apple M1 with MoltenVK these stop at viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted, even when there is no depth attachment and the pixel shader does not read PositionZ.

Normalize the viewport endpoints only for those draws. Preserve XY coordinates, clip-space mode and depth clamping. Depth attachments, PositionZ inputs and non-finite ranges keep their existing behavior and validation. The adjustment is part of the decoded draw state, so cached draws receive the same state.

This is independent of #4650, which emulates observable depth transforms, and does not include the broader Mac changes in #6222.

Tested

  • macOS 15.3.1, Apple M1, MoltenVK 1.4.2 (Vulkan 1.4.357), x86-64 runtime under Rosetta.
  • agc_driver_unused_viewport_depth passes. It also runs the existing depth-clip checks and covers PositionZ reads, attached depth, reversed ranges, in-range values, non-finite rejection and preserved XY/clipping state.
  • Full local Mac runtime build passes. Balatro gets past the viewport-depth stop and runs repeated frames. With this fix alone it next encounters separate rectangle-tessellation and barycentric fallback failures. Integrating the corresponding fixes from #6222 locally renders the Balatro main menu, and the user confirmed on 2026-10-15 that gameplay also works on this M1 setup. One earlier run rejected a corrupted command packet; the intermittent failure remains unresolved and long-session stability is not established. Those additional changes are outside this PR.
  • Title testing used the local macOS port rebased onto upstream, plus the existing CPU instruction fixes. This PR contains only the five files for unused viewport depth, based on upstream main.
  • git diff --check and python3 tools/check_conventions.py --base origin/main --head fix/agc-unused-viewport-depth pass.

The reasoning follows Vulkan's viewport transform and fragment operations: the changed depth value has no consumer when neither the fragment shader nor a depth attachment observes it.

Checklist

  • Based on current main; no other open PR implements the same function (related #4650 and #6222 reviewed)
  • One topic per PR; follow-ups go in a new PR
  • No comments added in code
  • Unimplemented paths still throw; no silent stubs added
  • No investigation notes, images or logs added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA21402 Game bring-up #1142, viewport-depth stop only
  • GPUs tested: Apple M1, MoltenVK 1.4.2, macOS 15.3.1; Balatro title launch. State regression uses CPU validation.
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4878623782 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535). Originally posted by [gguerra26](https://github.com/gguerra26) on 2026-10-15T19:19:40Z. --- ### What Balatro (PPSA21402) uses a viewport depth range of [-1, 1] for color-only draws. On Apple M1 with MoltenVK these stop at `viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted`, even when there is no depth attachment and the pixel shader does not read PositionZ. Normalize the viewport endpoints only for those draws. Preserve XY coordinates, clip-space mode and depth clamping. Depth attachments, PositionZ inputs and non-finite ranges keep their existing behavior and validation. The adjustment is part of the decoded draw state, so cached draws receive the same state. This is independent of #4650, which emulates observable depth transforms, and does not include the broader Mac changes in #6222. ### Tested - macOS 15.3.1, Apple M1, MoltenVK 1.4.2 (Vulkan 1.4.357), x86-64 runtime under Rosetta. - `agc_driver_unused_viewport_depth` passes. It also runs the existing depth-clip checks and covers PositionZ reads, attached depth, reversed ranges, in-range values, non-finite rejection and preserved XY/clipping state. - Full local Mac runtime build passes. Balatro gets past the viewport-depth stop and runs repeated frames. With this fix alone it next encounters separate rectangle-tessellation and barycentric fallback failures. Integrating the corresponding fixes from #6222 locally renders the Balatro main menu, and the user confirmed on 2026-10-15 that gameplay also works on this M1 setup. One earlier run rejected a corrupted command packet; the intermittent failure remains unresolved and long-session stability is not established. Those additional changes are outside this PR. - Title testing used the local macOS port rebased onto upstream, plus the existing CPU instruction fixes. This PR contains only the five files for unused viewport depth, based on upstream main. - `git diff --check` and `python3 tools/check_conventions.py --base origin/main --head fix/agc-unused-viewport-depth` pass. The reasoning follows Vulkan's [viewport transform](https://docs.vulkan.org/refpages/latest/refpages/source/VkViewport.html) and [fragment operations](https://docs.vulkan.org/spec/latest/chapters/fragops.html): the changed depth value has no consumer when neither the fragment shader nor a depth attachment observes it. ### Checklist - [x] Based on current `main`; no other open PR implements the same function (related #4650 and #6222 reviewed) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments added in code - [x] Unimplemented paths still throw; no silent stubs added - [x] No investigation notes, images or logs added to the repository - [x] No new third-party code - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA21402 [Game bring-up #1142](https://github.com/boykopovar/AnyPS5/discussions/1142), viewport-depth stop only - [x] GPUs tested: Apple M1, MoltenVK 1.4.2, macOS 15.3.1; Balatro title launch. State regression uses CPU validation. - [x] AI-assisted: yes (Codex)
github-actions[bot] commented 2026-10-15 19:31:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T19:31:14Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp L165
PR 7627 core/libs/prx/libSceAgcDriver/CMakeLists.txt L1783-1785, L1803

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 1191 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5480 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5500 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5656 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6146 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6249 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6611 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6612 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6636 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6701 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6762 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6887 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6937 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6941 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6963 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6965 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6973 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6987 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6989 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6995 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7615 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6200577205 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6200577205). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T19:31:14Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6804](https://www.github.com/boykopovar/AnyPS5/pull/6804) | `core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp` [L165](https://github.com/boykopovar/AnyPS5/blob/6030b31e06caa0e0884e7e4fefcade759521eee7/core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp#L165) | | | | [PR 7627](https://www.github.com/boykopovar/AnyPS5/pull/7627) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L1783-1785](https://github.com/boykopovar/AnyPS5/blob/6030b31e06caa0e0884e7e4fefcade759521eee7/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L1783-L1785), [L1803](https://github.com/boykopovar/AnyPS5/blob/6030b31e06caa0e0884e7e4fefcade759521eee7/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L1803) | | | 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 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` | | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5480](https://www.github.com/boykopovar/AnyPS5/pull/5480) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5656](https://www.github.com/boykopovar/AnyPS5/pull/5656) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6249](https://www.github.com/boykopovar/AnyPS5/pull/6249) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6611](https://www.github.com/boykopovar/AnyPS5/pull/6611) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6701](https://www.github.com/boykopovar/AnyPS5/pull/6701) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6762](https://www.github.com/boykopovar/AnyPS5/pull/6762) | `core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6763](https://www.github.com/boykopovar/AnyPS5/pull/6763) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6887](https://www.github.com/boykopovar/AnyPS5/pull/6887) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6937](https://www.github.com/boykopovar/AnyPS5/pull/6937) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6963](https://www.github.com/boykopovar/AnyPS5/pull/6963) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6965](https://www.github.com/boykopovar/AnyPS5/pull/6965) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6972](https://www.github.com/boykopovar/AnyPS5/pull/6972) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6973](https://www.github.com/boykopovar/AnyPS5/pull/6973) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7254](https://www.github.com/boykopovar/AnyPS5/pull/7254) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7615](https://www.github.com/boykopovar/AnyPS5/pull/7615) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
milescoviello commented 2026-10-15 19:33:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-15T19:33:02Z.


A Linux data point from a device without VK_EXT_depth_range_unrestricted: an Intel Arrow Lake iGPU on Mesa 26.1 ANV (Ubuntu VM), release build, 40 s runs. On main 44df21632, 22 catalog homebrew apps stop 0–1 s in with viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted. With this PR merged (head 378212176):

Result with this PR Apps
Reach the 40 s limit Stremio Plus (PPSA74126), PokeMMO Prospero (PPSA98001), ProsperoStore (PPSA99000), ProsperoEden (PPSA99008), OpenNOW PS5 (PPSA99082), Nuvio Max'd (PPSA99288), Régie5 (PPSA99520), Cloud Play (PPSA99600)
Get past the check, then exit with code 1 at 3–4 s without a message (not looked at) Homebrew UI Lab (PPSA99050), Surround Sound Studio (PPSA99051)
Still stop at the same check PPSA17641, PPSA28319, PPSA39410, PPSA69421, PPSA99001, PPSA99002, PPSA99003, PPSA99005, PPSA99006, PPSA99009, PPSA99773, PPSA99930

I didn't check why the last 12 still stop. I'd expect their draws to have a depth target or read PositionZ, which this PR leaves alone. One run per app and build.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6200611241 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6200611241). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-15T19:33:02Z. --- A Linux data point from a device without `VK_EXT_depth_range_unrestricted`: an Intel Arrow Lake iGPU on Mesa 26.1 ANV (Ubuntu VM), release build, 40 s runs. On `main` 44df21632, 22 catalog homebrew apps stop 0–1 s in with `viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted`. With this PR merged (head 378212176): | Result with this PR | Apps | |---|---| | Reach the 40 s limit | Stremio Plus (PPSA74126), PokeMMO Prospero (PPSA98001), ProsperoStore (PPSA99000), ProsperoEden (PPSA99008), OpenNOW PS5 (PPSA99082), Nuvio Max'd (PPSA99288), Régie5 (PPSA99520), Cloud Play (PPSA99600) | | Get past the check, then exit with code 1 at 3–4 s without a message (not looked at) | Homebrew UI Lab (PPSA99050), Surround Sound Studio (PPSA99051) | | Still stop at the same check | PPSA17641, PPSA28319, PPSA39410, PPSA69421, PPSA99001, PPSA99002, PPSA99003, PPSA99005, PPSA99006, PPSA99009, PPSA99773, PPSA99930 | I didn't check why the last 12 still stop. I'd expect their draws to have a depth target or read PositionZ, which this PR leaves alone. One run per app and build. AI-assisted: yes
DavidSamir commented 2026-10-16 07:33:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-16T07:33:46Z.


A second title this clears on macOS: ProsperoLichess (PPSA99009, homebrew catalog), on Apple M2.

macOS 26.7.1, Apple M2, x86-64 under Rosetta, MoltenVK from the LunarG Vulkan SDK 1.4.363, Release. A local tree of main ce991f1ec with #4627, #4630, #6124, the four macOS relinker PRs and mugurc's macOS port branches merged; this PR's head 378212176 applied on top, nothing else changed between the runs.

  • Without this PR, 2 runs of 2 stop 4 to 12 s in:
    libc++abi: terminating due to uncaught exception of type std::runtime_error: AGC graphics: viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted
    
  • With it, 3 runs of 3 log no viewport-depth refusal and get further, then stop 2 to 21 s in on a different refusal, which is outside this PR:
    libc++abi: terminating due to uncaught exception of type std::runtime_error: AGC graphics: last provoking vertex requires VK_EXT_provoking_vertex with provokingVertexLast enabled
    
  • agc_driver_unused_viewport_depth passes in this tree.

I didn't test #4650.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6210485803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6210485803). Originally posted by [DavidSamir](https://github.com/DavidSamir) on 2026-10-16T07:33:46Z. --- A second title this clears on macOS: ProsperoLichess (PPSA99009, homebrew catalog), on Apple M2. macOS 26.7.1, Apple M2, x86-64 under Rosetta, MoltenVK from the LunarG Vulkan SDK 1.4.363, Release. A local tree of `main` ce991f1ec with #4627, #4630, #6124, the four macOS relinker PRs and mugurc's macOS port branches merged; this PR's head `378212176` applied on top, nothing else changed between the runs. - Without this PR, 2 runs of 2 stop 4 to 12 s in: ``` libc++abi: terminating due to uncaught exception of type std::runtime_error: AGC graphics: viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted ``` - With it, 3 runs of 3 log no viewport-depth refusal and get further, then stop 2 to 21 s in on a different refusal, which is outside this PR: ``` libc++abi: terminating due to uncaught exception of type std::runtime_error: AGC graphics: last provoking vertex requires VK_EXT_provoking_vertex with provokingVertexLast enabled ``` - `agc_driver_unused_viewport_depth` passes in this tree. I didn't test #4650. AI-assisted: yes
milescoviello commented 2026-10-17 04:58:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-17T04:58:21Z.


A check on a device without VK_EXT_depth_range_unrestricted: Intel Arrow Lake iGPU (ANV, Mesa 26.1.6), Debian 13, kernel 6.12. I ran this PR's head (3782121769) as-is against its base (44df216321), same relinker, 60 s, no pad input. Two catalog titles that stop on the depth range there:

Title base 44df216321 this PR
ProsperoEden 1.004.000 (PPSA99008) stops at 3 s: viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted runs to the 60 s limit
Signal Companion 00.001.000 (PPSA69426) stops at 0 s, same message stops at 8 s, same message

So ProsperoEden's out-of-range viewports are all the unused kind this PR normalizes. Signal Companion gets 8 s further and then reaches a draw whose depth range is in use, which this PR leaves alone (that one needs #4650). On NVIDIA, which has the extension, neither stops on the depth range.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6229895082 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6229895082). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-17T04:58:21Z. --- A check on a device without `VK_EXT_depth_range_unrestricted`: Intel Arrow Lake iGPU (ANV, Mesa 26.1.6), Debian 13, kernel 6.12. I ran this PR's head (`3782121769`) as-is against its base (`44df216321`), same relinker, 60 s, no pad input. Two catalog titles that stop on the depth range there: | Title | base `44df216321` | this PR | |---|---|---| | ProsperoEden 1.004.000 (PPSA99008) | stops at 3 s: `viewport depth outside [0, 1] requires VK_EXT_depth_range_unrestricted` | runs to the 60 s limit | | Signal Companion 00.001.000 (PPSA69426) | stops at 0 s, same message | stops at 8 s, same message | So ProsperoEden's out-of-range viewports are all the unused kind this PR normalizes. Signal Companion gets 8 s further and then reaches a draw whose depth range is in use, which this PR leaves alone (that one needs #4650). On NVIDIA, which has the extension, neither stops on the depth range. AI-assisted: yes (Claude Code)
blawesom commented 2026-10-17 12:08:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T12:08:07Z.


Rebase handoff — rebased onto current main (authorship unchanged). One conflict in the test registration: your agc_driver_unused_viewport_depth entry sits alongside main's newer agc_driver_msaa_dcc_state, both kept.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV):

  • builds; tools/check_conventions.py --base origin/main passes
  • full suite: 1338/1339 — the only failure is the known main regression (agc_driver_tessellation segfault, #4727), not this PR

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/6535
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is be25cb2eb.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233702763 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6233702763). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T12:08:07Z. --- **Rebase handoff** — rebased onto current `main` (authorship unchanged). One conflict in the test registration: your `agc_driver_unused_viewport_depth` entry sits alongside `main`'s newer `agc_driver_msaa_dcc_state`, both kept. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): - builds; `tools/check_conventions.py --base origin/main` passes - **full suite: 1338/1339** — the only failure is the known `main` regression (`agc_driver_tessellation` segfault, #4727), not this PR **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/6535 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `be25cb2eb`.
adriadam10 commented 2026-10-19 08:15:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T08:15:13Z.


Thanks. main moved again, so I rebased onto it and added one commit on your branch:

  • CMakeLists.txt: agc_driver_unused_viewport_depth was missing the Windows PATH prepend for libc, so the Windows job failed with 0xc0000135 (DLL not found). It is now in the same WIN32 block as the other agc_driver_graphics_tests cases.

Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6262775199 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6535#issuecomment-6262775199). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T08:15:13Z. --- Thanks. `main` moved again, so I rebased onto it and added one commit on your branch: - `CMakeLists.txt`: `agc_driver_unused_viewport_depth` was missing the Windows `PATH` prepend for `libc`, so the Windows job failed with `0xc0000135` (DLL not found). It is now in the same `WIN32` block as the other `agc_driver_graphics_tests` cases. Merging once the full Build is green.
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!6535
No description provided.