diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index ba4e82631a..fd5bbfefc0 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1134,10 +1134,10 @@ impl Global { if !context.compatible(&pipeline.pass_context) { return Err(RenderCommandError::IncompatiblePipeline.into()); } - if is_ds_read_only - && pipeline - .flags - .contains(PipelineFlags::DEPTH_STENCIL_READ_ONLY) + if pipeline + .flags + .contains(PipelineFlags::DEPTH_STENCIL_READ_ONLY) + && !is_ds_read_only { return Err(RenderCommandError::IncompatibleReadOnlyDepthStencil.into()); }