intel/blorp/gfx12+: Drop unnecessary state cache invalidation from binding table setup.

The state cache invalidation shouldn't be necessary on recent
platforms.  On ICL it *seems* to be required to get the hardware to
pick up an updated indirect clear color, so this change is only
applied to TGL platforms and later for the moment.

On some DG2 configs this seems to improve SynMark2/OglDrvRes by 16.0%
±0.1%, n=8.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13569>
This commit is contained in:
Francisco Jerez 2021-10-26 16:51:19 -07:00
parent c6455cfec9
commit a748b264e8

View file

@ -1625,7 +1625,7 @@ blorp_setup_binding_table(struct blorp_batch *batch,
}
}
#if GFX_VER >= 7
#if GFX_VER >= 7 && GFX_VER < 12
if (has_indirect_clear_color) {
/* Updating a surface state object may require that the state cache be
* invalidated. From the SKL PRM, Shared Functions -> State -> State
@ -1635,6 +1635,12 @@ blorp_setup_binding_table(struct blorp_batch *batch,
* the Binding Table Pointer (BTP) and Binding Table Index (BTI) is
* modified [...], the L1 state cache must be invalidated to ensure
* the new surface or sampler state is fetched from system memory.
*
* XXX - Investigate why exactly this invalidation is necessary to
* avoid Vulkan regressions on ICL. It's possible that the
* MI_ATOMIC used to update the clear color isn't correctly
* ordered with the pre-existing invalidation in
* blorp_update_clear_color().
*/
blorp_emit(batch, GENX(PIPE_CONTROL), pipe) {
pipe.StateCacheInvalidationEnable = true;