You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Impeller] framebuffer_blend.frag checks supports_decal > 1 instead of > 0.0, always taking the software decal fallback #196266
(Compare with advanced_blend.frag, porter_duff_blend.frag, and vertices_uber.glsl, which all check if (supports_decal > 0.0).)
Impact
Because supports_decal is at most 1.0, supports_decal > 1 always evaluates to false, causing framebuffer_blend.frag to unconditionally fall back to IPSampleDecal(texture_sampler, texture_coords) even when hardware SamplerAddressMode::kDecal is supported and configured on the sampler:
Unnecessary shader work: Every fragment executes the software [0, 1) UV bounds check in IPSampleDecal.
Unintended -0.475 mip bias: IPSampleDecal samples with kDefaultMipBias (-0.475). When drawing a downscaled mipmapped image (FilterQuality.medium/DlImageSampling::kMipmapLinear) with an advanced blend mode on a device that supports both framebuffer fetch and hardware decal addressing, the -0.475 LOD bias shifts mip selection toward a higher-resolution mip level than intended.
Expected Behavior
framebuffer_blend.frag should check if (supports_decal > 0.0) so that it samples texture(texture_sampler, texture_coords) directly when hardware decal addressing is supported.
Activity
Fix supports_decal check in framebuffer_blend.frag (flutter#196227)