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 <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10655>
This commit is contained in:
Dave Airlie 2021-06-07 05:28:07 +10:00
parent cb152e79f2
commit c25a5a832a
2 changed files with 4 additions and 0 deletions

View file

@ -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[];

View file

@ -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
};