Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
fdfawef324:claude/agc-tessellation-refusal-fields
Oct 18, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
fdfawef324:claude/agc-tessellation-refusal-fields

Conversation

@fdfawef324

@fdfawef324 fdfawef324 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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 fix(agc): accept fractional-even tessellation partitioning #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

…used tessellation draw

A tessellation draw whose domain, partitioning or output topology the
reference path does not support was refused with only VGT_SHADER_STAGES_EN,
so a log did not show which configuration was refused. The refusal now
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.
The fields come before the explanation, so the reason that the
APS5_CAPTURE_TRACE log cuts at 256 characters still holds all of them.

Field and enumerator names are those of Mesa's
src/amd/registers/gfx103.json (enums VGT_TESS_TYPE, VGT_TESS_PARTITION and
VGT_TESS_TOPOLOGY). A value with no name there is printed as a number only.
The accepted configurations are unchanged.

The new UnsupportedTessellationFieldTests drives DecodeState into the
refusal with power-of-two triangle and quad patches, an isoline domain,
line and point output and unnamed TYPE, PARTITIONING and TOPOLOGY values,
and checks the decoded fields of both registers, including the order of
the input and output control-point counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the agc libSceAgc* label Oct 14, 2026
@coltken95

Copy link
Copy Markdown

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

  • 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

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

@adriadam10

Copy link
Copy Markdown
Collaborator

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.

@oneandonlydean
oneandonlydean merged commit f834e24 into boykopovar:main Oct 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants