vk/DS: Mask stencil masks to 8 bits
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 Jun 2015 23:59:13 +0000 (16:59 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 Jun 2015 23:59:13 +0000 (16:59 -0700)
src/vulkan/device.c

index 091d9280792136cb2e097e9dd991a0fa7bce8ad1..654dc872bf6766b9a315549d27ddfc23f7142d85 100644 (file)
@@ -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,