Clear webrender resources when video memory is purged.

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P2
normal
RESOLVED FIXED
11 months ago
9 months ago

People

(Reporter: nical, Assigned: nical)

Tracking

(Blocks 2 bugs)

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

11 months ago
See the corresponding webrender issue (which will be closed since all of the remaining work is on the gecko side: https://github.com/servo/webrender/issues/2792

We just need to check whether gpu-side memory was purged through extensions like NV_robustness_video_memory_purge and use WebRender's ClearCaches API.
Assignee

Comment 1

11 months ago
Here is a naive attempt at handling the memory purges. Sotaro what do you think? I don't know if it is worth centralizing the device reset and memory purge in one place since the current support we have talks directly to the d3d device, but you know this stuff a lot better than I do.
I haven't properly tested this yet.
Assignee: nobody → nical.bugzilla
Attachment #8986210 - Flags: feedback?(sotaro.ikeda.g)
Comment on attachment 8986210 [details] [diff] [review]
Handle video memory purge with WebRender

Review of attachment 8986210 [details] [diff] [review]:
-----------------------------------------------------------------

The patch looks good :) The device reset requests to re-create all compositor sessions and updating d3d devices on windows. But memory purge does not request them. Then it seems simpler just to keep them as separate. By the way, it is nice if we could test memory purge like "Trigger Device Reset" in about:support.
Attachment #8986210 - Flags: feedback?(sotaro.ikeda.g) → feedback+
Priority: -- → P2
Assignee

Comment 3

10 months ago
Comment on attachment 8986210 [details] [diff] [review]
Handle video memory purge with WebRender

I kind of forgot about this one. Let's land it.
Attachment #8986210 - Flags: review?(sotaro.ikeda.g)

Updated

10 months ago
Attachment #8986210 - Flags: review?(sotaro.ikeda.g) → review+

Comment 4

10 months ago
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/402e30935941
Handle video memory purge with WebRender. r=sotaro

Comment 5

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/402e30935941
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.