Closed
Bug 1505449
Opened 6 years ago
Closed 5 years ago
Reduce GPU cache memory usage
Categories
(Core :: Graphics: WebRender, enhancement, P2)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(11 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
The GPU cache grows dynamically, but never shrinks, even during memory pressure. This means that loading francine (which pumps the GPU cache above 100MB) will permanently bake that large texture size into the runtime until the window is closed. We can be smarter here.
Assignee | ||
Comment 1•5 years ago
|
||
Generalizing this bug a bit. I've got patches. https://treeherder.mozilla.org/#/jobs?repo=try&revision=e71152f3841fc6e02a81f977c9b9824572740b3e
Summary: Support shrinking the GPU cache → Reduce GPU cache memory usage
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
This does two things: * Sizes the GPU cache debug display to the size of the GPU cache. * Tracks allocations/frees so that the debug display shows all live blocks, rather than just the ones allocated in the last frame. Depends on D15453
Assignee | ||
Comment 4•5 years ago
|
||
Unconditionally making the texture a render target doesn't really have any downsides, and a blit is much faster than an upload from CPU. This matters because we're going to make the gpu cache grown more granularly (and thus more often). We also get rid of the unnecessary rounding-up for height, since this is already managed by gpu_cache.rs. Depends on D15454
Assignee | ||
Comment 5•5 years ago
|
||
This saves megabytes of memory. Depends on D15455
Assignee | ||
Comment 6•5 years ago
|
||
There's no overhead to doing so, and right now we use an entire row for any allocation > 128 blocks, which is suboptimal.Doing this dramatically improves utilization on francine. Depends on D15456
Assignee | ||
Comment 7•5 years ago
|
||
We never need to take slices that cross rows. This approach is easier on the heap allocator (since it doesn't require contiguous memory) and leads to less slop. Depends on D15457
Assignee | ||
Comment 8•5 years ago
|
||
We end up with an array of Blocks in the megabytes, and we can make them smaller. Depends on D15458
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D15459
Assignee | ||
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
https://github.com/servo/webrender/pull/3452 for everything but the last patch, which is still waiting on review.
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D15477
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D15483
Assignee | ||
Comment 14•5 years ago
|
||
Hit a weird issue with the patch from comment 10, described at [1]. I've dropped it from the push to get the rest landed now. NI kvark for thoughts on [1]. [1] https://github.com/servo/webrender/pull/3452#issuecomment-450506767
Flags: needinfo?(dmalyshau)
Assignee | ||
Comment 15•5 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #14) > Hit a weird issue with the patch from comment 10, described at [1]. I've > dropped it from the push to get the rest landed now. NI kvark for thoughts > on [1]. > > [1] https://github.com/servo/webrender/pull/3452#issuecomment-450506767 This turned out to be [1]. Landing with a workaround in [2]. Will file a gecko-side bug for the ANGLE issue. [1] https://bugs.chromium.org/p/angleproject/issues/detail?id=3039 [2] https://github.com/servo/webrender/pull/3456
Flags: needinfo?(dmalyshau)
Assignee | ||
Comment 16•5 years ago
|
||
Resolving fixed, since the main work here landed and the rest (which was on its way in bug 1517038) was just a ridealong anyway.
Assignee | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•