draw-improvements #17

Merged
zack merged 2 commits from draw-improvements into master 2026-04-24 07:57:44 +00:00
Showing only changes of commit 7bd45e9f56 - Show all commits

View File

@@ -37,10 +37,13 @@ All SDF shapes produce mathematically exact curves with analytical anti-aliasing
no tessellation, no piecewise-linear approximation. A rounded rectangle is 1 primitive (80 bytes) no tessellation, no piecewise-linear approximation. A rounded rectangle is 1 primitive (80 bytes)
instead of ~250 vertices (~5000 bytes). instead of ~250 vertices (~5000 bytes).
The fragment shader's estimated register footprint is ~2026 VGPRs, with Ring_Arc being the The fragment shader's estimated register footprint is ~2023 VGPRs via static live-range analysis.
heaviest shape kind (pre-computed edge normals and branchless wedge evaluation require more live RRect and Ring_Arc are roughly tied at peak pressure — RRect carries `corner_radii` (4 regs) plus
values than RRect's sdRoundedBox). Comfortably under the 32-register occupancy cliff on mobile `sdRoundedBox` temporaries, Ring_Arc carries wedge normals plus dot-product temporaries. Both land
Mali and Adreno, and well under desktop architectures' higher limits. comfortably under Mali Valhall's 32-register occupancy cliff (G57/G77/G78 and later) and well under
desktop limits. On older Bifrost Mali (G71/G72/G76, 16-register cliff) either shape kind may incur
partial occupancy reduction. These estimates are hand-counted; exact numbers require `malioc` or
Radeon GPU Analyzer against the compiled SPIR-V.
MSAA is opt-in (default `._1`, no MSAA) via `Init_Options.msaa_samples`. SDF rendering does not MSAA is opt-in (default `._1`, no MSAA) via `Init_Options.msaa_samples`. SDF rendering does not
benefit from MSAA because fragment coverage is computed analytically. MSAA remains useful for text benefit from MSAA because fragment coverage is computed analytically. MSAA remains useful for text