diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gpu/sampler_cache.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/sampler_cache.h b/src/gpu/sampler_cache.h index 0f012a8..5df3958 100644 --- a/src/gpu/sampler_cache.h +++ b/src/gpu/sampler_cache.h @@ -58,4 +58,11 @@ public: return {WGPUAddressMode_ClampToEdge, WGPUAddressMode_ClampToEdge, WGPUFilterMode_Linear, WGPUFilterMode_Linear, 1}; } + + void clear() { + for (auto& pair : cache_) { + wgpuSamplerRelease(pair.second); + } + cache_.clear(); + } }; |
