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 <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
This commit is contained in:
Kenneth Graunke
2021-10-19 16:34:42 -07:00
committed by Marge Bot
parent c27fcb1d3b
commit edce4649b8
+1
View File
@@ -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