vk: Program stencil ops in 3DSTATE_WM_DEPTH_STENCIL
authorChad Versace <chad.versace@intel.com>
Fri, 28 Aug 2015 15:00:56 +0000 (08:00 -0700)
committerChad Versace <chad.versace@intel.com>
Fri, 28 Aug 2015 15:00:56 +0000 (08:00 -0700)
The driver ignored the Vulkan stencil, always programming the hardware
stencil op to 0 (STENCILOP_KEEP).

src/vulkan/gen7_pipeline.c
src/vulkan/gen8_pipeline.c

index 7a54d7eebe4a02828ddd08179b885d9508f40c05..a5c7a201690ccdad0626b578e786676ba0100e3e 100644 (file)
@@ -146,14 +146,14 @@ static const uint32_t vk_to_gen_compare_op[] = {
 };
 
 static const uint32_t vk_to_gen_stencil_op[] = {
-   [VK_STENCIL_OP_KEEP]                         = 0,
-   [VK_STENCIL_OP_ZERO]                         = 0,
-   [VK_STENCIL_OP_REPLACE]                      = 0,
-   [VK_STENCIL_OP_INC_CLAMP]                    = 0,
-   [VK_STENCIL_OP_DEC_CLAMP]                    = 0,
-   [VK_STENCIL_OP_INVERT]                       = 0,
-   [VK_STENCIL_OP_INC_WRAP]                     = 0,
-   [VK_STENCIL_OP_DEC_WRAP]                     = 0
+   [VK_STENCIL_OP_KEEP]                         = STENCILOP_KEEP,
+   [VK_STENCIL_OP_ZERO]                         = STENCILOP_ZERO,
+   [VK_STENCIL_OP_REPLACE]                      = STENCILOP_REPLACE,
+   [VK_STENCIL_OP_INC_CLAMP]                    = STENCILOP_INCRSAT,
+   [VK_STENCIL_OP_DEC_CLAMP]                    = STENCILOP_DECRSAT,
+   [VK_STENCIL_OP_INVERT]                       = STENCILOP_INVERT,
+   [VK_STENCIL_OP_INC_WRAP]                     = STENCILOP_INCR,
+   [VK_STENCIL_OP_DEC_WRAP]                     = STENCILOP_DECR,
 };
 
 static const uint32_t vk_to_gen_blend_op[] = {
index 9e87a6951b6a5b2e02e45ef6b08aa9a298c8f829..b1cb16234d5c239b5e7caf6b23901de6d0ba3eb0 100644 (file)
@@ -244,14 +244,14 @@ static const uint32_t vk_to_gen_compare_op[] = {
 };
 
 static const uint32_t vk_to_gen_stencil_op[] = {
-   [VK_STENCIL_OP_KEEP]                         = 0,
-   [VK_STENCIL_OP_ZERO]                         = 0,
-   [VK_STENCIL_OP_REPLACE]                      = 0,
-   [VK_STENCIL_OP_INC_CLAMP]                    = 0,
-   [VK_STENCIL_OP_DEC_CLAMP]                    = 0,
-   [VK_STENCIL_OP_INVERT]                       = 0,
-   [VK_STENCIL_OP_INC_WRAP]                     = 0,
-   [VK_STENCIL_OP_DEC_WRAP]                     = 0
+   [VK_STENCIL_OP_KEEP]                         = STENCILOP_KEEP,
+   [VK_STENCIL_OP_ZERO]                         = STENCILOP_ZERO,
+   [VK_STENCIL_OP_REPLACE]                      = STENCILOP_REPLACE,
+   [VK_STENCIL_OP_INC_CLAMP]                    = STENCILOP_INCRSAT,
+   [VK_STENCIL_OP_DEC_CLAMP]                    = STENCILOP_DECRSAT,
+   [VK_STENCIL_OP_INVERT]                       = STENCILOP_INVERT,
+   [VK_STENCIL_OP_INC_WRAP]                     = STENCILOP_INCR,
+   [VK_STENCIL_OP_DEC_WRAP]                     = STENCILOP_DECR,
 };
 
 static void