commit d30a372778992512d653eb26905b7c868a7fe47f
parent bc7603ab3124559c99756c09b2713699504a673d
Author: Nicolas Silva <nical@fastmail.com>
Date: Wed, 26 Nov 2025 09:21:19 +0000
Bug 1978773 - Temporarily disable precise gradients in SWGL. r=gfx-reviewers,lsalzman
Precise gradients have a SWGL-specific optimization to speed up the gradient stop lookup. This was implemented in a way that requires SWGL to use the span shader only, since the fallback code uses a different stop representation (the one that works better on GPU but doesn't allow incrementally searching for stops). Unfortunately I discovered late that span shaders are only run on full sized chunks. The Remaining pixels are always going through the (incompatible) fallback. This was caught by tests on the linear gradients but by the time I got to that, radial and conic gradients had already landed.
Until I have a fix for the partial chunk situation, precise gradients will have to be disabled on SWGL.
Differential Revision: https://phabricator.services.mozilla.com/D274007
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gfx/wr/wrench/src/wrench.rs b/gfx/wr/wrench/src/wrench.rs
@@ -280,8 +280,8 @@ impl Wrench {
clear_caches_with_quads: !window.is_software(),
compositor_config,
enable_debugger: true,
- precise_radial_gradients: true,
- precise_conic_gradients: true,
+ precise_radial_gradients: !window.is_software(),
+ precise_conic_gradients: !window.is_software(),
..Default::default()
};
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
@@ -8127,7 +8127,7 @@
- name: gfx.webrender.precise-radial-gradients-swgl
type: bool
rust: true
- value: true
+ value: false
mirror: once
# Use a more precise method for sampling gradients when *not* using SWGL .
@@ -8141,7 +8141,7 @@
- name: gfx.webrender.precise-conic-gradients-swgl
type: bool
rust: true
- value: true
+ value: false
mirror: once
# Use vsync events generated by hardware