iris: implement occlusion query related Wa_14017076903

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 <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21721>
This commit is contained in:
Tapani Pälli 2022-11-02 12:48:25 +02:00 committed by Marge Bot
parent c34916f841
commit 415b824bc6

View file

@ -4266,6 +4266,17 @@ iris_create_so_decl_list(const struct pipe_stream_output_info *info,
sol.Buffer1SurfacePitch = 4 * info->stride[1]; sol.Buffer1SurfacePitch = 4 * info->stride[1];
sol.Buffer2SurfacePitch = 4 * info->stride[2]; sol.Buffer2SurfacePitch = 4 * info->stride[2];
sol.Buffer3SurfacePitch = 4 * info->stride[3]; 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) { iris_pack_command(GENX(3DSTATE_SO_DECL_LIST), so_decl_map, list) {