fix(agc): print the VGT_TF_PARAM and VGT_LS_HS_CONFIG fields of a refused tessellation draw #6129

Merged
fdfawef324 merged 1 commit from upstream-pr/6129 into main 2026-10-18 13:54:52 +00:00
fdfawef324 commented 2026-10-14 22:53:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-14T22:53:52Z.


What

A tessellation draw whose domain, partitioning or output topology the reference path does not support was refused with only VGT_SHADER_STAGES_EN:

AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path

The same message covers an isoline domain, power-of-two partitioning, point or line output and the reserved encodings, so a log did not show which configuration was refused. Resident Evil 4 stops on this refusal.

  • The refusal now also prints VGT_TF_PARAM with TYPE, PARTITIONING and TOPOLOGY, and VGT_LS_HS_CONFIG with NUM_PATCHES, HS_NUM_INPUT_CP and HS_NUM_OUTPUT_CP, for example:

    AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: VGT_TF_PARAM=0x40045 (TYPE=1 TESS_TRIANGLE, PARTITIONING=1 PART_POW2, TOPOLOGY=2 OUTPUT_TRIANGLE_CW), VGT_LS_HS_CONFIG=0xc355 (NUM_PATCHES=85, HS_NUM_INPUT_CP=3, HS_NUM_OUTPUT_CP=3): only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path
    
  • The fields come before the explanation because the APS5_CAPTURE_TRACE log cuts the reason at 256 characters (PacketExecution.cpp, reason=%.256s). Up to the end of VGT_LS_HS_CONFIG the message is at most 240 characters, so the trace keeps every field; the [gpu] driver failure line on stderr prints the whole message.

  • Field and enumerator names are those of Mesa's src/amd/registers/gfx103.json (VGT_TF_PARAM, VGT_LS_HS_CONFIG, enums VGT_TESS_TYPE, VGT_TESS_PARTITION, VGT_TESS_TOPOLOGY). A value with no name there (TYPE 3, PARTITIONING or TOPOLOGY 4-7) is printed as a number only.

  • The printed values are the fields the decoder already extracts; which configurations are accepted is unchanged. After #5402 the reference path accepts triangle and quad domains with integer, fractional-odd and fractional-even partitioning and clockwise or counter-clockwise triangle output; this PR implements no new mode.

Tested

Windows Server 2025 (10.0.26100), MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 3060 (driver 591.86), on main at 6239ceffc.

  • agc_driver_graphics: new UnsupportedTessellationFieldTests drives DecodeState into the refusal with VGT_TF_PARAM power-of-two triangle and quad patches, an isoline domain, line and point output, TYPE 3 and PARTITIONING 4 with TOPOLOGY 7, and with VGT_LS_HS_CONFIG 0xc355 and 0x1033f (3 input and 4 output control points, which checks the order), and checks that the message holds VGT_SHADER_STAGES_EN, then the decoded fields, then the explanation. It fails without the change (unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains ... supported by the reference path) and passes with it (under 15 s for the whole executable; six runs here took 10.0 to 11.5 s).
  • agc_driver_tessellation, agc_driver_alpha_to_coverage_state, agc_driver_undithered_alpha_to_coverage_state and agc_sparse_buffer_holes pass on the RTX 3060.
  • No title was run.

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: none (Resident Evil 4 still stops on this refusal; the log now names its configuration)
  • GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4865659289 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6129). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-14T22:53:52Z. --- ### What A tessellation draw whose domain, partitioning or output topology the reference path does not support was refused with only `VGT_SHADER_STAGES_EN`: ``` AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path ``` The same message covers an isoline domain, power-of-two partitioning, point or line output and the reserved encodings, so a log did not show which configuration was refused. Resident Evil 4 stops on this refusal. - The refusal now also prints `VGT_TF_PARAM` with `TYPE`, `PARTITIONING` and `TOPOLOGY`, and `VGT_LS_HS_CONFIG` with `NUM_PATCHES`, `HS_NUM_INPUT_CP` and `HS_NUM_OUTPUT_CP`, for example: ``` AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: VGT_TF_PARAM=0x40045 (TYPE=1 TESS_TRIANGLE, PARTITIONING=1 PART_POW2, TOPOLOGY=2 OUTPUT_TRIANGLE_CW), VGT_LS_HS_CONFIG=0xc355 (NUM_PATCHES=85, HS_NUM_INPUT_CP=3, HS_NUM_OUTPUT_CP=3): only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path ``` - The fields come before the explanation because the `APS5_CAPTURE_TRACE` log cuts the reason at 256 characters (`PacketExecution.cpp`, `reason=%.256s`). Up to the end of `VGT_LS_HS_CONFIG` the message is at most 240 characters, so the trace keeps every field; the `[gpu] driver failure` line on stderr prints the whole message. - Field and enumerator names are those of Mesa's [`src/amd/registers/gfx103.json`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-24.0.0/src/amd/registers/gfx103.json) (`VGT_TF_PARAM`, `VGT_LS_HS_CONFIG`, enums `VGT_TESS_TYPE`, `VGT_TESS_PARTITION`, `VGT_TESS_TOPOLOGY`). A value with no name there (`TYPE` 3, `PARTITIONING` or `TOPOLOGY` 4-7) is printed as a number only. - The printed values are the fields the decoder already extracts; which configurations are accepted is unchanged. After #5402 the reference path accepts triangle and quad domains with integer, fractional-odd and fractional-even partitioning and clockwise or counter-clockwise triangle output; this PR implements no new mode. ### Tested Windows Server 2025 (10.0.26100), MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 3060 (driver 591.86), on `main` at `6239ceffc`. - `agc_driver_graphics`: new `UnsupportedTessellationFieldTests` drives `DecodeState` into the refusal with `VGT_TF_PARAM` power-of-two triangle and quad patches, an isoline domain, line and point output, `TYPE` 3 and `PARTITIONING` 4 with `TOPOLOGY` 7, and with `VGT_LS_HS_CONFIG` 0xc355 and 0x1033f (3 input and 4 output control points, which checks the order), and checks that the message holds `VGT_SHADER_STAGES_EN`, then the decoded fields, then the explanation. It fails without the change (`unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains ... supported by the reference path`) and passes with it (under 15 s for the whole executable; six runs here took 10.0 to 11.5 s). - `agc_driver_tessellation`, `agc_driver_alpha_to_coverage_state`, `agc_driver_undithered_alpha_to_coverage_state` and `agc_sparse_buffer_holes` pass on the RTX 3060. - No title was run. ### 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 (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: none (Resident Evil 4 still stops on this refusal; the log now names its configuration) - [x] GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
