Crafter.Graphics/tests
catbot 65c19ea84a perf(ui): gate per-pixel clip compares behind a flags bit (#50)
uiResolveScreenPixel ran four float compares against hdr.clipRectPx for
every pixel of every UI dispatch, even though the clip rect is the
full-surface default {0,0,1e9,1e9} in the overwhelmingly common case.

Reserve the high bit of the header flags word (UI_FLAG_CLIP) and have
FillHeader set it only when the clip rect is narrower than the surface
(extracted into the unit-testable UIRenderer::ClipFlags). The shader
gates the compares on the bit; the branch is push-constant-uniform so it
never diverges. When the rect covers the surface the skipped compares
could never reject an in-surface pixel, so output is pixel-identical.

Mirrored on the WebGPU/WGSL path (dom-webgpu.js) for parity. Adds the
UIClipFlag CPU test covering the gate decision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:57:07 +00:00
..
BLASBuildOptions test(rt): headless device-buffer BuildProcedural + refit (#37) 2026-06-16 14:12:12 +00:00
FontAtlasDirtyRect perf(font): upload only the dirty sub-rect of the glyph atlas (#51) 2026-06-16 15:40:37 +00:00
FrameLoopSync feat(window): multi-frame-in-flight frame pacing (#40) 2026-06-16 15:37:11 +00:00
MemoryTypeFallback fix(device): add preferred mask + required-only fallback to GetMemoryType (#59) 2026-06-16 16:03:50 +00:00
MouseScroll feat(input): wire native mouse-wheel scroll on Wayland + Win32, normalize all backends to ±1/detent (#32) 2026-06-12 15:02:28 +00:00
PushConstantRewrite fix(vulkan-rt): configurable recursion depth + per-shader TLAS push for compute (#21) 2026-06-03 18:35:39 +00:00
ShapeTextCache perf(text): cache shaped runs in ShapeText (#52) 2026-06-16 15:40:52 +00:00
UIClipFlag perf(ui): gate per-pixel clip compares behind a flags bit (#50) 2026-06-16 16:57:07 +00:00