Repository navigation
runtime: pack barycentric geometry inputs for 64-component devices - #2
Open
marcelofrayha wants to merge 1 commit into
Open
marcelofrayha wants to merge 1 commit into
marcelofrayha wants to merge 1 commit into
Conversation
Link FP16 in the vertex/fragment namespace and compact the VS-to-GS edge independently on devices with low geometry input limits. Track typed pointer operand positions so numeric literals do not make unused inputs live. Cover the 64-component boundary and the literal-ID collision with synthetic tests. RT-BARY-FALLBACK-PACK-GS-INPUTS. Builds on the unused-input filtering proposed by ZroFreaks in robot00f#1.
marcelofrayha
marked this pull request as ready for review
November 26, 2026 19:55
This was referenced Nov 26, 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.
Claim: RT-BARY-FALLBACK-PACK-GS-INPUTS
Depends on: ProjectLeonida#1497 (this PR targets that branch). Based on the unused-input filtering proposed by @ZroIsHere in #1.
On RADV with a 64-component geometry input limit, applying the limit to the ordinary FP16 linker makes the combined barycentric/FP16 test fail before Vulkan pipeline creation: it needs two locations but finds none. Link FP16 first, then compact only the VS outputs consumed by the synthesized GS. Preserve the PS-facing layout and report genuinely over-limit interfaces. Both eager and lazy creation use the same linker.
The input-use scan follows pointer operand positions rather than raw words. The regression puts 15 live varyings plus Position at the 64-component limit and adds GLSL Exp2 (literal 29) alongside an unrelated unused input whose ID is 29. That literal must not count as a 16th varying.
Tested
spirv_bary_fallbackCPU suite, including the 64-component placement and literal-collision regressions.spirv-valfor both Vulkan 1.2 and 1.3.tests/test_bary_fallback_gs.py(29 tests),git diff --check, andscripts/check_no_game_data.py.d3d12_bary_fallbackunder Wine 10.0: eager and lazy modes pass on RADV and Lavapipe. All 256 pixels match in the combined FP16 case, and the basic barycentric and clipping checks still pass. The host Khronos validation layer was loaded; no errors were reported. No retail or corpus build.GPUs tested: AMD Radeon RX 5700 XT (RADV Mesa 26.0.8, Linux) with Lavapipe as the software control.
AI-assisted: yes (OpenCode).