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

8-12ms GPU with large drop shadow blur radius #1986

Closed
nc4rrillo opened this issue Nov 3, 2017 · 8 comments
Closed

8-12ms GPU with large drop shadow blur radius #1986

nc4rrillo opened this issue Nov 3, 2017 · 8 comments

Comments

@nc4rrillo
Copy link
Contributor

@nc4rrillo nc4rrillo commented Nov 3, 2017

On my integrated Intel GPU I'm seeing 8-10ms GPU time while drawing box shadows.
Here's a reduced YAML:

---
root: 
  items: 
    - 
      bounds: [0, 0, 550, 400]
      "clip-rect": [0, 0, 550, 400]
      "clip-and-scroll": 0
      "backface-visible": true
      type: rect
      color: 255 255 255 0.9000
    - 
      bounds: [0, 0, 550, 400]
      "clip-rect": [0, 0, 550, 400]
      "clip-and-scroll": 0
      "backface-visible": true
      type: border
      width: [0, 2, 2, 2]
      "border-type": normal
      color: 0 0 0 0.2000
      style: solid
    - 
      bounds: [0, 0, 550, 400]
      "clip-rect": [0, 0, 550, 400]
      "clip-and-scroll": 0
      "backface-visible": true
      type: "box-shadow"
      "box-bounds": [0, 0, 550, 400]
      offset: [0, 2]
      color: 0 0 0 0.2000
      "blur-radius": 4
      "spread-radius": 0
      "clip-mode": outset
    - 
      bounds: [0, 0, 550, 400]
      "clip-rect": [0, 0, 550, 400]
      "clip-and-scroll": 0
      "backface-visible": true
      type: "box-shadow"
      "box-bounds": [0, 0, 550, 400]
      offset: [0, 25]
      color: 0 0 0 0.1000
      "blur-radius": 50
      "spread-radius": 0
      "clip-mode": outset
  id: [0, 0]
pipelines: []

if I drop the blur radius of the second box shadow to 4, the GPU time goes from 8ms to 3ms.

@glennw
Copy link
Member

@glennw glennw commented Nov 3, 2017

Hopefully #1961 and/or #1984 will fix this, but I'll profile after they are sorted to confirm.

@nc4rrillo
Copy link
Contributor Author

@nc4rrillo nc4rrillo commented Nov 7, 2017

Still seeing more or less the same GPU time after #1961

@glennw
Copy link
Member

@glennw glennw commented Nov 8, 2017

With current master, I see a GPU time of ~1.25ms on my HD4600 + Linux, which seems OK.

Are you still able to reproduce this issue? What platform / GPU are you running on?

@nc4rrillo
Copy link
Contributor Author

@nc4rrillo nc4rrillo commented Nov 8, 2017

Just tried again with current master and I do see some improvement, now uses around 4-5ms.
Using Intel HD Graphics 520 on Linux

@glennw
Copy link
Member

@glennw glennw commented Nov 8, 2017

Are you running with vblank_mode=0 to disable vsync for profiling? I think the timer queries are only accurate when running with vsync disabled. I have a Linux laptop here with an HD530 - I'll test on that. I would expect the HD520 to be significantly faster than a HD4600.

@nc4rrillo
Copy link
Contributor Author

@nc4rrillo nc4rrillo commented Nov 8, 2017

That was it. down to 1.5ms :)

@glennw
Copy link
Member

@glennw glennw commented Nov 8, 2017

Cool! On my HD530, I see a GPU time reported of ~1.5ms. The FPS is ~345, which is a total frame time of ~2.9ms. It's possible that discrepancy is the time used by the OS compositor to present the framebuffer, I would guess.

But the GPU time in WR seems OK-ish. Most of the time is spent clearing framebuffer targets (which is a fixed cost that won't go up as the scene complexity increases), and also drawing the clip rect. There are some significant performance improvements in the pipeline for drawing clip rects, which should help there.

I think we can close this bug though, what do you think?

@nc4rrillo
Copy link
Contributor Author

@nc4rrillo nc4rrillo commented Nov 8, 2017

Yup, I agree this can be closed

@nc4rrillo nc4rrillo closed this Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.