coltken95 commented 2026-10-15 00:20:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-15T00:20:11Z.


Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with d42f4963e merged into main ab9a47684:

  • With the PR: all 8 tests built from the changed test file pass (agc_driver_graphics and the others in the same executable).
  • With main's Graphics/src/State.cpp: agc_driver_graphics fails with AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path; the other 7 pass.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6181426594 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6129#issuecomment-6181426594). Originally posted by [coltken95](https://github.com/coltken95) on 2026-10-15T00:20:11Z. --- Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with d42f4963e merged into main ab9a47684: - With the PR: all 8 tests built from the changed test file pass (`agc_driver_graphics` and the others in the same executable). - With main's `Graphics/src/State.cpp`: `agc_driver_graphics` fails with `AGC graphics: VGT_SHADER_STAGES_EN=0x200210d: only triangle and quad domains with integer, fractional-even or fractional-odd partitioning and triangle output are supported by the reference path`; the other 7 pass. AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-15 12:15:12 +00:00 (Migrated from github.com)

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


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 6612 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp L905-925

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 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4650 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5500 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5999 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6472 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6529 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6535 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6563 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6741 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6987 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6989 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6995 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7002 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7426 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191805244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6129#issuecomment-6191805244). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:15:12Z. --- <!-- 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 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` [L905-925](https://github.com/boykopovar/AnyPS5/blob/385ed71f2cfa8d67ff466d050d5e88e136d3ec28/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L905-L925) | | | 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 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `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/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5999](https://www.github.com/boykopovar/AnyPS5/pull/5999) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6472](https://www.github.com/boykopovar/AnyPS5/pull/6472) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6741](https://www.github.com/boykopovar/AnyPS5/pull/6741) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `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 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7426](https://www.github.com/boykopovar/AnyPS5/pull/7426) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` |
adriadam10 commented 2026-10-16 23:44:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T23:44:05Z.


Checked the diff: the refusal condition is unchanged, only the message gains VGT_TF_PARAM and VGT_LS_HS_CONFIG fields (front-loaded so the 256-char trace keeps them). UnsupportedTessellationFieldTests fails against main's State.cpp and covers unnamed encodings and the control-point order; also confirmed by @coltken95 on Linux/lavapipe. Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6226789268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6129#issuecomment-6226789268). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T23:44:05Z. --- Checked the diff: the refusal condition is unchanged, only the message gains `VGT_TF_PARAM` and `VGT_LS_HS_CONFIG` fields (front-loaded so the 256-char trace keeps them). `UnsupportedTessellationFieldTests` fails against `main`'s `State.cpp` and covers unnamed encodings and the control-point order; also confirmed by @coltken95 on Linux/lavapipe. 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!6129
No description provided.