feat(shader): read hull inputs at a control point chosen by a select or phi #6551

Merged
yash27git merged 1 commit from upstream-pr/6551 into main 2026-10-19 06:31:09 +00:00
yash27git commented 2026-10-15 20:13:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yash27git on 2026-10-15T20:13:29Z.


What

A hull program that reads its input control points from LDS at an index it computes from data is accepted only while its address arithmetic folds. One that chooses between two computed control points, or merges them in a phi, is refused:

ShaderRecompiler::Recompile: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40

The strict evaluator takes SelectU32 and Phi only when every operand is the same affine value (Same), and the dynamic term does not pass through either, so the read's multiple falls back to 1 and derive refuses it. #4727's description records exactly this: "The dynamic term never passes through masks, shifts right, disjoint ORs, selects or phis whose arms differ." This PR closes the selects and phis half of it.

  • CommonMultiple keeps the multiple when the operands of a select or a phi agree on their vertex, relative and constant terms: the value is that affine part plus whichever operand's multiple the choice picks, so a multiple of the greatest common divisor of those multiples.
  • An exactly affine operand counts as 0, as std::gcd does: it is zero multiples away from the affine part, so its sibling's multiple passes through.
  • Operands that disagree on the affine part are still refused, because the affine part itself would be the chosen one.
  • The rule runs only where the evaluator already looks for a dynamic term, that is a hull LDS read. The strict addresses (control and patch outputs, evaluation and patch inputs, factors) take the same path as before, and derive still requires the multiple to be a whole number of control points (dynamicScale % localStride == 0).
  • A dynamic address with no byte offset to add is emitted as the program's own address, like the static path emits its own offset, instead of address + 0. The values are the same: TessellationPointer divides and masks the address to recover the control point, attribute and component either way, and a component with no offset saves its add. It also keeps the emitted address equal to the address the evaluator proved, which is what the test asserts. (TessellationPointer's one-OpAccessChain fast path needs an immediate byte offset as the add's second operand, so it does not apply to a computed index in either form.)
  • ShiftLeftLogical32 and BitFieldUExtract took the shift and the bit count of a folded constant unguarded, where ShiftRightLogical32 already refuses a negative shift, and the count feeds 1ll << count. Both now refuse and fail the lowering. These two change no shader: bounded keeps every folded constant in [0, 0xffffffff], so they are hardening for a later relaxation of that invariant.
  • No host behaviour the console does not have is added, so there is no technical debt entry; the gl_in clamp a computed index already relies on stays as recorded in docs/dev/debt/shader.md.
  • The diff against the merge base adds only: CMakeLists.txt +13/-0, tests/TessellationLowering.cpp +197/-0, TessellationLowering.cpp +22/-8. Nothing is deleted, including the agc_frame_dump_io registration an earlier head of this branch dropped and 9f429e65a restored.

Tested

New offline test agc_tessellation_lowering (hand-built IR, no device, no shader binary): the read is ds_read_b32 of Lds at pc 0x40, addressed by min(inv, 2) * 32 (or a choice of computed control points) added to the patch term relative patch * 96, with a reference that keeps it alive. Six cases: three reads that must lower and carry the program's own address, three that must stay refused as not a whole number of control points.

Windows, MinGW-w64 GCC 16.2.0, Ninja, -DBUILD_TESTING=ON:

cmake --build build --target agc_tessellation_lowering_tests
[222/223] Linking CXX executable tests\agc_tessellation_lowering_tests.exe

ctest --test-dir build -R agc_tessellation_lowering --output-on-failure
1/1 Test #220: agc_tessellation_lowering ........   Passed    0.05 sec
100% tests passed out of 1

The warnings that build prints are in core/libs/prx/libc and 3rdparty/glslang; none come from the changed files.

jotitadev ran both heads on a device:

  • At ece802d merged onto 44df216, with TessellationLowering.cpp from main and only the test and its CMake registration, agc_tessellation_lowering fails on the three reads above, refused at pc 0x40 with the same message. With the whole change, agc_tessellation_lowering, agc_tessellation_factor_ring and agc_driver_tessellation pass 3/3 each.
  • At 9f429e65a merged onto 0615cd2b8, agc_frame_dump_io is registered again and passes; the test-only head still fails; with the change all four pass 3/3. A ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60 sweep of 614 tests has one failure, agc_driver_store_over_untracked, which also fails on unchanged main there and is tracked as #6347. Their machine is on the GPUs tested line.

