Tidy stencil state handling
Bug: b/128715612
Change-Id: I1e9859d2cf001bfb341a49ad4f8fc9ef52c9fa5b
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27508
Tested-by: Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkPipeline.cpp b/src/Vulkan/VkPipeline.cpp
index 5cd45ce..c6b65ed 100644
--- a/src/Vulkan/VkPipeline.cpp
+++ b/src/Vulkan/VkPipeline.cpp
@@ -381,21 +381,8 @@
context.stencilEnable = context.twoSidedStencil = depthStencilState->stencilTestEnable;
if(context.stencilEnable)
{
- context.stencilMask = depthStencilState->front.compareMask;
- context.stencilCompareMode = depthStencilState->front.compareOp;
- context.stencilZFailOperation = depthStencilState->front.depthFailOp;
- context.stencilFailOperation = depthStencilState->front.failOp;
- context.stencilPassOperation = depthStencilState->front.passOp;
- context.stencilReference = depthStencilState->front.reference;
- context.stencilWriteMask = depthStencilState->front.writeMask;
-
- context.stencilMaskCCW = depthStencilState->back.compareMask;
- context.stencilCompareModeCCW = depthStencilState->back.compareOp;
- context.stencilZFailOperationCCW = depthStencilState->back.depthFailOp;
- context.stencilFailOperationCCW = depthStencilState->back.failOp;
- context.stencilPassOperationCCW = depthStencilState->back.passOp;
- context.stencilReferenceCCW = depthStencilState->back.reference;
- context.stencilWriteMaskCCW = depthStencilState->back.writeMask;
+ context.frontStencil = depthStencilState->front;
+ context.backStencil = depthStencilState->back;
}
}