d3d12, test: pass device_.f16_half_top_location in lazy graphics pipeline stage_words (RT-LAZY-PIPELINE-F16-TOP-LOCATION) #1953
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1953"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T16:37:35Z.
Summary
In
runtime/shims/d3d12_vulkan_device.cpp:stage_words(), passdevice_.f16_half_top_locationwhen re-linking--f16-interp-fallbackhalves vialeonida::link_f16_halves(), matchingcreate_graphics()at line 8482.Previously,
stage_words()omitted the 6thtop_locationargument, causing it to default to 29. On devices wheremaxVertexOutputComponents < 124(e.g. 64 components ->top_location = 14), lazy pipeline compilation could relocate vertex output locations beyond the hardware capability limit.Validation
runtime/test/spirv_f16_halves_test.cppverifying that customtop_location = 14correctly bounds relocated output locations to<= 14.spirv_f16_halves_testpass.test_text_write_line_endings.py.check_no_game_data.pyclean; synthetic tests only, no game assets or GPU required.AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T19:22:11Z.
The bug is real and the fix is right: the eager path passes the device's limit, while the lazy
stage_words()path falls back to 29.But check #11 calls
link_f16_halves(..., 14)directly, whichmainalready supports, so it passes without the fix. Please add a test that goes through the lazy path with a low top location. Alternatively, move the link into one helper that both paths call, and test that.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T21:26:57Z.
Thanks @aslan2142! Updated in 34dff91b1:
untime/test/d3d12_f16_halves_test.cpp:
db1a22d29).Verified locally on NVIDIA GeForce RTX 5060 Ti:
AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T22:06:46Z.
Thanks, the helper is the right shape: both paths now pass the device's top location.
stage_words()call to the old one and rand3d12_f16_halveson lavapipe and RADV (gfx1036): it passes. Overridingf16_half_top_locationto 14 changes what the runtime believes, but the device still accepts location 29, so the old code renders correctly too.Location, expected at or below 14.main: no test went from pass to fail.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T22:25:41Z.
Thank you for the excellent suggestion @aslan2142! Updated in commit
8dc07b3a4:t::d3d12::pipeline_stage_words()\ inspection helper for lazy pipelines.
AI-assisted (Claude Code, Claude Opus 5.5).