diff options
author | ziga-lunarg <ziga@lunarg.com> | 2023-03-05 14:38:25 +0100 |
---|---|---|
committer | Piotr Byszewski <piotr.byszewski@mobica.com> | 2023-03-11 15:24:21 +0000 |
commit | b6126114ca7a07bbcf5451eb7ade913330d717f3 (patch) | |
tree | c52f70c2e9721d36157c1c6e1d13f3655334d075 | |
parent | f766d34f713e43974c6fb5b7b443062ef61e59ca (diff) | |
download | VK-GL-CTS-b6126114ca7a07bbcf5451eb7ade913330d717f3.tar.gz VK-GL-CTS-b6126114ca7a07bbcf5451eb7ade913330d717f3.tar.bz2 VK-GL-CTS-b6126114ca7a07bbcf5451eb7ade913330d717f3.zip |
Fix stencil op in render pass stencil read only tests
If depth stencil attachment is in a read-only layout for the stencil
aspect and stencil test is enabled, all stencil ops must be
KV_STENCIL_OP_KEEP
Components: Vulkan
VK-GL-CTS issue: 4317
Affected tests:
dEQP-VK.renderpass.*
Change-Id: I1ba6dcb11525c600d42e1653b0aa347e67117adf
-rw-r--r-- | external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp | 14 |
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 |