From 2dd321963f1a5dc21c3b9fc96a273c0b2159198d Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sat, 6 Apr 2024 18:00:23 +0300 Subject: [PATCH] isl: set NullPageCoherencyEnable for depth/stencil sparse surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not setting this bits, it seems we get incorrect depth values (i.e not zero) for null depth/stencil tiles. Fixes vkd3d-proton's test_sparse_depth_stencil_rendering CTS doesn´t seem to exercise any depth/stencil format. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Tapani Pälli Part-of: --- src/intel/isl/isl_emit_depth_stencil.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/isl/isl_emit_depth_stencil.c b/src/intel/isl/isl_emit_depth_stencil.c index 4d82f539824b2..d7d2f24c43a3a 100644 --- a/src/intel/isl/isl_emit_depth_stencil.c +++ b/src/intel/isl/isl_emit_depth_stencil.c @@ -200,6 +200,9 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch, #if GFX_VER == 12 db.ControlSurfaceEnable = db.DepthBufferCompressionEnable = isl_aux_usage_has_ccs(info->hiz_usage); +#endif +#if GFX_VER >= 12 + db.NullPageCoherencyEnable = info->depth_surf->usage & ISL_SURF_USAGE_SPARSE_BIT; #endif } @@ -271,6 +274,9 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch, #if GFX_VER >= 8 sb.SurfaceQPitch = isl_surf_get_array_pitch_el_rows(info->stencil_surf) >> 2; +#endif +#if GFX_VER >= 12 + sb.NullPageCoherencyEnable = info->stencil_surf->usage & ISL_SURF_USAGE_SPARSE_BIT; #endif } else { #if GFX_VER >= 12