mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
anv/pipeline: Implement the depth compare EQUAL workaround on gen8+
This commit is contained in:
parent
7c1660aa14
commit
1afdfc3e6e
1 changed files with 8 additions and 0 deletions
|
|
@ -238,6 +238,14 @@ emit_ds_state(struct anv_pipeline *pipeline,
|
|||
.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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue