-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradients are broken with the Mac driver of my integrated GPU #1368
Comments
It's possible that #1328 or #1348 may fix / work around this apparent driver bug. These changes modify how gradients are stored, into what is (probably) a more common driver path. After the next WR update lands in Gecko, we should check if this still occurs. cc @staktrace |
@mstange you can try the build from https://treeherder.mozilla.org/#/jobs?repo=try&revision=671e529cecd8e824a08cdcde17b14edbdb44cd98 which should have the above PRs to see if it fixes the problem. |
I tested the build, and the bug is still present. |
@mstange could you provide an |
Maybe, but it would be a bit of work. I can reproduce this bug by pinning my GPU to the integrated one and then running |
Ok, I'll do that next time I'm on Mac ;)
… On Jun 15, 2017, at 16:27, Markus Stange ***@***.***> wrote:
Maybe, but it would be a bit of work.
I can reproduce this bug by pinning my GPU to the integrated one and then running cargo run show reftests/gradient/radial-circle.yaml. You could do the same and then capture whatever trace you want on your machine :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@mstange do the WR's reftests report any errors for you? |
Yes, but unfortunately that's due to #1394. I'll retest once that bug is fixed. |
I've now updated to the release version of 10.12.5, and the issue still happens. |
This shader change seems to "fix" the bug: diff --git a/gfx/webrender/res/ps_radial_gradient.glsl b/gfx/webrender/res/ps_radial_gradient.glsl
--- a/gfx/webrender/res/ps_radial_gradient.glsl
+++ b/gfx/webrender/res/ps_radial_gradient.glsl
@@ -47,17 +47,17 @@ void main(void) {
vStartCenter.y *= ratio_xy;
vEndCenter.y *= ratio_xy;
vTileSize.y *= ratio_xy;
vTileRepeat.y *= ratio_xy;
vGradientAddress = prim.specific_prim_address + VECS_PER_GRADIENT;
// Whether to repeat the gradient instead of clamping.
- vGradientRepeat = float(int(gradient.start_end_radius_ratio_xy_extend_mode.w) == EXTEND_MODE_REPEAT);
+ vGradientRepeat = float(int(gradient.start_end_radius_ratio_xy_extend_mode.w) != EXTEND_MODE_CLAMP);
}
#endif
#ifdef WR_FRAGMENT_SHADER
void main(void) {
vec2 pos = mod(vPos, vTileRepeat);
if (pos.x >= vTileSize.x || Very similar to #1728 (comment). |
My integrated GPU shows the same type of bug for linear gradients, and making the same corresponding change to |
…scompiled. Fixes servo#1368. Fixes servo#1728.
Add workarounds for a driver bug that seems to cause shaders to be miscompiled. Fixes #1368. Fixes #1728. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1740) <!-- Reviewable:end -->
On my machine, when the integrated GPU is use, repeating radial gradients are non-repeating, and non-repeating radial gradients are repeating. See bug 1372299 for testcases.
I'm on macOS 10.12.5 Beta (16F71b), Intel HD Graphics 530 1536 MB
The text was updated successfully, but these errors were encountered: