anv: Set default MOCS for NULL depth/stencil/HiZ buffers

isl now uses info->mocs regardless of whether there's any actual
depth/stencil/HiZ buffers involved, so pass it a legitimate one,
rather than zero.  When we have entirely NULL surfaces, we just
default to isl's MOCS value for an internal depth buffer.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
This commit is contained in:
Kenneth Graunke 2021-10-19 14:12:32 -07:00 committed by Marge Bot
parent d8cb76211c
commit b4310ef8ee

View file

@ -5795,7 +5795,9 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
if (dw == NULL)
return;
struct isl_depth_stencil_hiz_emit_info info = { };
struct isl_depth_stencil_hiz_emit_info info = {
.mocs = anv_mocs(device, NULL, ISL_SURF_USAGE_DEPTH_BIT),
};
if (iview)
info.view = &iview->planes[0].isl;