d3d12: expand IA-selected rectangles on triangle-family PSOs (RT-IA-RECTANGLE-VARIANT) #722
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!722
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/722/head"
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?
@Rain156 on GitHub · 2026-11-24 12:55 UTC · original
Rain156:fix/ia-rectangle-triangle-pso-20261124→main· +374 −2 · 5 files · 2 commits · merged 2026-11-25 02:33 UTCClaimed in the coordination issue as: RT-IA-RECTANGLE-VARIANT (claim).
Depends on: #682
What and why
The first-run UI compositor binds a triangle-family graphics pipeline, then selects Xbox rectangle-list topology (17) on the input assembler. The three submitted corners drew one triangle. In a 3840 × 2160 pass, this left half the output untouched.
Replay now selects a pipeline variant with a generated geometry stage for that draw. The variant cache distinguishes rectangle expansion and the unbound attachment mask. Triangle draws on the same PSO keep their original pipeline. PSOs with the same linked vertex program share the snapshot used to build the geometry stage on first use.
The first commit carries only tedin7’s geometry generator from #207 / #682, byte-for-byte, so this can build against current main. The second commit contains the draw-time selection and its regression. The explicit type-19 PSO and quad-list implementation are tracked in #682.
Tested
51f316092with the new synthetic GPU test fails at pixel (0, 32) on the first rectangle draw. On this branch, the same PSO alternates rectangle and triangle draws twice. All 4,096 target pixels match on each frame. The regression also passes with the Khronos validation layer and synchronization validation enabled. Runctest --test-dir <build> -C RelWithDebInfo -R ^d3d12_translated_draw$ --output-on-failureon a Vulkan-enabled Windows runtime build.d3d12_vulkan_devicefailure reproduced on clean main on this adapter, with identical HRESULT differences for committed-resource flags0x200and0x400.llvm-mcwith a backslash-delimited Windows path passed all nine tests when rerun with a forward-slashLLVM_MCpath. Viewer streaming passed 57/57 and documentation links passed 16/16.git diff --checkpass. Local merge checks against current main and #682 are clean.GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 x64 build 26200 (MSVC RelWithDebInfo).
AI-assisted: Yes (Codex).
Checklist
mainand merges cleanly.@abnalstlll-byte on GitHub · 2026-11-24 13:16 UTC · original · approved these changes
LGTM. Excellent GPU-level emulation of Xbox rectangle lists (topology 17) via geometry-stage expansion on triangle-family PSOs (
ect_list_geometry.h). Verified with translated draw pixel tests in d3d12_translated_draw_test.cpp and documented in docs/d3d12_vulkan.md.
@BadgersMC on GitHub · 2026-11-24 13:24 UTC · original
Independent native Windows pixel check on RTX 3060 Ti (driver 610.88, Windows 11 build 26100, MSVC 19.44, Khronos Vulkan validation 1.4.369).
I used the same
d3d12_translated_drawtest source from #722 in all runs:LEONIDA_LAZY_PSO51f316092plus the test source0rectangle draw mismatch at (0, 32) in frame 2c55ecc9cb0c55ecc9cbmerged with #51188658f1b01The merge was clean (tree
5ca657a39667aceb1c5e3faf90b786c1cb9f515e). In each passing run, the new test alternated two rectangle draws and two triangle controls on the same PSO, comparing all 4,096 target pixels on each frame. Vulkan validation was enabled and the passing runs reported zero validation errors. Both synthetic shaders passedspirv-val.This covers the IA-selected rectangle variant with #511 enabled, using synthetic inputs. AI-assisted.