perf(shaders): drop nonuniformEXT on text font slots #80

Merged
catbot merged 1 commit from claude/issue-49 into master 2026-06-16 17:29:51 +02:00

View file

@ -36,9 +36,12 @@ void main() {
vec2 t = (sp - it.rect.xy) / it.rect.zw; vec2 t = (sp - it.rect.xy) / it.rect.zw;
vec2 uv = mix(it.uv.xy, it.uv.zw, t); vec2 uv = mix(it.uv.xy, it.uv.zw, t);
// Font slots are push constants — provably dynamically uniform, so no
// nonuniformEXT: lets the compiler hoist the descriptor load out of the
// per-pixel glyph loop and avoid the divergent-descriptor path.
float sdf = texture( float sdf = texture(
sampler2D(uiTextures[nonuniformEXT(pc.fontTextureSlot)], sampler2D(uiTextures[pc.fontTextureSlot],
uiSamplers[nonuniformEXT(pc.fontSamplerSlot)]), uiSamplers[pc.fontSamplerSlot]),
uv uv
).r; ).r;