wgpu
wgpu copied to clipboard
Bad error when TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES not enabled
I was working on a new texture format test and got this error:
Creating texture with format R8Snorm and caps TextureFormatFeatures { allowed_usages: TextureUsages(COPY_SRC | COPY_DST | TEXTURE_BINDING | RENDER_ATTACHMENT), flags: TextureFormatFeatureFlags(FILTERABLE | MULTISAMPLE_X2 | MULTISAMPLE_X4 | MULTISAMPLE_RESOLVE | STORAGE_READ_ONLY | STORAGE_WRITE_ONLY | BLENDABLE) }
[2025-12-03T20:56:21Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default
thread '<unnamed>' panicked at wgpu/src/backend/wgpu_core.rs:1606:26:
wgpu error: Validation Error
Caused by:
In Device::create_texture
Format R8Snorm does not support multisampling
This was confusing because the adapter claims it supported MUTLISAMPLE_4X, though it turns out using this was behind the feature flag TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES. We should update this error message to indicate that this might be a problem.