Closed nical closed 10 months ago
Bugzilla entry: https://bugzilla.mozilla.org/show_bug.cgi?id=1863872
Actually there is already an issue on file for the 2k sampler limit: https://github.com/gfx-rs/wgpu/issues/3350
I'll repurpose this one for the intermediate fix of eagerly destroying texture views.
How would eagerly destroying texture views help with sampler bindings?
Aren't the texture views holding sampler descriptors?
Nope, bind groups own them - the way I express the limit to people is "number of sampler bindings in live bind groups"
Ah yes indeed. That means we probably would benefit from eagerly destroying the bindgroups when a texture is destroyed or maybe destroy bindgroups pointing to destroyed resources when we get close to the sampler descriptor limit.
Closed as dup of #3350.
Description
With the d3d12 backend there can be only a limited number of sampler descriptors alive for per device. See the 2k constant here, especially in the browser where the GC can hold texture views alive for arbitrarily long (and texture views don't have a
destroy
method).We should eagerly destroy texture views when their textures are destroyed or dropped to free up descriptors faster.
Platform
d3d12 backend on windows