From c25a5a832aa7ff8f2cadf846b0233da1aa881038 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 7 Jun 2021 05:28:07 +1000 Subject: [PATCH] intel/isl: add levels and minimum array element to null fill gen4/5 needs these to avoid gpu hangs around matching depth/null surfaces Reviewed-by: Jason Ekstrand Part-of: --- src/intel/isl/isl.h | 2 ++ src/intel/isl/isl_surface_state.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index def32ece1f7..353ac7be266 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -1522,6 +1522,8 @@ struct isl_depth_stencil_hiz_emit_info { struct isl_null_fill_state_info { struct isl_extent3d size; + uint32_t levels; + uint32_t minimum_array_element; }; extern const struct isl_format_layout isl_format_layouts[]; diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 10c6d54a645..aafb12f8210 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -961,11 +961,13 @@ isl_genX(null_fill_state)(void *state, */ .SurfaceVerticalAlignment = VALIGN_4, #endif + .MIPCountLOD = info->levels, .Width = info->size.width - 1, .Height = info->size.height - 1, .Depth = info->size.depth - 1, .RenderTargetViewExtent = info->size.depth - 1, #if GFX_VER <= 5 + .MinimumArrayElement = info->minimum_array_element, .ColorBufferComponentWriteDisables = 0xf, #endif };