crocus: 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 the MOCS value for an internal 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 15:33:00 -07:00 committed by Marge Bot
parent 737b3fae73
commit 798cc4be1b
1 changed files with 4 additions and 1 deletions

View File

@ -7431,7 +7431,10 @@ crocus_upload_dirty_render_state(struct crocus_context *ice,
.array_len = 1,
.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 = crocus_mocs(NULL, isl_dev),
};
if (cso->zsbuf) {
crocus_get_depth_stencil_resources(&batch->screen->devinfo, cso->zsbuf->texture, &zres, &sres);