vk/0.210.0: Rework dynamic states
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 30 Nov 2015 22:19:41 +0000 (14:19 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 30 Nov 2015 22:19:41 +0000 (14:19 -0800)
include/vulkan/vulkan.h
src/vulkan/anv_cmd_buffer.c
src/vulkan/anv_meta_clear.c
src/vulkan/anv_pipeline.c
src/vulkan/anv_private.h
src/vulkan/gen7_cmd_buffer.c
src/vulkan/gen7_pipeline.c
src/vulkan/gen8_cmd_buffer.c
src/vulkan/gen8_pipeline.c

index c7a4ad1c38793a69350bfb2c1ee604bffca196f0..d378598b0d3a8b0661574481c19917cab3f4545f 100644 (file)
@@ -1640,9 +1640,9 @@ typedef struct {
     VkCullModeFlags                             cullMode;
     VkFrontFace                                 frontFace;
     VkBool32                                    depthBiasEnable;
-    float                                       depthBias;
+    float                                       depthBiasConstantFactor;
     float                                       depthBiasClamp;
-    float                                       slopeScaledDepthBias;
+    float                                       depthBiasSlopeFactor;
     float                                       lineWidth;
 } VkPipelineRasterStateCreateInfo;
 
@@ -1655,14 +1655,14 @@ typedef struct {
     const VkSampleMask*                         pSampleMask;
 } VkPipelineMultisampleStateCreateInfo;
 
-typedef struct {
-    VkStencilOp                                 stencilFailOp;
-    VkStencilOp                                 stencilPassOp;
-    VkStencilOp                                 stencilDepthFailOp;
-    VkCompareOp                                 stencilCompareOp;
-    uint32_t                                    stencilCompareMask;
-    uint32_t                                    stencilWriteMask;
-    uint32_t                                    stencilReference;
+typedef struct VkStencilOpState {
+    VkStencilOp                                 failOp;
+    VkStencilOp                                 passOp;
+    VkStencilOp                                 depthFailOp;
+    VkCompareOp                                 compareOp;
+    uint32_t                                    compareMask;
+    uint32_t                                    writeMask;
+    uint32_t                                    reference;
 } VkStencilOpState;
 
 typedef struct {
@@ -1699,7 +1699,7 @@ typedef struct {
     VkLogicOp                                   logicOp;
     uint32_t                                    attachmentCount;
     const VkPipelineColorBlendAttachmentState*  pAttachments;
-    float                                       blendConst[4];
+    float                                       blendConstants[4];
 } VkPipelineColorBlendStateCreateInfo;
 
 typedef struct {
@@ -2168,12 +2168,12 @@ typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, V
 typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports);
 typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
 typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth);
-typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
-typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConst[4]);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
+typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]);
 typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
 typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
 typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
 typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
@@ -2722,13 +2722,13 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(
 
 VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(
     VkCommandBuffer                             commandBuffer,
-    float                                       depthBias,
+    float                                       depthBiasConstantFactor,
     float                                       depthBiasClamp,
-    float                                       slopeScaledDepthBias);
+    float                                       depthBiasSlopeFactor);
 
 VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(
     VkCommandBuffer                             commandBuffer,
-    const float                                 blendConst[4]);
+    const float                                 blendConstants[4]);
 
 VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
     VkCommandBuffer                             commandBuffer,
@@ -2738,17 +2738,17 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilCompareMask);
+    uint32_t                                    compareMask);
 
 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilWriteMask);
+    uint32_t                                    writeMask);
 
 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilReference);
+    uint32_t                                    reference);
 
 VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
     VkCommandBuffer                             commandBuffer,
index f42f6fd51839859ed2f511f1cf8c2c4b6c3557e0..401fd5681f6861ef30a1a4a55b3d10c778247597 100644 (file)
@@ -50,7 +50,7 @@ const struct anv_dynamic_state default_dynamic_state = {
    .depth_bias = {
       .bias = 0.0f,
       .clamp = 0.0f,
-      .slope_scaled = 0.0f,
+      .slope = 0.0f,
    },
    .blend_constants = { 0.0f, 0.0f, 0.0f, 0.0f },
    .depth_bounds = {
@@ -380,27 +380,27 @@ void anv_CmdSetLineWidth(
 
 void anv_CmdSetDepthBias(
     VkCommandBuffer                             commandBuffer,
-    float                                       depthBias,
+    float                                       depthBiasConstantFactor,
     float                                       depthBiasClamp,
-    float                                       slopeScaledDepthBias)
+    float                                       depthBiasSlopeFactor)
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
-   cmd_buffer->state.dynamic.depth_bias.bias = depthBias;
+   cmd_buffer->state.dynamic.depth_bias.bias = depthBiasConstantFactor;
    cmd_buffer->state.dynamic.depth_bias.clamp = depthBiasClamp;
-   cmd_buffer->state.dynamic.depth_bias.slope_scaled = slopeScaledDepthBias;
+   cmd_buffer->state.dynamic.depth_bias.slope = depthBiasSlopeFactor;
 
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_DEPTH_BIAS;
 }
 
 void anv_CmdSetBlendConstants(
     VkCommandBuffer                             commandBuffer,
-    const float                                 blendConst[4])
+    const float                                 blendConstants[4])
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
    memcpy(cmd_buffer->state.dynamic.blend_constants,
-          blendConst, sizeof(float) * 4);
+          blendConstants, sizeof(float) * 4);
 
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_BLEND_CONSTANTS;
 }
@@ -421,14 +421,14 @@ void anv_CmdSetDepthBounds(
 void anv_CmdSetStencilCompareMask(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilCompareMask)
+    uint32_t                                    compareMask)
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
    if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
-      cmd_buffer->state.dynamic.stencil_compare_mask.front = stencilCompareMask;
+      cmd_buffer->state.dynamic.stencil_compare_mask.front = compareMask;
    if (faceMask & VK_STENCIL_FACE_BACK_BIT)
-      cmd_buffer->state.dynamic.stencil_compare_mask.back = stencilCompareMask;
+      cmd_buffer->state.dynamic.stencil_compare_mask.back = compareMask;
 
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_STENCIL_COMPARE_MASK;
 }
@@ -436,14 +436,14 @@ void anv_CmdSetStencilCompareMask(
 void anv_CmdSetStencilWriteMask(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilWriteMask)
+    uint32_t                                    writeMask)
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
    if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
-      cmd_buffer->state.dynamic.stencil_write_mask.front = stencilWriteMask;
+      cmd_buffer->state.dynamic.stencil_write_mask.front = writeMask;
    if (faceMask & VK_STENCIL_FACE_BACK_BIT)
-      cmd_buffer->state.dynamic.stencil_write_mask.back = stencilWriteMask;
+      cmd_buffer->state.dynamic.stencil_write_mask.back = writeMask;
 
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_STENCIL_WRITE_MASK;
 }
@@ -451,14 +451,14 @@ void anv_CmdSetStencilWriteMask(
 void anv_CmdSetStencilReference(
     VkCommandBuffer                             commandBuffer,
     VkStencilFaceFlags                          faceMask,
-    uint32_t                                    stencilReference)
+    uint32_t                                    reference)
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
    if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
-      cmd_buffer->state.dynamic.stencil_reference.front = stencilReference;
+      cmd_buffer->state.dynamic.stencil_reference.front = reference;
    if (faceMask & VK_STENCIL_FACE_BACK_BIT)
-      cmd_buffer->state.dynamic.stencil_reference.back = stencilReference;
+      cmd_buffer->state.dynamic.stencil_reference.back = reference;
 
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE;
 }
index bcdc9e4d5b4524f2089bb4b6faa3f30e5b700f6b..a9bcbc3be9e5e94a8262c9dd3d99ccc105531803 100644 (file)
@@ -459,10 +459,10 @@ create_depthstencil_pipeline(struct anv_device *device,
       .depthBoundsTestEnable = false,
       .stencilTestEnable = (aspects & VK_IMAGE_ASPECT_STENCIL_BIT),
       .front = {
-         .stencilPassOp = VK_STENCIL_OP_REPLACE,
-         .stencilCompareOp = VK_COMPARE_OP_ALWAYS,
-         .stencilWriteMask = UINT32_MAX,
-         .stencilReference = 0, /* dynamic */
+         .passOp = VK_STENCIL_OP_REPLACE,
+         .compareOp = VK_COMPARE_OP_ALWAYS,
+         .writeMask = UINT32_MAX,
+         .reference = 0, /* dynamic */
       },
       .back = { 0 /* dont care */ },
    };
index 16d054665f52b660296a48dfab38fe5d84c14ed5..e4209bd13c9e528e40e3b512d9b702d6f14d915f 100644 (file)
@@ -849,16 +849,17 @@ anv_pipeline_init_dynamic_state(struct anv_pipeline *pipeline,
 
    if (states & (1 << VK_DYNAMIC_STATE_DEPTH_BIAS)) {
       assert(pCreateInfo->pRasterState);
-      dynamic->depth_bias.bias = pCreateInfo->pRasterState->depthBias;
+      dynamic->depth_bias.bias =
+         pCreateInfo->pRasterState->depthBiasConstantFactor;
       dynamic->depth_bias.clamp = pCreateInfo->pRasterState->depthBiasClamp;
-      dynamic->depth_bias.slope_scaled =
-         pCreateInfo->pRasterState->slopeScaledDepthBias;
+      dynamic->depth_bias.slope =
+         pCreateInfo->pRasterState->depthBiasSlopeFactor;
    }
 
    if (states & (1 << VK_DYNAMIC_STATE_BLEND_CONSTANTS)) {
       assert(pCreateInfo->pColorBlendState);
       typed_memcpy(dynamic->blend_constants,
-                   pCreateInfo->pColorBlendState->blendConst, 4);
+                   pCreateInfo->pColorBlendState->blendConstants, 4);
    }
 
    /* If there is no depthstencil attachment, then don't read
@@ -884,25 +885,25 @@ anv_pipeline_init_dynamic_state(struct anv_pipeline *pipeline,
       if (states & (1 << VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK)) {
          assert(pCreateInfo->pDepthStencilState);
          dynamic->stencil_compare_mask.front =
-            pCreateInfo->pDepthStencilState->front.stencilCompareMask;
+            pCreateInfo->pDepthStencilState->front.compareMask;
          dynamic->stencil_compare_mask.back =
-            pCreateInfo->pDepthStencilState->back.stencilCompareMask;
+            pCreateInfo->pDepthStencilState->back.compareMask;
       }
 
       if (states & (1 << VK_DYNAMIC_STATE_STENCIL_WRITE_MASK)) {
          assert(pCreateInfo->pDepthStencilState);
          dynamic->stencil_write_mask.front =
-            pCreateInfo->pDepthStencilState->front.stencilWriteMask;
+            pCreateInfo->pDepthStencilState->front.writeMask;
          dynamic->stencil_write_mask.back =
-            pCreateInfo->pDepthStencilState->back.stencilWriteMask;
+            pCreateInfo->pDepthStencilState->back.writeMask;
       }
 
       if (states & (1 << VK_DYNAMIC_STATE_STENCIL_REFERENCE)) {
          assert(pCreateInfo->pDepthStencilState);
          dynamic->stencil_reference.front =
-            pCreateInfo->pDepthStencilState->front.stencilReference;
+            pCreateInfo->pDepthStencilState->front.reference;
          dynamic->stencil_reference.back =
-            pCreateInfo->pDepthStencilState->back.stencilReference;
+            pCreateInfo->pDepthStencilState->back.reference;
       }
    }
 
index 0e148b36b1c4eb804b79066e4e908d07fb94f9ba..c86003f58238c6fa99374ec559ac7045c2a7677c 100644 (file)
@@ -917,7 +917,7 @@ struct anv_dynamic_state {
    struct {
       float                                     bias;
       float                                     clamp;
-      float                                     slope_scaled;
+      float                                     slope;
    } depth_bias;
 
    float                                        blend_constants[4];
index b69982d6e52b9adaaf34eafefb7fffe0f2c69f87..9a3d4799d6289c62c83984e26792270e5e5f1a72 100644 (file)
@@ -409,7 +409,7 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
                                   ANV_CMD_DIRTY_DYNAMIC_DEPTH_BIAS)) {
 
       bool enable_bias = cmd_buffer->state.dynamic.depth_bias.bias != 0.0f ||
-         cmd_buffer->state.dynamic.depth_bias.slope_scaled != 0.0f;
+         cmd_buffer->state.dynamic.depth_bias.slope != 0.0f;
 
       uint32_t sf_dw[GEN7_3DSTATE_SF_length];
       struct GEN7_3DSTATE_SF sf = {
@@ -419,7 +419,7 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
          .GlobalDepthOffsetEnableWireframe = enable_bias,
          .GlobalDepthOffsetEnablePoint = enable_bias,
          .GlobalDepthOffsetConstant = cmd_buffer->state.dynamic.depth_bias.bias,
-         .GlobalDepthOffsetScale = cmd_buffer->state.dynamic.depth_bias.slope_scaled,
+         .GlobalDepthOffsetScale = cmd_buffer->state.dynamic.depth_bias.slope,
          .GlobalDepthOffsetClamp = cmd_buffer->state.dynamic.depth_bias.clamp
       };
       GEN7_3DSTATE_SF_pack(NULL, sf_dw, &sf);
index 1ae4d26bcdd59fb83c9e19908548259cf6c42cfd..2f51b4bfc733ece8a327af825682e9c2afe97e78 100644 (file)
@@ -231,15 +231,15 @@ gen7_emit_ds_state(struct anv_pipeline *pipeline,
       .DoubleSidedStencilEnable = true,
 
       .StencilTestEnable = info->stencilTestEnable,
-      .StencilFailOp = vk_to_gen_stencil_op[info->front.stencilFailOp],
-      .StencilPassDepthPassOp = vk_to_gen_stencil_op[info->front.stencilPassOp],
-      .StencilPassDepthFailOp = vk_to_gen_stencil_op[info->front.stencilDepthFailOp],
-      .StencilTestFunction = vk_to_gen_compare_op[info->front.stencilCompareOp],
-
-      .BackfaceStencilFailOp = vk_to_gen_stencil_op[info->back.stencilFailOp],
-      .BackfaceStencilPassDepthPassOp = vk_to_gen_stencil_op[info->back.stencilPassOp],
-      .BackfaceStencilPassDepthFailOp = vk_to_gen_stencil_op[info->back.stencilDepthFailOp],
-      .BackFaceStencilTestFunction = vk_to_gen_compare_op[info->back.stencilCompareOp],
+      .StencilFailOp = vk_to_gen_stencil_op[info->front.failOp],
+      .StencilPassDepthPassOp = vk_to_gen_stencil_op[info->front.passOp],
+      .StencilPassDepthFailOp = vk_to_gen_stencil_op[info->front.depthFailOp],
+      .StencilTestFunction = vk_to_gen_compare_op[info->front.compareOp],
+
+      .BackfaceStencilFailOp = vk_to_gen_stencil_op[info->back.failOp],
+      .BackfaceStencilPassDepthPassOp = vk_to_gen_stencil_op[info->back.passOp],
+      .BackfaceStencilPassDepthFailOp = vk_to_gen_stencil_op[info->back.depthFailOp],
+      .BackFaceStencilTestFunction = vk_to_gen_compare_op[info->back.compareOp],
    };
 
    GEN7_DEPTH_STENCIL_STATE_pack(NULL, &pipeline->gen7.depth_stencil_state, &state);
index 88062a6f61bd4bcce890eccd0d70e6de6ec86a04..b6523b5ecf577564ae4034636e8d3a90478b811c 100644 (file)
@@ -231,7 +231,7 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
    if (cmd_buffer->state.dirty & (ANV_CMD_DIRTY_PIPELINE |
                                   ANV_CMD_DIRTY_DYNAMIC_DEPTH_BIAS)){
       bool enable_bias = cmd_buffer->state.dynamic.depth_bias.bias != 0.0f ||
-         cmd_buffer->state.dynamic.depth_bias.slope_scaled != 0.0f;
+         cmd_buffer->state.dynamic.depth_bias.slope != 0.0f;
 
       uint32_t raster_dw[GENX(3DSTATE_RASTER_length)];
       struct GENX(3DSTATE_RASTER) raster = {
@@ -240,7 +240,7 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
          .GlobalDepthOffsetEnableWireframe = enable_bias,
          .GlobalDepthOffsetEnablePoint = enable_bias,
          .GlobalDepthOffsetConstant = cmd_buffer->state.dynamic.depth_bias.bias,
-         .GlobalDepthOffsetScale = cmd_buffer->state.dynamic.depth_bias.slope_scaled,
+         .GlobalDepthOffsetScale = cmd_buffer->state.dynamic.depth_bias.slope,
          .GlobalDepthOffsetClamp = cmd_buffer->state.dynamic.depth_bias.clamp
       };
       GENX(3DSTATE_RASTER_pack)(NULL, raster_dw, &raster);
index fb0373c1f7e4180c8bf0bf162c821dd36096ee00..16143300cf1fccd35a00d83f7199424a753aa5fb 100644 (file)
@@ -313,14 +313,14 @@ emit_ds_state(struct anv_pipeline *pipeline,
       .DoubleSidedStencilEnable = true,
 
       .StencilTestEnable = info->stencilTestEnable,
-      .StencilFailOp = vk_to_gen_stencil_op[info->front.stencilFailOp],
-      .StencilPassDepthPassOp = vk_to_gen_stencil_op[info->front.stencilPassOp],
-      .StencilPassDepthFailOp = vk_to_gen_stencil_op[info->front.stencilDepthFailOp],
-      .StencilTestFunction = vk_to_gen_compare_op[info->front.stencilCompareOp],
-      .BackfaceStencilFailOp = vk_to_gen_stencil_op[info->back.stencilFailOp],
-      .BackfaceStencilPassDepthPassOp = vk_to_gen_stencil_op[info->back.stencilPassOp],
-      .BackfaceStencilPassDepthFailOp =vk_to_gen_stencil_op[info->back.stencilDepthFailOp],
-      .BackfaceStencilTestFunction = vk_to_gen_compare_op[info->back.stencilCompareOp],
+      .StencilFailOp = vk_to_gen_stencil_op[info->front.failOp],
+      .StencilPassDepthPassOp = vk_to_gen_stencil_op[info->front.passOp],
+      .StencilPassDepthFailOp = vk_to_gen_stencil_op[info->front.depthFailOp],
+      .StencilTestFunction = vk_to_gen_compare_op[info->front.compareOp],
+      .BackfaceStencilFailOp = vk_to_gen_stencil_op[info->back.failOp],
+      .BackfaceStencilPassDepthPassOp = vk_to_gen_stencil_op[info->back.passOp],
+      .BackfaceStencilPassDepthFailOp =vk_to_gen_stencil_op[info->back.depthFailOp],
+      .BackfaceStencilTestFunction = vk_to_gen_compare_op[info->back.compareOp],
    };
 
    GENX(3DSTATE_WM_DEPTH_STENCIL_pack)(NULL, dw, &wm_depth_stencil);