summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
index 5e2f00bbf..4a5e97e8e 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
@@ -1987,6 +1987,8 @@ Move<VkPipeline> createSubpassPipeline (const DeviceInterface& vk,
? VK_TRUE
: VK_FALSE;
+ VkStencilOp stencilOp = writeStencil ? VK_STENCIL_OP_REPLACE : VK_STENCIL_OP_KEEP;
+
const VkPipelineDepthStencilStateCreateInfo depthStencilState =
{
VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, // sType
@@ -1998,18 +2000,18 @@ Move<VkPipeline> createSubpassPipeline (const DeviceInterface& vk,
VK_FALSE, // depthBoundsEnable
writeStencil, // stencilTestEnable
{
- VK_STENCIL_OP_REPLACE, // stencilFailOp
- VK_STENCIL_OP_REPLACE, // stencilPassOp
- VK_STENCIL_OP_REPLACE, // stencilDepthFailOp
+ stencilOp, // stencilFailOp
+ stencilOp, // stencilPassOp
+ stencilOp, // stencilDepthFailOp
VK_COMPARE_OP_ALWAYS, // stencilCompareOp
~0u, // stencilCompareMask
~0u, // stencilWriteMask
((stencilIndex % 2) == 0) ? ~0x0u : 0x0u // stencilReference
}, // front
{
- VK_STENCIL_OP_REPLACE, // stencilFailOp
- VK_STENCIL_OP_REPLACE, // stencilPassOp
- VK_STENCIL_OP_REPLACE, // stencilDepthFailOp
+ stencilOp, // stencilFailOp
+ stencilOp, // stencilPassOp
+ stencilOp, // stencilDepthFailOp
VK_COMPARE_OP_ALWAYS, // stencilCompareOp
~0u, // stencilCompareMask
~0u, // stencilWriteMask