Skip to content

runtime: pack barycentric geometry inputs for 64-component devices - #2

Open
marcelofrayha wants to merge 1 commit into
robot00f:feat/rt-bary-fallback-psofrom
marcelofrayha:rt-bary-fallback-pack-gs-inputs
Open

marcelofrayha wants to merge 1 commit into
robot00f:feat/rt-bary-fallback-psofrom
marcelofrayha:rt-bary-fallback-pack-gs-inputs

Conversation

@marcelofrayha

@marcelofrayha marcelofrayha commented Nov 26, 2026 •

Copy link
Copy Markdown

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_fallback CPU suite, including the 64-component placement and literal-collision regressions.
  • 11 generated synthetic modules pass spirv-val for both Vulkan 1.2 and 1.3.
  • tests/test_bary_fallback_gs.py (29 tests), git diff --check, and scripts/check_no_game_data.py.
  • d3d12_bary_fallback under 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).

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
marcelofrayha marked this pull request as ready for review November 26, 2026 19:55
@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant