mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
iris: Add a separate PIPE_CONTROL_L3_READ_ONLY_CACHE_INVALIDATE bit
This will let us use it without performing a VF cache invalidation, should we want to do that. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15275>
This commit is contained in:
parent
b92cd58508
commit
8cd7e94eca
2 changed files with 14 additions and 4 deletions
|
|
@ -342,6 +342,7 @@ enum pipe_control_flags
|
|||
PIPE_CONTROL_TILE_CACHE_FLUSH = (1 << 25),
|
||||
PIPE_CONTROL_FLUSH_HDC = (1 << 26),
|
||||
PIPE_CONTROL_PSS_STALL_SYNC = (1 << 27),
|
||||
PIPE_CONTROL_L3_READ_ONLY_CACHE_INVALIDATE = (1 << 28),
|
||||
};
|
||||
|
||||
#define PIPE_CONTROL_CACHE_FLUSH_BITS \
|
||||
|
|
|
|||
|
|
@ -7741,6 +7741,18 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* The "L3 Read Only Cache Invalidation Bit" docs say it "controls the
|
||||
* invalidation of the Geometry streams cached in L3 cache at the top
|
||||
* of the pipe". In other words, index & vertex data that gets cached
|
||||
* in L3 when VERTEX_BUFFER_STATE::L3BypassDisable is set.
|
||||
*
|
||||
* Normally, invalidating L1/L2 read-only caches also invalidate their
|
||||
* related L3 cachelines, but this isn't the case for the VF cache.
|
||||
* Emulate it by setting the L3 Read Only bit when doing a VF invalidate.
|
||||
*/
|
||||
if (flags & PIPE_CONTROL_VF_CACHE_INVALIDATE)
|
||||
flags |= PIPE_CONTROL_L3_READ_ONLY_CACHE_INVALIDATE;
|
||||
|
||||
/* Recursive PIPE_CONTROL workarounds --------------------------------
|
||||
* (http://knowyourmeme.com/memes/xzibit-yo-dawg)
|
||||
*
|
||||
|
|
@ -8125,11 +8137,8 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
pc.StateCacheInvalidationEnable =
|
||||
flags & PIPE_CONTROL_STATE_CACHE_INVALIDATE;
|
||||
#if GFX_VER >= 12
|
||||
/* Invalidates the L3 cache part in which index & vertex data is loaded
|
||||
* when VERTEX_BUFFER_STATE::L3BypassDisable is set.
|
||||
*/
|
||||
pc.L3ReadOnlyCacheInvalidationEnable =
|
||||
flags & PIPE_CONTROL_VF_CACHE_INVALIDATE;
|
||||
flags & PIPE_CONTROL_L3_READ_ONLY_CACHE_INVALIDATE;
|
||||
#endif
|
||||
pc.VFCacheInvalidationEnable = flags & PIPE_CONTROL_VF_CACHE_INVALIDATE;
|
||||
pc.ConstantCacheInvalidationEnable =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue