Native UI gradient draw leaves a diagonal gap in the color target #3133

Closed
opened 2026-11-27 16:28:02 +00:00 by github-bot · 2 comments
Owner

@⁠R0Y00 on GitHub · 2026-11-27 16:22 UTC · original

A native indexed UI gradient pass leaves a sharply bounded region uncovered. The artifact is already visible in the color target immediately after the draw, before text and presentation. A short recording-time vertex read uses a 12-byte stride. The reason for the missing coverage is open.

Build a public synthetic reproduction with an eight-vertex quad and edge ring, indexed triangle list, 12-byte vertex records, XY at +4, mask-controlled PS and RGBA8 target. Use the normal runtime entry and capture the bound vertex/index bytes, stream-output positions, and pre/post-draw pixels inside and outside the observed diagonal. Add a constant-color pixel shader control to distinguish coverage from sampling or blending. A synthetic stand-in is a proposed reproduction; reproducing the original symptom with it is part of the task.

Acceptance: identify the first differing stage, fix its shared implementation and add a regression checking both sides of the boundary. Report Windows build, adapter, driver, revision and debug-layer status. Target main. Use source-built or synthetic inputs only. Comment here to claim.

**@⁠R0Y00** on GitHub · 2026-11-27 16:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3131) A native indexed UI gradient pass leaves a sharply bounded region uncovered. The artifact is already visible in the color target immediately after the draw, before text and presentation. A short recording-time vertex read uses a 12-byte stride. The reason for the missing coverage is open. Build a public synthetic reproduction with an eight-vertex quad and edge ring, indexed triangle list, 12-byte vertex records, XY at +4, mask-controlled PS and RGBA8 target. Use the normal runtime entry and capture the bound vertex/index bytes, stream-output positions, and pre/post-draw pixels inside and outside the observed diagonal. Add a constant-color pixel shader control to distinguish coverage from sampling or blending. A synthetic stand-in is a proposed reproduction; reproducing the original symptom with it is part of the task. Acceptance: identify the first differing stage, fix its shared implementation and add a regression checking both sides of the boundary. Report Windows build, adapter, driver, revision and debug-layer status. Target main. Use source-built or synthetic inputs only. Comment here to claim.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 16:28:02 +00:00
Author
Owner

@⁠lambirou on GitHub · 2026-11-27 17:19 UTC · original

Claiming. Windows build 10.0.26300.10075, AMD Radeon RX 9060 XT (driver 32.0.32029.2010), MSVC 19.51, Windows SDK/DXC 10.0.26100.0.

Plan: a source-built eight-vertex quad plus edge ring (12-byte vertex records, XY at +4, indexed triangle list, mask-controlled PS, plus a constant-color control), through the normal runtime entry; capture the bound vertex/index bytes, stream-output positions and pre/post-draw pixels inside and outside the diagonal; identify the first differing stage, fix the shared implementation and add a regression checking both sides of the boundary. Target main.

**@⁠lambirou** on GitHub · 2026-11-27 17:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3131#issuecomment-7224272023) Claiming. Windows build 10.0.26300.10075, AMD Radeon RX 9060 XT (driver 32.0.32029.2010), MSVC 19.51, Windows SDK/DXC 10.0.26100.0. Plan: a source-built eight-vertex quad plus edge ring (12-byte vertex records, XY at +4, indexed triangle list, mask-controlled PS, plus a constant-color control), through the normal runtime entry; capture the bound vertex/index bytes, stream-output positions and pre/post-draw pixels inside and outside the diagonal; identify the first differing stage, fix the shared implementation and add a regression checking both sides of the boundary. Target main.
Author
Owner

@⁠lambirou on GitHub · 2026-11-27 18:02 UTC · original

Result: the described synthetic draw does not reproduce the diagonal gap, but it exposed a real defect in the shared indexed-rectangle rule.

  • Reproduction (tests/startup_rect_gap.cpp, startup_rect_gap_check.py): eight 12-byte records (mask at +0, XY at +4), two vertex-buffer views over the same records, an R16 indexed triangle list and a six-vertex rectangle list of the same quad and edge ring, a mask-controlled PS plus a constant-colour control, RGBA8 target, with and without back-face culling. Bound vertex/index bytes, the translated fetch and every pixel match the model. Both runtime backends reported the Microsoft Basic Render Driver, so this is a WARP result.
  • First differing stage: the indexed rectangle stage identified the right-angle corner only by axis alignment. A rectangle turned by 15 degrees matched no corner, the stage returned before emitting either triangle, and its region stayed clear (32/32 pixels). The vertex-stage expansion (v0 + v2 - v1) never had that restriction, so the two implementations disagreed.
  • Fix: also identify the corner opposite the diagonal (the longest edge), with the two sides required to meet at a right angle so a non-rectangle stays undrawn; the axis test keeps precedence. Applied to src/startup_stubs/indexed_rect_geometry.h and src/gfx1013_rect_geometry.cpp.
  • Evidence: startup_rect_geometry 2/2 (WARP + RX 9060 XT): rotated case 32/32 differing pixels before, 0/32 after; axis and swung orders unchanged; non-rectangle refusal kept. Existing rectangle regressions 6/6, docs link check 98 files. Debug layer unavailable on the host.

PR #3144 targets main. The exact #3133 pass is still unreproduced; docs/experiments/startup-rect-gap.md records three next candidates (a vertex view declaring fewer bytes than the indices name, a translated non-indexed indirect rectangle list keeping the three-vertices-per-rectangle count, and flat FPARAM taking the first vertex's value for both triangles instead of each provoking vertex).

**@⁠lambirou** on GitHub · 2026-11-27 18:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3131#issuecomment-7225049340) Result: the described synthetic draw does not reproduce the diagonal gap, but it exposed a real defect in the shared indexed-rectangle rule. - **Reproduction** (`tests/startup_rect_gap.cpp`, `startup_rect_gap_check.py`): eight 12-byte records (mask at +0, XY at +4), two vertex-buffer views over the same records, an R16 indexed triangle list and a six-vertex rectangle list of the same quad and edge ring, a mask-controlled PS plus a constant-colour control, RGBA8 target, with and without back-face culling. Bound vertex/index bytes, the translated fetch and every pixel match the model. Both runtime backends reported the Microsoft Basic Render Driver, so this is a WARP result. - **First differing stage**: the indexed rectangle stage identified the right-angle corner only by axis alignment. A rectangle turned by 15 degrees matched no corner, the stage returned before emitting either triangle, and its region stayed clear (32/32 pixels). The vertex-stage expansion (`v0 + v2 - v1`) never had that restriction, so the two implementations disagreed. - **Fix**: also identify the corner opposite the diagonal (the longest edge), with the two sides required to meet at a right angle so a non-rectangle stays undrawn; the axis test keeps precedence. Applied to `src/startup_stubs/indexed_rect_geometry.h` and `src/gfx1013_rect_geometry.cpp`. - **Evidence**: `startup_rect_geometry` 2/2 (WARP + RX 9060 XT): rotated case 32/32 differing pixels before, 0/32 after; axis and swung orders unchanged; non-rectangle refusal kept. Existing rectangle regressions 6/6, docs link check 98 files. Debug layer unavailable on the host. PR #3144 targets main. The exact #3133 pass is still unreproduced; `docs/experiments/startup-rect-gap.md` records three next candidates (a vertex view declaring fewer bytes than the indices name, a translated non-indexed indirect rectangle list keeping the three-vertices-per-rectangle count, and flat `FPARAM` taking the first vertex's value for both triangles instead of each provoking vertex).
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3133
No description provided.