Repository navigation
shader: support packed screen position in fixed slot 57 draws - #3601
Merged
Merged
Conversation
Refs R0Y00#3560. Verify native slot 57 rendering and refusal with source-built data. AI-assisted.
lukaslw-lab
approved these changes
Nov 30, 2026
lukaslw-lab
left a comment
Contributor
There was a problem hiding this comment.
Reviewed ce7eb9d3 by reading the diff; not built or run.
Verdict: approve. The 0x8080 / NUM_INTERP 0 entry is admitted only for the shape the lowering supports. Other addresses and counts are still refused. No MUST.
- Checked, no finding:
packed_position_only(src/direct_compute_cache.cpp:778) bypasses only the two address/count refusals (:786,:817) and the reflected PARAM linking (:883). The post-link check (:867-874) then requires exactly one input:SV_Positionwith X and Y used, as noperspective float. A raw read ofv0(bit 7) still reachesunsupported pixel entry VGPR(src/gfx1013_direct_graphics.inl:199).0x8080with one interpolant, and0x0080, are still refused. - Real pass from #3560 (key
05dc00b8b79c1d4b): in the published translation of the same pixel program (plain key7b25dcce8b9a69e8), the program writesv0before reading it and reads onlyv1, both 16-bit halves (X and Y). That is the shape this PR admits. Whether the rest of that program clears the native frontend is the matched replay the PR lists as follow-up. - SHOULD
startup_native_slot57_packed_position_check.py:67asserts that there is nosev=0/1debug line. But nothing checks that the debug layer is present, and the body says it was unavailable in the runs listed. So the "no debug-layer error" part has not been exercised yet. Either require the layer (skip with 77 without it), or say in the docs that the check passes vacuously without it. - NIT No control pins the
v0refusal under0x8080(a pixel that readsv0).
Tests: native_fixed_graphics_psi1 proves acceptance (cold and warm cache, a non-exact catalog pair) and the four refusals (missing POS_FIXED_PT, nonzero count, wrong VGPR, unused position). startup_native_slot57_packed_position_{warp,hardware} proves the coordinate gradient and that the wrong-address pipeline is refused. CI did not run them: the pr preset's include filter in CMakePresets.json matches neither. The runs listed in the body are the only ones 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.
Change
Refs #3560. Accept the fixed slot 57
PSI1layout0x8080withNUM_INTERP=0through the native C++ packed-position lowering. The pixel shader must consumeSV_PositionX and Y as its only input. This covers raw pairs and non-exact reviewed catalog pairs. #3527 touches the adjacent fixed-entry validation.The source-built runtime fixture verifies 16 coordinate-colored pixels and 16 clear pixels for each draw. Invalid address metadata refuses the pipeline and leaves all 32 pixels clear. Compiler controls cover cold and warm cache paths, wrong register, contradictory count, and unused position.
Verification
Commit
ce7eb9don077bff3a. Windows 11 build 26200, MSVC 19.44.35230, DXC from Windows SDK 10.0.26100.0. RTX 5080 driver 32.0.16.2140 and in-box WARP 10.0.26100.9818. D3D12 debug layer unavailable.Five Release and five Debug checks passed with zero capability skips. The baseline compiler and WARP runtime refused the fixed layout. Swapping X and Y in a temporary fixture failed pixel readback on both adapters.
Follow-up
The captured startup pass still needs a matched replay. All materials in this PR are source-built.
AI-assisted.