From edce4649b87638cd5bbfb3553bb4744139439a4c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 19 Oct 2021 16:34:42 -0700 Subject: [PATCH] blorp: Fill in MOCS even for SURFTYPE_NULL surfaces. We'd like to add safeguards against accidental use of MOCS 0 (uncached), which can have large performance implications. One case where we use MOCS of 0 is SURFTYPE_NULL surfaces, where MOCS really shouldn't matter, as there's no actual surface to be cached. That said, it should be harmless to set MOCS for these null surfaces; we can just assume a generic MOCS for internal buffers. Reviewed-by: Jason Ekstrand Part-of: --- src/intel/blorp/blorp_genX_exec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index b9149726a8e..26da24ace50 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -1534,6 +1534,7 @@ blorp_emit_null_surface_state(struct blorp_batch *batch, .RenderTargetViewExtent = surface->view.array_len - 1, #if GFX_VER >= 6 .NumberofMultisamples = ffs(surface->surf.samples) - 1, + .MOCS = isl_mocs(batch->blorp->isl_dev, 0, false), #endif #if GFX_VER >= 7