intel/blorp: move Wa_18019816803 out of blorp code

The driver already need to track this WA for blorp. We can completely
remove any blorp code dealing with this and instead have the flush
required by the workaround be combined with potential other flushes
the driver already has to insert before blorp operations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26247>
This commit is contained in:
Lionel Landwerlin
2023-11-08 12:14:09 +02:00
committed by Marge Bot
parent 6e85fa8a80
commit ec3f8c0d42
4 changed files with 20 additions and 21 deletions

View File

@@ -287,6 +287,7 @@ iris_blorp_exec_render(struct blorp_batch *blorp_batch,
{
struct iris_context *ice = blorp_batch->blorp->driver_ctx;
struct iris_batch *batch = blorp_batch->driver_batch;
uint32_t pc_flags = 0;
#if GFX_VER >= 11
/* The PIPE_CONTROL command description says:
@@ -297,10 +298,8 @@ iris_blorp_exec_render(struct blorp_batch *blorp_batch,
* is set due to new association of BTI, PS Scoreboard Stall bit must
* be set in this packet."
*/
iris_emit_pipe_control_flush(batch,
"workaround: RT BTI change [blorp]",
PIPE_CONTROL_RENDER_TARGET_FLUSH |
PIPE_CONTROL_STALL_AT_SCOREBOARD);
pc_flags = PIPE_CONTROL_RENDER_TARGET_FLUSH |
PIPE_CONTROL_STALL_AT_SCOREBOARD;
#endif
/* Check if blorp ds state matches ours. */
@@ -308,11 +307,17 @@ iris_blorp_exec_render(struct blorp_batch *blorp_batch,
const bool blorp_ds_state =
params->depth.enabled || params->stencil.enabled;
if (ice->state.ds_write_state != blorp_ds_state) {
blorp_batch->flags |= BLORP_BATCH_NEED_PSS_STALL_SYNC;
pc_flags |= PIPE_CONTROL_PSS_STALL_SYNC;
ice->state.ds_write_state = blorp_ds_state;
}
}
if (pc_flags != 0) {
iris_emit_pipe_control_flush(batch,
"workaround: prior to [blorp]",
pc_flags);
}
if (params->depth.enabled &&
!(blorp_batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL))
genX(emit_depth_state_workarounds)(ice, batch, &params->depth.surf);