Commit 07d5cfbb authored by Jamie Nicol's avatar Jamie Nicol Committed by Pier Angelo Vendrame
Browse files

Bug 1941154 - Use shader to clear alpha targets on Adreno 510. a=diannaS DONTBUILD

Recent refactoring of render target initialization caused stale
contents of alpha render targets to be used as clip masks instead of
valid masks on Adreno 510 devices. Presumably we were fortunate not to
be hitting this previously, and it was regressed by a subtle
accidental behavioural change introduced by the refactor. Using quads
to clear alpha targets appears to be the most robust way of avoiding
it.

Original Revision: https://phabricator.services.mozilla.com/D260105

Differential Revision: https://phabricator.services.mozilla.com/D260301
parent 6dab0f3e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1819,7 +1819,10 @@ impl Device {
        // On Mali-Txxx devices we have observed crashes during draw calls when rendering
        // to an alpha target immediately after using glClear to clear regions of it.
        // Using a shader to clear the regions avoids the crash. See bug 1638593.
        let supports_alpha_target_clears = !is_mali_midgard(&renderer_name);
        // On Adreno 510 devices we have seen garbage being used as masks when clearing
        // alpha targets with glClear. Using quads to clear avoids this. See bug 1941154.
        let is_adreno_510 = renderer_name.starts_with("Adreno (TM) 510");
        let supports_alpha_target_clears = !is_mali_midgard(&renderer_name) && !is_adreno_510;

        // On Adreno 4xx devices with older drivers we have seen render tasks to alpha targets have
        // no effect unless the target is fully cleared prior to rendering. See bug 1714227.