From 9deab8f139745874c8b597d9f55e7b6eee44aa35 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:54 -0600 Subject: [PATCH] nvk: Fix depth/stencil render pass clears Part-of: --- src/nouveau/vulkan/nvk_cmd_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nouveau/vulkan/nvk_cmd_draw.c b/src/nouveau/vulkan/nvk_cmd_draw.c index 7c6e30c..5d3a822 100644 --- a/src/nouveau/vulkan/nvk_cmd_draw.c +++ b/src/nouveau/vulkan/nvk_cmd_draw.c @@ -556,17 +556,17 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer, clear_att[clear_count] = (VkClearAttachment) { .aspectMask = 0, }; if (pRenderingInfo->pDepthAttachment != NULL && pRenderingInfo->pDepthAttachment->imageView != VK_NULL_HANDLE && - pRenderingInfo->pDepthAttachment->loadOp != VK_ATTACHMENT_LOAD_OP_CLEAR) { + pRenderingInfo->pDepthAttachment->loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR) { clear_att[clear_count].aspectMask |= VK_IMAGE_ASPECT_DEPTH_BIT; clear_att[clear_count].clearValue.depthStencil.depth = pRenderingInfo->pDepthAttachment->clearValue.depthStencil.depth; } if (pRenderingInfo->pStencilAttachment != NULL && pRenderingInfo->pStencilAttachment->imageView != VK_NULL_HANDLE && - pRenderingInfo->pStencilAttachment->loadOp != VK_ATTACHMENT_LOAD_OP_CLEAR) { + pRenderingInfo->pStencilAttachment->loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR) { clear_att[clear_count].aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT; clear_att[clear_count].clearValue.depthStencil.stencil = - pRenderingInfo->pStencilAttachment->clearValue.depthStencil.depth; + pRenderingInfo->pStencilAttachment->clearValue.depthStencil.stencil; } if (clear_att[clear_count].aspectMask != 0) clear_count++; -- 2.7.4