From 251aea80b029cdd18b9c263073a4149b9331ad2a Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 3 Jun 2015 16:59:13 -0700 Subject: [PATCH] vk/DS: Mask stencil masks to 8 bits --- src/vulkan/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 091d9280792..654dc872bf6 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -2178,11 +2178,11 @@ VkResult anv_CreateDynamicDepthStencilState( /* Is this what we need to do? */ .StencilBufferWriteEnable = pCreateInfo->stencilWriteMask != 0, - .StencilTestMask = pCreateInfo->stencilReadMask, - .StencilWriteMask = pCreateInfo->stencilWriteMask, + .StencilTestMask = pCreateInfo->stencilReadMask & 0xff, + .StencilWriteMask = pCreateInfo->stencilWriteMask & 0xff, - .BackfaceStencilTestMask = pCreateInfo->stencilReadMask, - .BackfaceStencilWriteMask = pCreateInfo->stencilWriteMask, + .BackfaceStencilTestMask = pCreateInfo->stencilReadMask & 0xff, + .BackfaceStencilWriteMask = pCreateInfo->stencilWriteMask & 0xff, }; GEN8_3DSTATE_WM_DEPTH_STENCIL_pack(NULL, state->state_wm_depth_stencil, -- 2.30.2