From 415b824bc6dc8f0fce517f8fa1e38df94de15502 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Wed, 2 Nov 2022 12:48:25 +0200 Subject: [PATCH] iris: implement occlusion query related Wa_14017076903 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes artifacts on some games that relied on occlusion query results when no PS or depth buffers are bound. Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_state.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 725c03b..7e95a5b 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -4266,6 +4266,17 @@ iris_create_so_decl_list(const struct pipe_stream_output_info *info, sol.Buffer1SurfacePitch = 4 * info->stride[1]; sol.Buffer2SurfacePitch = 4 * info->stride[2]; sol.Buffer3SurfacePitch = 4 * info->stride[3]; + +#if INTEL_NEEDS_WA_14017076903 + /* Wa_14017076903 : SOL should be programmed to force the + * rendering to be enabled. + * + * This fixes a rare case where SOL must render to get correct + * occlusion query results even when no PS and depth buffers are + * bound. + */ + sol.ForceRendering = Force_on; +#endif } iris_pack_command(GENX(3DSTATE_SO_DECL_LIST), so_decl_map, list) { -- 2.7.4