mirror of
https://github.com/AxioDL/boo.git
synced 2025-05-15 11:51:27 +00:00
Vulkan depth clear fix
This commit is contained in:
parent
d6063f4a4d
commit
e70da4b4a5
@ -1778,7 +1778,7 @@ class VulkanShaderPipeline : public IShaderPipeline
|
|||||||
depthStencilInfo.flags = 0;
|
depthStencilInfo.flags = 0;
|
||||||
depthStencilInfo.depthTestEnable = depthTest;
|
depthStencilInfo.depthTestEnable = depthTest;
|
||||||
depthStencilInfo.depthWriteEnable = depthWrite;
|
depthStencilInfo.depthWriteEnable = depthWrite;
|
||||||
depthStencilInfo.depthCompareOp = VK_COMPARE_OP_GREATER_OR_EQUAL;
|
depthStencilInfo.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL;
|
||||||
depthStencilInfo.front.compareOp = VK_COMPARE_OP_ALWAYS;
|
depthStencilInfo.front.compareOp = VK_COMPARE_OP_ALWAYS;
|
||||||
depthStencilInfo.back.compareOp = VK_COMPARE_OP_ALWAYS;
|
depthStencilInfo.back.compareOp = VK_COMPARE_OP_ALWAYS;
|
||||||
|
|
||||||
@ -2381,6 +2381,7 @@ struct VulkanCommandQueue : IGraphicsCommandQueue
|
|||||||
clr[0].clearValue.color.float32[3] = m_clearColor[3];
|
clr[0].clearValue.color.float32[3] = m_clearColor[3];
|
||||||
clr[0].aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
clr[0].aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||||
clr[1].aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
|
clr[1].aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||||
|
clr[1].clearValue.depthStencil.depth = 1.f;
|
||||||
vk::CmdClearAttachments(m_cmdBufs[m_fillBuf], 2, clr, 1, &rect);
|
vk::CmdClearAttachments(m_cmdBufs[m_fillBuf], 2, clr, 1, &rect);
|
||||||
}
|
}
|
||||||
else if (render)
|
else if (render)
|
||||||
@ -2395,6 +2396,7 @@ struct VulkanCommandQueue : IGraphicsCommandQueue
|
|||||||
else if (depth)
|
else if (depth)
|
||||||
{
|
{
|
||||||
clr[0].aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
|
clr[0].aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||||
|
clr[0].clearValue.depthStencil.depth = 1.f;
|
||||||
vk::CmdClearAttachments(m_cmdBufs[m_fillBuf], 1, clr, 1, &rect);
|
vk::CmdClearAttachments(m_cmdBufs[m_fillBuf], 1, clr, 1, &rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user