Rect-list expansion for VS+PS pipelines #186

Closed
opened 2026-11-23 19:47:21 +00:00 by Kalmarv · 2 comments
Kalmarv commented 2026-11-23 19:47:21 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-23T19:47:21Z.


I am taking a bounded, independent implementation/test pass on the rect-list gap recorded in HANDOFF.md. On main 956a476bf, console IA topology 17 is mapped to TRIANGLELIST and PSO topology type 19 to TRIANGLE; the current code explicitly renders only the first half of each rectangle.

Scope: ordinary VS+PS pipelines, synthetic coverage and interpolation tests, and expansion that follows established vertex-order/provoking-vertex semantics. I will establish those semantics before choosing the expansion; no screen-space corner heuristic. Mesh/NGG and existing console geometry-shader pipelines are outside this initial scope.

Checked the current open PRs for overlapping rectangle expansion; found only contextual topology mappings in #162/#163/#170. Please flag any work coordinated elsewhere so I can avoid duplication.

No GPU result or fix is claimed yet. Planned local check: Windows / RTX 5070 Ti, synthetic inputs only, no game data. AI-assisted (Claude Code and Codex). Contribution tracking: https://github.com/Kalmarv/Leonida/issues/1

<!-- greyfinch-sync:ivall/xcl:issue:6567466008 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/189). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-23T19:47:21Z. --- I am taking a bounded, independent implementation/test pass on the rect-list gap recorded in HANDOFF.md. On main 956a476bf, console IA topology 17 is mapped to TRIANGLELIST and PSO topology type 19 to TRIANGLE; the current code explicitly renders only the first half of each rectangle. Scope: ordinary VS+PS pipelines, synthetic coverage and interpolation tests, and expansion that follows established vertex-order/provoking-vertex semantics. I will establish those semantics before choosing the expansion; no screen-space corner heuristic. Mesh/NGG and existing console geometry-shader pipelines are outside this initial scope. Checked the current open PRs for overlapping rectangle expansion; found only contextual topology mappings in #162/#163/#170. Please flag any work coordinated elsewhere so I can avoid duplication. No GPU result or fix is claimed yet. Planned local check: Windows / RTX 5070 Ti, synthetic inputs only, no game data. AI-assisted (Claude Code and Codex). Contribution tracking: https://github.com/Kalmarv/Leonida/issues/1
YeetSkillet commented 2026-11-24 07:04:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by YeetSkillet on 2026-11-23T20:03:32Z.


There is related downstream work. The fork author reports that depth-view and vertex/index-buffer fixes made the first menu visible on an RTX 5090. It was cut along the diagonal until build 5 expanded non-indexed rectangles. The fork documents the three positions and UVs it saw in a fullscreen pass. Build 4 result · Build 5 expansion

I used that corner order in a standalone native D3D12 test. Two runs on an RTX 3060 Ti and on WARP gave identical 64×64 RGBA8 readbacks. The pixel shader checked interpolated UV against the expected coordinate at every covered pixel.

Synthetic draw Pixels written / 4,096 Pixels with wrong UV
Original three corners as one triangle 2,016 0
Same triangle drawn three times 2,016 0
Rectangle as two triangles, one draw 4,096 0
Same rectangle with only the fourth corner’s UV deliberately wrong 4,096 2,016

The fixture covers one vertex order, float attributes and constant clip-space W. Provoking-vertex rules and flat attributes still need independent evidence.

A separate control held the two-triangle geometry and pipeline fixed. Copying zeroed vertices at bind time, then filling the original CPU array, produced 0 lit pixels. A fresh copy, or writing directly to the GPU-visible upload before submission, produced all 4,096. This gives a way to distinguish missing geometry from a late vertex write when investigating #186.

The available retail report gives a count of three draws per frame. An existing trace excerpt with the draw types, shader hashes, bound buffers and render-target IDs matched to the presented resource would let us identify those three individually. This test used only synthetic data.

<!-- greyfinch-sync:ivall/xcl:comment:7112492059 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/189#issuecomment-7112492059). Originally posted by [YeetSkillet](https://github.com/YeetSkillet) on 2026-11-23T20:03:32Z. --- There is related downstream work. The fork author reports that depth-view and vertex/index-buffer fixes made the first menu visible on an RTX 5090. It was cut along the diagonal until build 5 expanded non-indexed rectangles. The fork documents the three positions and UVs it saw in a fullscreen pass. [Build 4 result](https://github.com/theaustinayers/xcl/releases/tag/v0.1.0-mod.4) · [Build 5 expansion](https://github.com/theaustinayers/xcl/commit/73bd45a0645eb5859812ed7e7c4c17cddb351e89) I used that corner order in a standalone native D3D12 test. Two runs on an RTX 3060 Ti and on WARP gave identical 64×64 RGBA8 readbacks. The pixel shader checked interpolated UV against the expected coordinate at every covered pixel. | Synthetic draw | Pixels written / 4,096 | Pixels with wrong UV | | --- | ---: | ---: | | Original three corners as one triangle | 2,016 | 0 | | Same triangle drawn three times | 2,016 | 0 | | Rectangle as two triangles, one draw | 4,096 | 0 | | Same rectangle with only the fourth corner’s UV deliberately wrong | 4,096 | 2,016 | The fixture covers one vertex order, float attributes and constant clip-space W. Provoking-vertex rules and flat attributes still need independent evidence. A separate control held the two-triangle geometry and pipeline fixed. Copying zeroed vertices at bind time, then filling the original CPU array, produced 0 lit pixels. A fresh copy, or writing directly to the GPU-visible upload before submission, produced all 4,096. This gives a way to distinguish missing geometry from a late vertex write when investigating #186. The available retail report gives a count of three draws per frame. An existing trace excerpt with the draw types, shader hashes, bound buffers and render-target IDs matched to the presented resource would let us identify those three individually. This test used only synthetic data. - Run on Windows x64 with `python xcl-draw-probe.py.txt`. [xcl-draw-probe.py.txt](https://github.com/user-attachments/files/35297103/xcl-draw-probe.py.txt) - Per-adapter pixel counts and UV checks from the same probe. [xcl-draw-readbacks.json](https://github.com/user-attachments/files/35297102/xcl-draw-readbacks.json)
ivall commented 2026-11-24 07:04:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T20:58:06Z.


Status on main: rect lists of non-indexed vertex-buffer draws are drawn whole now. The CPU expansion from #195 (bind::draw_rects) makes the fourth corner as v0 + v2 - v1 per 4-byte word. Words equal in all three vertices are kept. Not covered: vertices a shader makes from the vertex index alone, and indexed draws. #199 does it with a generated GS instead and is waiting for a rebase on main. The semantics pass you describe would be useful on top of either: the provoking vertex, and whether the console's implied corner really is v0 + v2 - v1 for every vertex order.

<!-- greyfinch-sync:ivall/xcl:comment:7113813516 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/189#issuecomment-7113813516). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T20:58:06Z. --- Status on main: rect lists of non-indexed vertex-buffer draws are drawn whole now. The CPU expansion from #195 (`bind::draw_rects`) makes the fourth corner as v0 + v2 - v1 per 4-byte word. Words equal in all three vertices are kept. Not covered: vertices a shader makes from the vertex index alone, and indexed draws. #199 does it with a generated GS instead and is waiting for a rebase on main. The semantics pass you describe would be useful on top of either: the provoking vertex, and whether the console's implied corner really is v0 + v2 - v1 for every vertex order.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#186
No description provided.