Skip to content
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

On my integrated GPU, a non-blurred rounded box shadow breaks all future clipping #1738

Closed
mstange opened this issue Sep 21, 2017 · 5 comments · Fixed by #1915
Closed

On my integrated GPU, a non-blurred rounded box shadow breaks all future clipping #1738

mstange opened this issue Sep 21, 2017 · 5 comments · Fixed by #1915

Comments

@mstange
Copy link
Contributor

mstange commented Sep 21, 2017

https://bugzilla.mozilla.org/show_bug.cgi?id=1402073

>> Testcase <<

This testcase contains two things:

  • a box-shadow with rounded corners and a zero blur radius, and
  • a background color that's clipped to a rounded shape

On my integrated GPU, the background is not clipped to the rounded shape.

Rendering with integrated GPU (this build already contains the != workarounds for text and gradients):
screen shot 2017-09-21 at 2 56 40 pm

Rendering with discrete GPU:
screen shot 2017-09-21 at 2 56 35 pm

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Two box shadows create garbage</title>

<style>

div {
  display: inline-block;
  margin: 10px;
  border-radius: 20px;
  width: 100px;
  height: 100px;
}

</style>

<div style="box-shadow: black 0 1px;"></div>
<div style="background: black"></div>

@glennw, any ideas where I should be searching for another integer equality comparison?

@glennw
Copy link
Member

glennw commented Sep 21, 2017

I wonder if it could be related to the for loop in the blur shader, which uses integers? Argh, what a frustrating shader compiler / driver you have!

@mstange
Copy link
Contributor Author

mstange commented Sep 21, 2017

This testcase doesn't have a blur, though.

@glennw
Copy link
Member

glennw commented Sep 21, 2017

Oh, right. Not immediately clear to me where there would be an int comparison. I'll take a quick look at the shaders today and let you know if I spot anything...

@mstange
Copy link
Contributor Author

mstange commented Oct 6, 2017

It turns out that the alternative workaround for #1809 that I gave in #1810 (comment) actually fixes this bug. I have no idea why though.

@kvark
Copy link
Member

kvark commented Oct 17, 2017

@mstange could you make a PR then? thanks!

mstange added a commit to mstange/webrender that referenced this issue Oct 23, 2017
mstange added a commit to mstange/webrender that referenced this issue Oct 23, 2017
bors-servo pushed a commit that referenced this issue Oct 24, 2017
Use a different workaround that fixes both #1809 and #1738.

This reverts #1810 and applies the alternative workaround that I gave in #1810 (comment) , because this alternative workaround also happens to fix #1738.

I was hesitant to create this PR because I haven't debugged #1738 enough to understand what's going wrong. But there is probably no good reason to delay fixing this until somebody does the investigation.

r? @kvark

<!-- 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/1915)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants