diff options
author | Jason Ekstrand <[email protected]> | 2016-05-31 22:19:53 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-06-03 19:29:28 -0700 |
commit | bc7f7e195389e334ae8a5ee7d6f85b9e27983ca4 (patch) | |
tree | 5ae35996d60074063a44d836f344b33b5e2b6bcc /src/intel/vulkan/gen8_pipeline.c | |
parent | fdc3c5dd05dc072fe9b4975091308d02e6df6037 (diff) |
anv/pipeline: Unify gen7/8 emit_ds_state
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen8_pipeline.c')
-rw-r--r-- | src/intel/vulkan/gen8_pipeline.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c index d96669494a2..cbeb791b751 100644 --- a/src/intel/vulkan/gen8_pipeline.c +++ b/src/intel/vulkan/gen8_pipeline.c @@ -216,55 +216,6 @@ emit_cb_state(struct anv_pipeline *pipeline, } static void -emit_ds_state(struct anv_pipeline *pipeline, - const VkPipelineDepthStencilStateCreateInfo *info) -{ - uint32_t *dw = GEN_GEN == 8 ? - pipeline->gen8.wm_depth_stencil : pipeline->gen9.wm_depth_stencil; - - if (info == NULL) { - /* We're going to OR this together with the dynamic state. We need - * to make sure it's initialized to something useful. - */ - memset(pipeline->gen8.wm_depth_stencil, 0, - sizeof(pipeline->gen8.wm_depth_stencil)); - memset(pipeline->gen9.wm_depth_stencil, 0, - sizeof(pipeline->gen9.wm_depth_stencil)); - return; - } - - /* VkBool32 depthBoundsTestEnable; // optional (depth_bounds_test) */ - - struct GENX(3DSTATE_WM_DEPTH_STENCIL) wm_depth_stencil = { - .DepthTestEnable = info->depthTestEnable, - .DepthBufferWriteEnable = info->depthWriteEnable, - .DepthTestFunction = vk_to_gen_compare_op[info->depthCompareOp], - .DoubleSidedStencilEnable = true, - - .StencilTestEnable = info->stencilTestEnable, - .StencilBufferWriteEnable = info->stencilTestEnable, - .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], - }; - - /* From the Broadwell PRM: - * - * "If Depth_Test_Enable = 1 AND Depth_Test_func = EQUAL, the - * Depth_Write_Enable must be set to 0." - */ - if (info->depthTestEnable && info->depthCompareOp == VK_COMPARE_OP_EQUAL) - wm_depth_stencil.DepthBufferWriteEnable = false; - - GENX(3DSTATE_WM_DEPTH_STENCIL_pack)(NULL, dw, &wm_depth_stencil); -} - -static void emit_ms_state(struct anv_pipeline *pipeline, const VkPipelineMultisampleStateCreateInfo *info) { |