iris: 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 05:27:04 -07:00 committed by Marge Bot
parent 0a5e225779
commit 8336054024
1 changed files with 4 additions and 1 deletions

View File

@ -3116,7 +3116,10 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
.swizzle = ISL_SWIZZLE_IDENTITY,
};
struct isl_depth_stencil_hiz_emit_info info = { .view = &view };
struct isl_depth_stencil_hiz_emit_info info = {
.view = &view,
.mocs = iris_mocs(NULL, isl_dev, ISL_SURF_USAGE_DEPTH_BIT),
};
if (cso->zsbuf) {
iris_get_depth_stencil_resources(cso->zsbuf->texture, &zres,