mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
Check GPUDepthStencilState.format even when neither is enabled (#8766)
Fixes #8736
This commit is contained in:
1 parent
592736efa0
commit
df4ae64df6
4 files changed
+17
No files matched your search
@@ -4141,6 +4141,14 @@ impl Device {
|
||||
if let Some(ds) = depth_stencil_state {
|
||||
target_specified = true;
|
||||
let error = 'error: {
|
||||
if !ds.format.is_depth_stencil_format() {
|
||||
// This error case is not redundant with the aspect check below when
|
||||
// neither depth nor stencil is enabled at all.
|
||||
break 'error Some(pipeline::DepthStencilStateError::FormatNotDepthOrStencil(
|
||||
ds.format,
|
||||
));
|
||||
}
|
||||
|
||||
let format_features = self.describe_format_features(ds.format)?;
|
||||
if !format_features
|
||||
.allowed_usages
|
||||
|
||||
Reference in new issue
Block a user