Repository navigation
runtime: preserve raw vertex exports for computed barycentrics - #2
Closed
marcelofrayha wants to merge 1 commit into
Closed
marcelofrayha wants to merge 1 commit into
marcelofrayha wants to merge 1 commit into
Conversation
A decoded FP16 half can occupy the location of a missing raw attribute. Pass the original raw vertex exports to the geometry builder in eager and lazy PSO paths so computed I/J keeps zero-filling that attribute. Cover relocated and static half aliases independently of geometry-input packing. RT-BARY-FALLBACK-PER-VERTEX-RAW-EXPORTS. AI-assisted.
marcelofrayha
force-pushed
the
rt-bary-computed-raw-exports
branch
from
November 26, 2026 22:58
7f63a48 to
ac6f0ed
Compare
mrgenty
added a commit
that referenced
this pull request
Nov 26, 2026
… linking (RT-BARY-FALLBACK-PER-VERTEX) With both --bary-fallback and --f16-interp-fallback, create_graphics (and the lazy stage_words) links the f16 halves into the VS before the geometry stage is built. Linking may place a decoded half on a Location no raw VS output used; when that Location is a computed-I/J attribute the VS does not export, build_bary_fallback_gs read the half as that attribute and forwarded it instead of zero-filling the array. - link_f16_halves can return the Locations of the VS's raw outputs as they were before linking, and build_bary_fallback_gs forwards a computed-I/J attribute only from one of them. Both call sites pass the set when the halves were linked. - link_f16_halves also keeps halves off the second and third Locations of a per_vertex vec4[3] block, which has a Location decoration on its first only. spirv_bary_fallback_test 7f-7h: a relocated half and a static half on a missing attribute's Location (zero-filled; without the set the half is forwarded), and a block whose third Location linking would otherwise choose (the builder refused it). Reported, with a GPU reproduction, by @marcelofrayha in #2; the fix follows his commit 7f63a48, and the block reservation his bdff821, adapted to this branch without the geometry-input packing. Co-authored-by: Marcelo Frayha <marcelofrayha@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, this was a real bug and the reproduction made it easy to confirm. I took the raw-export fix and the |
3 of 4 tasks
mrgenty
pushed a commit
that referenced
this pull request
Nov 28, 2026
fix(gpu): resolve D3D12 error 646 in ambient depth binding
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-PER-VERTEX-RAW-EXPORTS
Depends on: ProjectLeonida#1930 (this PR targets its head branch), ProjectLeonida#1497, ProjectLeonida#1426.
This PR contains only the computed-I/J raw-export fix. The VS→GS packing change remains in robot00f/leonida#2 and is not included or required to reproduce this issue.
After FP16 linking, a decoded half can occupy the location of a missing raw VS attribute. The geometry shader could then forward that unrelated half to a computed-I/J array. Capture the VS's original raw Location→ID mapping before linking and use it for computed I/J; ordinary FP16 varyings still use their linked locations. Missing raw attributes stay zero-filled whether the half was relocated or left in a static VS slot.
Tested
spirv_bary_fallbackandspirv_f16_halves, including relocated and static half regressions. All 12 emitted synthetic modules passspirv-valfor Vulkan 1.2 and 1.3.git diff --checkandscripts/check_no_game_data.pypassed. The full translator semantic suite passed on the same translator sources (6,357 tests across 498 files); this PR changes only runtime code and tests. No retail shaders or game data used.GPUs tested: AMD Radeon RX 5700 XT (RADV Mesa 26.0.8, Linux / Wine 10.0) and Lavapipe (software).
AI-assisted: yes (OpenCode).