From b4310ef8eebfd44ee21cbcd1bfbc98f1153b92dd Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 19 Oct 2021 14:12:32 -0700 Subject: [PATCH] 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 Part-of: --- src/intel/vulkan/genX_cmd_buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 3079cd93fb3..cad03267879 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -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;