diff options
Diffstat (limited to 'src/gpu/sampler_cache.h')
| -rw-r--r-- | src/gpu/sampler_cache.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/sampler_cache.h b/src/gpu/sampler_cache.h index 7149921..b3fdb19 100644 --- a/src/gpu/sampler_cache.h +++ b/src/gpu/sampler_cache.h @@ -39,6 +39,11 @@ class SamplerCache { } WGPUSampler get_or_create(WGPUDevice device, const SamplerSpec& spec) { + // Headless mode: skip sampler creation + if (device == nullptr) { + return nullptr; + } + auto it = cache_.find(spec); if (it != cache_.end()) return it->second; |
