Skip to content

ps_interp_modes: correct the barycentrics/shading-rate SemanticKinds - #8202

Open
bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/ps-interp-system-kinds
Open

bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/ps-interp-system-kinds

Conversation

@bobcatchris

Copy link
Copy Markdown
Contributor

Implements ABilenduke's unclaimed part-3 finding on #7333 (checked board #8047 and open PRs: #4838 covers chunk bounds/ISG1, not this constant).

tools/ps_interp_modes.py SYSTEM_KINDS mapped 25/26 to barycentrics/shading-rate, but in dxc's DxilConstants.h those kinds are 28/29 — 25/26 are TessFactor/InsideTessFactor. As a result a real SV_Barycentrics or SV_ShadingRate input was classed by interpolation mode and could get an SPI_PS_INPUT_ENA bit, while tessellation kinds were silently treated as system values.

Tested on Apple M2 / Python 3.13.18: two new constant/behavior tests fail on current main (1 failure, 1 error) and pass on this head; python -I tests/test_ps_interp_modes.py OK. No game data.

AI-assisted.

Barycentrics and ShadingRate are SemanticKind 28/29 in dxc's DxilConstants.h;
25/26 are TessFactor/InsideTessFactor. The wrong constants classed the
tessellation kinds as system inputs and left the real ones as interpolation
mode bits. Two regression tests fail on main and pass here; full test file OK.

AI-assisted.
@YordiLorenzo

Copy link
Copy Markdown

Tested 874d069 on Linux, Python 3.12.16: pass

  • python -I tests/test_ps_interp_modes.py: 32 tests OK
  • same file on main: 1 failure, 1 error (the two new SystemKindConstants tests)
  • 28/29 Barycentrics/ShadingRate and 25/26 TessFactor/InsideTessFactor match dxc's SemanticKind enum

@molodayamama

Copy link
Copy Markdown

Windows verification at 874d0692c1a2103763cf86d600e2d999ef0601f5: all 32 interpolation tests passed. I cross-checked the values against DXC's SemanticKind enum. Values 28 and 29 are Barycentrics and ShadingRate, and 25 and 26 are TessFactor and InsideTessFactor. The synthetic regression confirms that 28 and 29 take the system-input classification.

AI-assisted verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants