blorp: Use a non-zero MOCS for disabled constant buffers
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 19 Oct 2021 06:32:46 +0000 (23:32 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Oct 2021 19:45:55 +0000 (19:45 +0000)
commitfc5168b01d2c9b8a1e84bfdf8ca3950bf3121a59
treeb832b687b240d890819a9a877c3f15ce0c223a97
parent28a503c1a17b24da362b2596356684b5ca2f3c8d
blorp: Use a non-zero MOCS for disabled constant 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 constant buffers, where 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 constant
buffers; 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>
src/intel/blorp/blorp_genX_exec.h