Repository navigation
shader: derive fixed slot 57 interfaces from PSI1 entries - #3532
Merged
Merged
Conversation
lukaslw-lab
approved these changes
Nov 30, 2026
lukaslw-lab
left a comment
Contributor
There was a problem hiding this comment.
Reviewed a7374bd0 by reading the diff; not built or run.
Verdict: approve. The no-sidecar branch admits only the two address forms the reflected path already accepts (2, 0x8002) and 1–7 interpolants. The raw frontend still checks every VGPR use, and the post-link check refuses TEXCOORD rows beyond the captured count. No MUST.
- SHOULD tighten the packed-position assertion (
tests/native_fixed_graphics_psi1_check.py:82):"SV_Position" in dump or "loadInput" in dumpalso passes for a PS that reads only TEXCOORD, so it does not prove that 0x8002 reached the packed XY input. AssertSV_Positionalone. - SHOULD note the overlap with #3527. Both edit the PSI1 block of
prepare_direct_graphics, andgit merge-treeof the two heads conflicts insrc/direct_compute_cache.cpp. Whichever merges second needs a rebase. The two branches are disjoint (!reflectedhere, the reflected zero-count case there), so the resolution should be mechanical. - NIT
r.kind == 28(src/direct_compute_cache.cpp:793): a named constant or a short comment (barycentrics) would help. The reflected loop below also requiresinterpolation == 2for it, but the new loop skips any kind-28 input. - Checked: the reflected path is unchanged; the
entry/pixel_entryhandoff matches the reflectedpsin1record; the channel reconciliation now runs only with companions (:799). - Scope: this does not cover issue #3560 (ADDR 0x8080, NUM_INTERP 0). That entry has an interface sidecar in our catalog caches, so it stays on the reflected path, and without one it would now be refused as "unsupported fixed pixel entry layout". The behaviour stays the same; the PR is still correct for its own case.
Tests: native_fixed_graphics_psi1 reaches the new branch with positive cases (centre, cache hit, packed) and negative controls for each new refusal: address, control, over-count, and the unallocated packed VGPR (the raw frontend's own check). It is not in the pr preset filter and needs DXC, so CI did not run it. The author's local Release run is the only evidence so far.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A fixed slot 57 pixel entry (
PSI1+SPI_PS_INPUT_ADDR+SPI_PS_IN_CONTROL) can arrive without a reviewed.cdxilsidecar.prepare_direct_graphicstreated any PSI1 entry without reflected stage interfaces as unsupported and threwfixed graphics entry requires matching stage interfaces, so a valid fixed VS/PS pair never reached the raw frontend.Change
2or0x8002, with 1 to 7 interpolants, and build thepsin1record the reflected path would hand to the raw frontend.native_fixed_graphics_psi1, a source-built fixture covering center and packed position, cache reuse, bad address/control masks, over-counted interpolation, and an unallocated packed-position VGPR.Refs #3385 (the no-sidecar branch of the PSI1 refusal; #3410 covered the
.ps57infallback).Tests
Windows x64, Release /O2, MSVC 19.44.35228.0, Windows SDK 10.0.26100.0, DXC 10.0.26100.0.
Results:
native_fixed_graphics_psi1: 1/1 passed (0.64 s).native_graphics_interface_libraryandnative_direct_container: 2/2 passed (1.05 s and 29.04 s).native_fixed_graphics_psi1invokescompile_dxilonly and has no adapter parameter; it does not create a D3D12 device.AI-assisted.
CI on a7374bd (run 46337559646): Windows pass (3m08s), Linux Python checks pass (3m04s), gfx1013 fixture assembly pass (2m50s); Release /O2 skipping by PR configuration.