crocus: Set MOCS on NULL stream output buffers
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 19 Oct 2021 22:30:35 +0000 (15:30 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Oct 2021 19:45:55 +0000 (19:45 +0000)
commit737b3fae737821bb7d585bf218b03b40aadd167b
tree0b13f090bba3d100fed58c501ae847a6969c8ea9
parentde99b5502b11f02e0470a6af8bf27ec94e2669cb
crocus: Set MOCS on NULL stream output buffers

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 disabled stream output targets,  MOCS shouldn't matter, as
there's no actual buffer to be cached.

That said, it should be harmless to set MOCS for these null stream
output buffers; we can just assume a MOCS for generic internal buffers.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
src/gallium/drivers/crocus/crocus_state.c