The before and after below were produced on Linux (g++ 14.2.0, -O0) by compiling the IR, the two passes and the test directly, so the same test could be run against main:

On main:

failed: a hull read at a computed control-point index keeps the program's address
refused: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40
failed: a hull read at a control point selected from data keeps the program's address
refused: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40
failed: a hull read at a control point merged by a phi keeps the program's address

The first case lowers on main, but the emitted address is address + 0 rather than the program's own address, which is what that case asserts; the other two are refused at pc 0x40. With this change all six cases pass and the run prints nothing (exit 0).

The three refusals stay refused on both sides: a select arm at * 16 (half a slot), a phi arm at * 16, and select arms at two different offsets. -Wall -Wextra on both changed C++ files adds no warning; TessellationLowering.cpp keeps its four pre-existing ones, none on the changed lines.

Not run by anyone: the four test patterns jotitadev excluded from the sweep (agc_display_buffer_dcc, agc_driver_flip, agc_driver_lds_atomics64, display, flip), and the rest of the ctest suite on Windows. No title was measured for the two shapes this accepts; the test's IR is what the lowering sees for such a read, not a captured shader.

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
  • New third-party code is a submodule built from source
  • All tessellation lowering unit tests compile and pass cleanly
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3070 (driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04, kernel 7.0.0-38), Linux; jotitadev's runs at ece802d (three tessellation tests 3/3) and 9f429e65a (those three and agc_frame_dump_io, plus the 614-test sweep)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4879238259 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551). Originally posted by [yash27git](https://github.com/yash27git) on 2026-10-15T20:13:29Z. --- ### What A hull program that reads its input control points from LDS at an index it computes from data is accepted only while its address arithmetic folds. One that chooses between two computed control points, or merges them in a phi, is refused: ``` ShaderRecompiler::Recompile: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40 ``` The strict evaluator takes `SelectU32` and `Phi` only when every operand is the same affine value (`Same`), and the dynamic term does not pass through either, so the read's multiple falls back to 1 and `derive` refuses it. #4727's description records exactly this: "The dynamic term never passes through masks, shifts right, disjoint ORs, selects or phis whose arms differ." This PR closes the selects and phis half of it. - `CommonMultiple` keeps the multiple when the operands of a select or a phi agree on their vertex, relative and constant terms: the value is that affine part plus whichever operand's multiple the choice picks, so a multiple of the greatest common divisor of those multiples. - An exactly affine operand counts as 0, as `std::gcd` does: it is zero multiples away from the affine part, so its sibling's multiple passes through. - Operands that disagree on the affine part are still refused, because the affine part itself would be the chosen one. - The rule runs only where the evaluator already looks for a dynamic term, that is a hull LDS read. The strict addresses (control and patch outputs, evaluation and patch inputs, factors) take the same path as before, and `derive` still requires the multiple to be a whole number of control points (`dynamicScale % localStride == 0`). - A dynamic address with no byte offset to add is emitted as the program's own address, like the static path emits its own offset, instead of `address + 0`. The values are the same: `TessellationPointer` divides and masks the address to recover the control point, attribute and component either way, and a component with no offset saves its add. It also keeps the emitted address equal to the address the evaluator proved, which is what the test asserts. (`TessellationPointer`'s one-`OpAccessChain` fast path needs an immediate byte offset as the add's second operand, so it does not apply to a computed index in either form.) - `ShiftLeftLogical32` and `BitFieldUExtract` took the shift and the bit count of a folded constant unguarded, where `ShiftRightLogical32` already refuses a negative shift, and the count feeds `1ll << count`. Both now refuse and fail the lowering. These two change no shader: `bounded` keeps every folded constant in `[0, 0xffffffff]`, so they are hardening for a later relaxation of that invariant. - No host behaviour the console does not have is added, so there is no technical debt entry; the `gl_in` clamp a computed index already relies on stays as recorded in `docs/dev/debt/shader.md`. - The diff against the merge base adds only: `CMakeLists.txt` +13/-0, `tests/TessellationLowering.cpp` +197/-0, `TessellationLowering.cpp` +22/-8. Nothing is deleted, including the `agc_frame_dump_io` registration an earlier head of this branch dropped and `9f429e65a` restored. ### Tested New offline test `agc_tessellation_lowering` (hand-built IR, no device, no shader binary): the read is `ds_read_b32` of `Lds` at pc 0x40, addressed by `min(inv, 2) * 32` (or a choice of computed control points) added to the patch term `relative patch * 96`, with a reference that keeps it alive. Six cases: three reads that must lower and carry the program's own address, three that must stay refused as not a whole number of control points. Windows, MinGW-w64 GCC 16.2.0, Ninja, `-DBUILD_TESTING=ON`: ``` cmake --build build --target agc_tessellation_lowering_tests [222/223] Linking CXX executable tests\agc_tessellation_lowering_tests.exe ctest --test-dir build -R agc_tessellation_lowering --output-on-failure 1/1 Test #220: agc_tessellation_lowering ........ Passed 0.05 sec 100% tests passed out of 1 ``` The warnings that build prints are in `core/libs/prx/libc` and `3rdparty/glslang`; none come from the changed files. jotitadev ran both heads on a device: - At `ece802d` merged onto `44df216`, with `TessellationLowering.cpp` from `main` and only the test and its CMake registration, `agc_tessellation_lowering` fails on the three reads above, refused at pc 0x40 with the same message. With the whole change, `agc_tessellation_lowering`, `agc_tessellation_factor_ring` and `agc_driver_tessellation` pass 3/3 each. - At `9f429e65a` merged onto `0615cd2b8`, `agc_frame_dump_io` is registered again and passes; the test-only head still fails; with the change all four pass 3/3. A `ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60` sweep of 614 tests has one failure, `agc_driver_store_over_untracked`, which also fails on unchanged `main` there and is tracked as #6347. Their machine is on the `GPUs tested` line. The before and after below were produced on Linux (g++ 14.2.0, `-O0`) by compiling the IR, the two passes and the test directly, so the same test could be run against `main`: On `main`: ``` failed: a hull read at a computed control-point index keeps the program's address refused: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40 failed: a hull read at a control point selected from data keeps the program's address refused: tessellation lowering: the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40 failed: a hull read at a control point merged by a phi keeps the program's address ``` The first case lowers on `main`, but the emitted address is `address + 0` rather than the program's own address, which is what that case asserts; the other two are refused at pc 0x40. With this change all six cases pass and the run prints nothing (`exit 0`). The three refusals stay refused on both sides: a select arm at `* 16` (half a slot), a phi arm at `* 16`, and select arms at two different offsets. `-Wall -Wextra` on both changed C++ files adds no warning; `TessellationLowering.cpp` keeps its four pre-existing ones, none on the changed lines. Not run by anyone: the four test patterns jotitadev excluded from the sweep (`agc_display_buffer_dcc`, `agc_driver_flip`, `agc_driver_lds_atomics64`, `display`, `flip`), and the rest of the ctest suite on Windows. No title was measured for the two shapes this accepts; the test's IR is what the lowering sees for such a read, not a captured shader. ### Checklist - [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 - [x] New third-party code is a submodule built from source - [x] All tessellation lowering unit tests compile and pass cleanly - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3070 (driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04, kernel 7.0.0-38), Linux; jotitadev's runs at `ece802d` (three tessellation tests 3/3) and `9f429e65a` (those three and `agc_frame_dump_io`, plus the 614-test sweep) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 20:24:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T20:24:20Z.


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 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
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 5480 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5656 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6146 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
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 6611 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6612 core/shader/recompiler/Optimization/src/TessellationLowering.cpp
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6701 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6718 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6759 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6820 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 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 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
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7489 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 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201541688 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6201541688). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T20:24:20Z. --- <!-- pr-overlap --> 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 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` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [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 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` | | [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` | | [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` | | [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` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [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 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/shader/recompiler/Optimization/src/TessellationLowering.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6701](https://www.github.com/boykopovar/AnyPS5/pull/6701) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6759](https://www.github.com/boykopovar/AnyPS5/pull/6759) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [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` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `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 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` | | [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 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7489](https://www.github.com/boykopovar/AnyPS5/pull/7489) | `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 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
jotitadev commented 2026-10-15 20:32:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T20:32:07Z.

Review: COMMENTED


The CMakeLists.txt hunk in ece802dc4 drops the agc_frame_dump_io test registration (lines 319-329 on main 44df21632), which has nothing to do with tessellation lowering. That test came in with #5800 (6541db004, "disable optional BMP dumps after host I/O failures"). tests/FrameDumpIo.cpp is still in the tree at this head, so after a merge the file is still there but nothing builds or runs it. The test would disappear from ctest without any failure to show it.

It looks like a leftover from resolving a conflict in that if(BUILD_TESTING) block. Restoring the eleven removed lines and keeping only the new agc_tessellation_lowering block should be enough.

Checked by reading git diff 44df21632 ece802dc4 -- core/libs/prx/libSceAgcDriver/CMakeLists.txt and git ls-tree ece802dc4 core/libs/prx/libSceAgcDriver/tests/FrameDumpIo.cpp. Nothing was built.

Written with AI assistance (Claude Code). The commands above were run on my machine; no build or test was run.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5539503608 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#pullrequestreview-5539503608). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T20:32:07Z. **Review:** COMMENTED --- The `CMakeLists.txt` hunk in ece802dc4 drops the `agc_frame_dump_io` test registration (lines 319-329 on `main` 44df21632), which has nothing to do with tessellation lowering. That test came in with #5800 (6541db004, "disable optional BMP dumps after host I/O failures"). `tests/FrameDumpIo.cpp` is still in the tree at this head, so after a merge the file is still there but nothing builds or runs it. The test would disappear from ctest without any failure to show it. It looks like a leftover from resolving a conflict in that `if(BUILD_TESTING)` block. Restoring the eleven removed lines and keeping only the new `agc_tessellation_lowering` block should be enough. Checked by reading `git diff 44df21632 ece802dc4 -- core/libs/prx/libSceAgcDriver/CMakeLists.txt` and `git ls-tree ece802dc4 core/libs/prx/libSceAgcDriver/tests/FrameDumpIo.cpp`. Nothing was built. Written with AI assistance (Claude Code). The commands above were run on my machine; no build or test was run.
jotitadev commented 2026-10-15 21:27:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T21:27:32Z.

Review: COMMENTED


Linux run, including the two GPU tessellation tests the description lists as not run.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, BUILD_TESTING=ON. Head ece802dc4 merged onto main 44df21632, no conflicts. ANYPS5_GPU="NVIDIA GeForce RTX 3070".

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux

  • Test only (the new test and CMake registration, TessellationLowering.cpp from main): agc_tessellation_lowering fails. The three reads that should lower are refused with the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40, for the computed index, the data-selected point and the phi-merged point.
  • With the change: agc_tessellation_lowering, agc_tessellation_factor_ring and agc_driver_tessellation pass 3/3 each.

Written with AI assistance (Claude Code). I ran the tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5540156229 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#pullrequestreview-5540156229). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T21:27:32Z. **Review:** COMMENTED --- Linux run, including the two GPU tessellation tests the description lists as not run. **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, `BUILD_TESTING=ON`. Head `ece802dc4` merged onto `main` `44df21632`, no conflicts. `ANYPS5_GPU="NVIDIA GeForce RTX 3070"`. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux - **Test only** (the new test and CMake registration, `TessellationLowering.cpp` from `main`): `agc_tessellation_lowering` fails. The three reads that should lower are refused with `the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40`, for the computed index, the data-selected point and the phi-merged point. - **With the change:** `agc_tessellation_lowering`, `agc_tessellation_factor_ring` and `agc_driver_tessellation` pass 3/3 each. Written with AI assistance (Claude Code). I ran the tests above on my machine.
yash27git commented 2026-10-16 11:01:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yash27git on 2026-10-16T11:01:25Z.


Linux run, including the two GPU tessellation tests the description lists as not run.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, BUILD_TESTING=ON. Head ece802dc4 merged onto main 44df21632, no conflicts. ANYPS5_GPU="NVIDIA GeForce RTX 3070".

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux

  • Test only (the new test and CMake registration, TessellationLowering.cpp from main): agc_tessellation_lowering fails. The three reads that should lower are refused with the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40, for the computed index, the data-selected point and the phi-merged point.
  • With the change: agc_tessellation_lowering, agc_tessellation_factor_ring and agc_driver_tessellation pass 3/3 each.

Written with AI assistance (Claude Code). I ran the tests above on my machine.

Confirmed, and thank you for the ls-tree cross-check. My CMakeLists.txt was built from a copy taken before #5800 landed, so the hunk in ece802d really does drop lines 319–329 while tests/FrameDumpIo.cpp stays in the tree. Rebuilt the file against current main and pushed: git diff origin/main --numstat -- core/libs/prx/libSceAgcDriver/CMakeLists.txt is 13 0, and agc_frame_dump_io is back at line 319. agc_frame_dump_io_tests builds and its test registers and runs again; ctest -N lists both it and agc_tessellation_lowering. Sorry for the noise!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6214055304 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6214055304). Originally posted by [yash27git](https://github.com/yash27git) on 2026-10-16T11:01:25Z. --- > Linux run, including the two GPU tessellation tests the description lists as not run. > > **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, `BUILD_TESTING=ON`. Head `ece802dc4` merged onto `main` `44df21632`, no conflicts. `ANYPS5_GPU="NVIDIA GeForce RTX 3070"`. > > GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux > > * **Test only** (the new test and CMake registration, `TessellationLowering.cpp` from `main`): `agc_tessellation_lowering` fails. The three reads that should lower are refused with `the hull shader reads LDS at a computed offset that is not a whole number of control points at pc 0x40`, for the computed index, the data-selected point and the phi-merged point. > * **With the change:** `agc_tessellation_lowering`, `agc_tessellation_factor_ring` and `agc_driver_tessellation` pass 3/3 each. > > Written with AI assistance (Claude Code). I ran the tests above on my machine. Confirmed, and thank you for the ls-tree cross-check. My CMakeLists.txt was built from a copy taken before #5800 landed, so the hunk in ece802d really does drop lines 319–329 while tests/FrameDumpIo.cpp stays in the tree. Rebuilt the file against current main and pushed: git diff origin/main --numstat -- core/libs/prx/libSceAgcDriver/CMakeLists.txt is 13 0, and agc_frame_dump_io is back at line 319. agc_frame_dump_io_tests builds and its test registers and runs again; ctest -N lists both it and agc_tessellation_lowering. Sorry for the noise!
jotitadev commented 2026-10-16 15:30:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T15:30:00Z.

Review: COMMENTED


Re-ran the current head after the CMakeLists.txt fix.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head 9f429e65a merged onto main 0615cd2b8, clean merge (main did not build at the time, #6784). ANYPS5_GPU="NVIDIA GeForce RTX 3070".

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux

  • agc_frame_dump_io is registered again and passes.
  • Test only (TessellationLowering.cpp from main): agc_tessellation_lowering still fails; agc_tessellation_factor_ring, agc_driver_tessellation and agc_frame_dump_io pass.
  • With the change: all four pass 3/3.
  • ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60: 614 tests, only agc_driver_store_over_untracked fails, which also fails on unchanged main here (#6347).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5549984737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#pullrequestreview-5549984737). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-16T15:30:00Z. **Review:** COMMENTED --- Re-ran the current head after the `CMakeLists.txt` fix. **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Head `9f429e65a` merged onto `main` `0615cd2b8`, clean merge (`main` did not build at the time, #6784). `ANYPS5_GPU="NVIDIA GeForce RTX 3070"`. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux - `agc_frame_dump_io` is registered again and passes. - Test only (`TessellationLowering.cpp` from `main`): `agc_tessellation_lowering` still fails; `agc_tessellation_factor_ring`, `agc_driver_tessellation` and `agc_frame_dump_io` pass. - With the change: all four pass 3/3. - `ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60`: 614 tests, only `agc_driver_store_over_untracked` fails, which also fails on unchanged `main` here (#6347). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
yash27git commented 2026-10-16 16:07:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yash27git on 2026-10-16T16:07:48Z.


Re-ran the current head after the CMakeLists.txt fix.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head 9f429e65a merged onto main 0615cd2b8, clean merge (main did not build at the time, #6784). ANYPS5_GPU="NVIDIA GeForce RTX 3070".

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux

  • agc_frame_dump_io is registered again and passes.
  • Test only (TessellationLowering.cpp from main): agc_tessellation_lowering still fails; agc_tessellation_factor_ring, agc_driver_tessellation and agc_frame_dump_io pass.
  • With the change: all four pass 3/3.
  • ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60: 614 tests, only agc_driver_store_over_untracked fails, which also fails on unchanged main here (#6347).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

Confirmed on my side too: the merge-base diff is +13/-0, +197/-0, +22/-8, so the branch deletes nothing now. Folded your re-run into the description, attributed to you: agc_frame_dump_io registered and passing, the test-only head still refused at pc 0x40, all four tests 3/3 with the change, and the 614-test sweep whose only failure is agc_driver_store_over_untracked, which also fails on unchanged main and is tracked as #6347. I have left #6347 alone — it is not touched by this change, and I would rather not widen this PR. Thank you for the two runs; that is more coverage than the PR had when you first read it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6219571639 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6219571639). Originally posted by [yash27git](https://github.com/yash27git) on 2026-10-16T16:07:48Z. --- > Re-ran the current head after the `CMakeLists.txt` fix. > > **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Head `9f429e65a` merged onto `main` `0615cd2b8`, clean merge (`main` did not build at the time, #6784). `ANYPS5_GPU="NVIDIA GeForce RTX 3070"`. > > GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), Linux > > * `agc_frame_dump_io` is registered again and passes. > * Test only (`TessellationLowering.cpp` from `main`): `agc_tessellation_lowering` still fails; `agc_tessellation_factor_ring`, `agc_driver_tessellation` and `agc_frame_dump_io` pass. > * With the change: all four pass 3/3. > * `ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60`: 614 tests, only `agc_driver_store_over_untracked` fails, which also fails on unchanged `main` here (#6347). > > Written with AI assistance (Claude Code). I ran the builds and tests above on my machine. Confirmed on my side too: the merge-base diff is `+13/-0`, `+197/-0`, `+22/-8`, so the branch deletes nothing now. Folded your re-run into the description, attributed to you: `agc_frame_dump_io` registered and passing, the test-only head still refused at pc 0x40, all four tests 3/3 with the change, and the 614-test sweep whose only failure is `agc_driver_store_over_untracked`, which also fails on unchanged `main` and is tracked as #6347. I have left #6347 alone — it is not touched by this change, and I would rather not widen this PR. Thank you for the two runs; that is more coverage than the PR had when you first read it.
yash27git commented 2026-10-17 04:26:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yash27git on 2026-10-17T04:26:05Z.


Dear jotitadev,
If you could take a final decision on my PR #6551, I'll be thankful.
You decide to merge or describe the problem with PR So i could work on different parts of 'ANYPS5' code as soon as possible. Thanks.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6229614962 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6229614962). Originally posted by [yash27git](https://github.com/yash27git) on 2026-10-17T04:26:05Z. --- Dear [jotitadev](https://github.com/jotitadev), If you could take a final decision on my PR #6551, I'll be thankful. You decide to merge or describe the problem with PR So i could work on different parts of 'ANYPS5' code as soon as possible. Thanks.
jotitadev commented 2026-10-17 16:23:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T16:23:36Z.


@yash27git I'm not a maintainer, so I can't merge or reject it; that decision is theirs. From my side there is nothing left open: on the RTX 3070 the current head passes, the test fails without the fix, and the two GPU tessellation tests pass, as in my last run above. A maintainer review is what it needs now.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236565875 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6236565875). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-17T16:23:36Z. --- @yash27git I'm not a maintainer, so I can't merge or reject it; that decision is theirs. From my side there is nothing left open: on the RTX 3070 the current head passes, the test fails without the fix, and the two GPU tessellation tests pass, as in my last run above. A maintainer review is what it needs now.
yash27git commented 2026-10-17 16:28:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yash27git on 2026-10-17T16:28:33Z.


@yash27git I'm not a maintainer, so I can't merge or reject it; that decision is theirs. From my side there is nothing left open: on the RTX 3070 the current head passes, the test fails without the fix, and the two GPU tessellation tests pass, as in my last run above. A maintainer review is what it needs now.

Thanks for the thorough testing and for clarifying the review status! I really appreciate the time you took to validate the current head, reproduce the regression without the fix, and check the related tessellation tests. I understand the final decision is up to the maintainers, so I'll wait for their review. Thanks again for your help and for confirming that everything looks good from your side!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236640290 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6551#issuecomment-6236640290). Originally posted by [yash27git](https://github.com/yash27git) on 2026-10-17T16:28:33Z. --- > @yash27git I'm not a maintainer, so I can't merge or reject it; that decision is theirs. From my side there is nothing left open: on the RTX 3070 the current head passes, the test fails without the fix, and the two GPU tessellation tests pass, as in my last run above. A maintainer review is what it needs now. Thanks for the thorough testing and for clarifying the review status! I really appreciate the time you took to validate the current head, reproduce the regression without the fix, and check the related tessellation tests. I understand the final decision is up to the maintainers, so I'll wait for their review. Thanks again for your help and for confirming that everything looks good from your side!
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!6551
No description provided.