From 79a58cb79bc75b54e7bf5dfe7bd607e4e6057961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20M=C3=A4kel=C3=A4?= Date: Sat, 19 Nov 2022 21:06:20 +0200 Subject: [PATCH] hasvk: Enable PixelShaderKillsPixel when omask is used From the Haswell PRM Vol. 2b, 3DSTATE_WM::Pixel Shader Kill Pixel: "This bit is required to be ENABLED in the following situations: - The API pixel shader program contains "killpix" or "discard" instructions, or other code in the pixel shader kernel that can cause the final pixel mask to differ from the pixel mask received on dispatch. - A sampler with chroma key enabled with kill pixel mode is used by the pixel shader. - Any render target has Alpha Test Enable or AlphaToCoverage Enable enabled. - The pixel shader kernel generates and outputs oMask." Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan_hasvk/genX_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan_hasvk/genX_pipeline.c b/src/intel/vulkan_hasvk/genX_pipeline.c index 39da75d377e..4255b2abf77 100644 --- a/src/intel/vulkan_hasvk/genX_pipeline.c +++ b/src/intel/vulkan_hasvk/genX_pipeline.c @@ -1597,7 +1597,8 @@ emit_3dstate_wm(struct anv_graphics_pipeline *pipeline, */ wm.PixelShaderKillsPixel = rp->depth_self_dependency || rp->stencil_self_dependency || - wm_prog_data->uses_kill; + wm_prog_data->uses_kill || + wm_prog_data->uses_omask; pipeline->force_fragment_thread_dispatch = wm.PixelShaderComputedDepthMode != PSCDEPTH_OFF ||