report Associated Memory of GPUTexture to the SM
Categories
(Core :: Graphics: WebGPU, enhancement)
Tracking
()
People
(Reporter: samo.golez, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0
Steps to reproduce:
Currently Firefox does not report "Associated Memory" to the SM about GPUTexture and GPUBuffer.
Actual results:
This is observable in https://github.com/linebender/vello/pull/1777 and I've also seen similar "issue" in webgpu matrix chat.
Expected results:
We should report "Associated Memory" to the SM about GPUTexture and probably GPUBuffer too, like it's done for canvas2d: https://searchfox.org/firefox-main/rev/a87cb5eb8e0bbde515c068dd660dfb9d9ece621e/dom/canvas/CanvasRenderingContext2D.cpp#2113
This will encourage faster GC of these objects.
For GPUBuffer we already have (byte)size in desc: https://www.w3.org/TR/webgpu/#dom-gpubufferdescriptor-size and for GPUTexture I've created https://github.com/gfx-rs/wgpu/pull/10032 for computation (approximation).
OFF-TOPIC: I think we should also be doing this for webgl too.
Description
•