Skip to content

Commit

Permalink
Fix stencil enabling in pipeline state
Browse files Browse the repository at this point in the history
Summary: Fix stencil enabling in pipeline state

Reviewed By: mmaurer

Differential Revision: D52217293

fbshipit-source-id: ea95a84e7064177290d40687d70a948c73355b32
  • Loading branch information
Roman Kuznetsov authored and facebook-github-bot committed Dec 19, 2023
1 parent f3e48b8 commit f4f3ce4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/igl/vulkan/VulkanPipelineBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ VulkanPipelineBuilder& VulkanPipelineBuilder::stencilStateOps(VkStencilFaceFlags
VkStencilOp passOp,
VkStencilOp depthFailOp,
VkCompareOp compareOp) {
depthStencilState_.stencilTestEnable =
static_cast<VkBool32>(static_cast<bool>(depthStencilState_.stencilTestEnable) ||
failOp != VK_STENCIL_OP_KEEP || passOp != VK_STENCIL_OP_KEEP ||
depthFailOp != VK_STENCIL_OP_KEEP || compareOp != VK_COMPARE_OP_ALWAYS);

if (faceMask & VK_STENCIL_FACE_FRONT_BIT) {
VkStencilOpState& front = depthStencilState_.front;
front.failOp = failOp;
Expand Down

0 comments on commit f4f3ce4

Please sign in to comment.