Skip to content

Commit

Permalink
Fix depth and stencil attachment check when building pipeline (#2052)
Browse files Browse the repository at this point in the history
  • Loading branch information
insertt authored Oct 28, 2022
1 parent 8670f3d commit 0b59b05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vulkano/src/pipeline/graphics/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ where
let has_depth_attachment = match render_pass {
PipelineRenderPassType::BeginRenderPass(subpass) => subpass.has_depth(),
PipelineRenderPassType::BeginRendering(rendering_info) => {
rendering_info.depth_attachment_format.is_none()
rendering_info.depth_attachment_format.is_some()
}
};

Expand Down Expand Up @@ -1990,12 +1990,12 @@ where
let has_stencil_attachment = match render_pass {
PipelineRenderPassType::BeginRenderPass(subpass) => subpass.has_stencil(),
PipelineRenderPassType::BeginRendering(rendering_info) => {
rendering_info.stencil_attachment_format.is_none()
rendering_info.stencil_attachment_format.is_some()
}
};

if !has_stencil_attachment {
return Err(GraphicsPipelineCreationError::NoDepthAttachment);
return Err(GraphicsPipelineCreationError::NoStencilAttachment);
}

// VUID?
Expand Down

0 comments on commit 0b59b05

Please sign in to comment.