Repository navigation
shader: keep mesh output rows with an integer element constant - #3825
Open
lukaslw-lab wants to merge 1 commit into
Open
lukaslw-lab wants to merge 1 commit into
lukaslw-lab wants to merge 1 commit into
Conversation
A DXIL signature row holds one interpolation mode, and integer elements are constant. The direct graphics translator made integer outputs constant and float outputs linear, so a guest row that packs a u32 and an f32 failed DXIL validation. Every element of an output row that holds a non-float element is now constant, which matches the flat attribute read of such a row on the guest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
Leyukaka
approved these changes
Dec 2, 2026
Leyukaka
left a comment
Collaborator
There was a problem hiding this comment.
Review of 50a90fd5. Read the diff; not built or run.
The change is limited to output rows in generic() (src/gfx1013_direct_graphics.inl:198-203). An output element now gets constant interpolation when its row also holds a non-system element that is not a float (component != 3). Before, only the integer element itself was constant. A float packed beside it stayed linear, and DXIL validation rejected the row. What I checked:
- Inputs are unchanged (
!input), so pixel-stage interpolation is not affected. - Float-only rows keep the caller's mode, and an integer element was already constant. A program that validated before cannot have an integer and a float in the same row, so programs that already translated keep the same signature.
- System elements are excluded on both sides: the loop skips
s.system, and the predicate checks!o.system. This matches the scope ofgeneric(). - The two new cases,
integer-rowandfloat-row, check the interpolation field ofTEXCOORDin the dumped signature (constant 1, linear 2). The description reports the failure with the source change reverted.
No changes requested. Approving 50a90fd5.
This was referenced Dec 2, 2026
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
Fixes #3824. In a direct mesh or vertex output signature, an element whose row also holds an integer element is now emitted with constant interpolation (
generic()insrc/gfx1013_direct_graphics.inl). Before, a float in such a row was linear, so DXIL validation rejected the row. Rows holding only floats are unchanged.Verification
Commit
50a90fd5on mainf365f125. Windows 10 19045, RTX 3080 Ti (driver 32.0.16.1047), in-box D3D12 runtime, DXC 1.9.2609, release preset.ctest --test-dir out/build/release -R '^native_direct_mesh$'signature element TEXCOORD at location (1,1) ... has interpolation mode that differs from another element packed into the same row.ctest --test-dir out/build/release -R '^native_|mesh|ngg|graphics' -j4(678 tests, on maine958b8e8)f365f125: 82 fail the same way (GPU tests on this host's in-box Win10 D3D12 runtime, e.g.CreatePipelineState 0x80070057). The 2native_indexed_pixel_texture_*tests skip on both after #3823.native_translator_corpus_iris flaky on plain main too (3 of 8 runs passed, 2 of 8 on this branch;incomplete or conflicting outputson a compute key).0dd65da1)Validation failed.programs now compile (1,036 → 1,039 OK); no other program changes outcometests/native_direct_mesh_check.py, built on the existing source-built container fixture:integer-row: u32COLOR.xand f32TEXCOORD.yin one row;TEXCOORDbecomes constant;float-row: two floats in one row;TEXCOORDstays linear.Evidence and follow-up
v_interp_mov_f32.Checklist
🤖 Generated with Claude Code