From de0ac2ccb71a9029f6f852ad39fc6ef42b48b19e Mon Sep 17 00:00:00 2001 From: Rukai Date: Fri, 17 Jul 2020 19:31:45 +1000 Subject: [PATCH] Fix rods error check --- wgpu-core/src/command/render.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()); }