mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:10:51 +01:00
[PR #2304] runtime: forward mixed clip and cull distances in the fallback geometry shader #2307
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2307
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2304
Author: @ecox982745
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:reviewed-bary-mixed-distances📝 Commits (7)
e7987dbTranslate computed I/J pairs when a GPU has no per-vertex inputs.b9191a3Merge remote-tracking branch 'origin/main' into fix/computed-ij-no-pervertex483f012runtime/d3d12: synthesize --bary-fallback geometry shader in graphics PSOsb456a8cMerge branch 'pr-1497' into rt-bary-fallback-per-vertexfad05e2Merge branch 'pr-1426' into rt-bary-fallback-per-vertex07d0699runtime/d3d12: the --bary-fallback geometry stage feeds computed I/J pairs (RT-BARY-FALLBACK-PER-VERTEX)096a262runtime: forward mixed clip and cull distances in bary fallback📊 Changes
23 files changed (+2798 additions, -103 deletions)
View changed files
📝
docs/design.md(+3 -3)📝
docs/testing.md(+4 -1)📝
make_game.py(+22 -4)📝
runtime/CMakeLists.txt(+10 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+91 -7)📝
runtime/src/shader_library.h(+34 -0)➕
runtime/src/spirv_bary_fallback.h(+546 -0)➕
runtime/test/d3d12_bary_fallback_test.cpp(+1000 -0)📝
runtime/test/shader_library_test.cpp(+86 -0)📝
runtime/test/shaders/build.py(+9 -7)📝
runtime/test/shaders/check.py(+5 -4)➕
runtime/test/spirv_bary_fallback_test.cpp(+658 -0)📝
runtime/test/vk_test_device.h(+2 -0)📝
scripts/run_gpu_tests.py(+6 -5)📝
tests/semantic/support.py(+4 -2)📝
tests/semantic/test_interp_computed_ij.py(+153 -14)📝
tests/test_make_game_translator_flags.py(+20 -5)📝
tests/test_run_gpu_tests.py(+21 -18)📝
tests/test_shader_build_fallbacks.py(+22 -14)📝
tests/test_vk_subgroup_info.py(+14 -0)...and 3 more files
📄 Description
Claimed in the coordination issue as RT-BARY-FALLBACK-MIXED-DISTANCES.
Depends on: #1930 (which builds on #1426).
What changed
The fallback geometry shader now forwards both
ClipDistanceandCullDistancewhen a vertex shader writes both arrays. Each array keeps its own length. This allows the rasterizer to clip part of a primitive and to cull a whole primitive.ZroIsHere wrote the implementation and CPU test in mrgenty/leonida#1. This draft brings that work upstream at the request of the #1930 author. The published head is the original commit
096a26220. Review the two-file change.Verification
I reapplied the original commit locally on top of the updated #1930 head
682de2894. The resulting commitfcbc57c0dhas a byte-identical two-file diff and merges cleanly with main at73516a290.spirv-val --target-env vulkan1.2.git diff --checkboth passed. All fixtures were synthetic.Integration status
The public draft still points to
096a26220. GitHub rejected the rebased branch update because the dependency now includes upstream CI workflow changes and the connected OAuth app lacks theworkflowscope. The fallback change itself touches only the runtime shader builder and its test. To reproduce the verified rebase, cherry-pick096a26220onto682de2894. This draft is waiting on #1930 and publication of the rebased head.AI-assisted: Yes. The original author disclosed AI assistance. OpenAI Codex (GPT-6) performed independent hardware verification, prepared the rebase and submitted the upstream draft.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.