Commit b9630a5
committed
VULKAN: Fix SDR font pipeline topology (fixes HDR font artifacts)
The SDR font pipeline introduced in 8fa8418 was created with
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP instead of TRIANGLE_LIST.
The font and alpha_blend pipelines require TRIANGLE_LIST
topology for indexed quad rendering (indices [0,1,2,2,1,3] per
quad). The initial topology is set to TRIANGLE_LIST at line
3321, and the original font pipeline at line 3451 inherits it
correctly.
However, the SDR pipeline creation block runs after the menu
shader loop (lines 3514-3646), which sets input_assembly.topology
to TRIANGLE_STRIP in its last iteration (i=11, topology = i&1 =
STRIP). The SDR font pipeline at line 3678 inherited this stale
STRIP topology.
With TRIANGLE_STRIP, the indexed [0,1,2,2,1,3] pattern produces
degenerate triangles and incorrect winding, causing subtle glyph
positioning artifacts visible as ~1px character shifts in the
Ozone menu under Vulkan HDR. The effect was most noticeable on
characters with vertical strokes ('l', 'n', 'd') and punctuation.
Fix: reset input_assembly.topology to VK_PRIMITIVE_TOPOLOGY_
TRIANGLE_LIST before creating the SDR font and alpha_blend
pipelines.
Only affects HDR builds with VK_CTX_FLAG_HDR_SUPPORT set.
Non-HDR path is unchanged.1 parent 9efc73f commit b9630a5
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3656 | 3656 | | |
3657 | 3657 | | |
3658 | 3658 | | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
3659 | 3664 | | |
3660 | 3665 | | |
3661 | 3666 | | |
| |||
0 commit comments