mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
iris: Add support for flushing the blitter (hackily)
To flush the blitter, we need to use MI_FLUSH_DW rather than the usual PIPE_CONTROL we use on the 3D engine. Most of our code is set up to suggest flushes via PIPE_CONTROL commands, however, so we hackily just emit MI_FLUSH_DW when they ask for any kind of PIPE_CONTROL flush. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14912>
This commit is contained in:
parent
9c5dc4985b
commit
604d97671b
1 changed files with 23 additions and 0 deletions
|
|
@ -7651,6 +7651,29 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
|
|||
enum pipe_control_flags non_lri_post_sync_flags =
|
||||
post_sync_flags & ~PIPE_CONTROL_LRI_POST_SYNC_OP;
|
||||
|
||||
#if GFX_VER >= 12
|
||||
if (batch->name == IRIS_BATCH_BLITTER) {
|
||||
batch_mark_sync_for_pipe_control(batch, flags);
|
||||
iris_batch_sync_region_start(batch);
|
||||
|
||||
/* The blitter doesn't actually use PIPE_CONTROL; rather it uses the
|
||||
* MI_FLUSH_DW command. However, all of our code is set up to flush
|
||||
* via emitting a pipe control, so we just translate it at this point,
|
||||
* even if it is a bit hacky.
|
||||
*/
|
||||
iris_emit_cmd(batch, GENX(MI_FLUSH_DW), fd) {
|
||||
fd.Address = rw_bo(bo, offset, IRIS_DOMAIN_OTHER_WRITE);
|
||||
fd.ImmediateData = imm;
|
||||
#if GFX_VERx10 >= 125
|
||||
/* TODO: This may not always be necessary */
|
||||
fd.FlushCCS = true;
|
||||
#endif
|
||||
}
|
||||
iris_batch_sync_region_end(batch);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Recursive PIPE_CONTROL workarounds --------------------------------
|
||||
* (http://knowyourmeme.com/memes/xzibit-yo-dawg)
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue