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>
isl_null_fill_state_s(const struct isl_device *dev, void *state,
const struct isl_null_fill_state_info *restrict info)
{
- isl_genX_call(dev, null_fill_state, state, info);
+ isl_genX_call(dev, null_fill_state, dev, state, info);
}
void
const struct isl_depth_stencil_hiz_emit_info *restrict info);
void
-isl_genX(null_fill_state)(void *state,
+isl_genX(null_fill_state)(const struct isl_device *dev, void *state,
const struct isl_null_fill_state_info *restrict info);
}
void
-isl_genX(null_fill_state)(void *state,
+isl_genX(null_fill_state)(const struct isl_device *dev, void *state,
const struct isl_null_fill_state_info *restrict info)
{
struct GENX(RENDER_SURFACE_STATE) s = {
.TiledSurface = true,
.TileWalk = TILEWALK_YMAJOR,
#endif
+#if GFX_VER >= 6
+ .MOCS = isl_mocs(dev, 0, false),
+#endif
#if GFX_VER == 7
/* According to PRMs: "Volume 4 Part 1: Subsystem and Cores – Shared
* Functions"