iris: Wa 16014538804 for DG2, MTL A0

Send empty/dummy PIPE_CONTROL after every third 3DPRIMITIVE command.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25039>
This commit is contained in:
Rohan Garg 2023-10-26 15:37:25 +02:00 committed by Marge Bot
parent 1b03acb26b
commit 8ce3b99bc1
3 changed files with 22 additions and 0 deletions

View file

@ -212,6 +212,8 @@ struct iris_batch {
/** Batch wrapper structure for perfetto */
struct intel_ds_queue ds;
uint8_t num_3d_primitives_emitted;
};
void iris_init_batches(struct iris_context *ice);

View file

@ -44,6 +44,7 @@ void genX(update_pma_fix)(struct iris_context *ice,
void genX(invalidate_aux_map_state)(struct iris_batch *batch);
void genX(emit_breakpoint)(struct iris_batch *batch, bool emit_before_draw);
void genX(emit_3dprimitive_was)(struct iris_batch *batch);
static inline void
genX(maybe_emit_breakpoint)(struct iris_batch *batch,

View file

@ -7869,6 +7869,24 @@ genX(emit_breakpoint)(struct iris_batch *batch, bool emit_before_draw)
}
}
void
genX(emit_3dprimitive_was)(struct iris_batch *batch)
{
UNUSED const struct intel_device_info *devinfo = batch->screen->devinfo;
#if INTEL_NEEDS_WA_16014538804
if (!intel_needs_workaround(devinfo, 16014538804))
return;
batch->num_3d_primitives_emitted++;
/* Wa_16014538804 - Send empty/dummy pipe control after 3 3DPRIMITIVE. */
if (batch->num_3d_primitives_emitted == 3) {
iris_emit_pipe_control_flush(batch, "Wa_16014538804", 0);
batch->num_3d_primitives_emitted = 0;
}
#endif
}
static void
iris_upload_render_state(struct iris_context *ice,
struct iris_batch *batch,
@ -8114,6 +8132,7 @@ iris_upload_render_state(struct iris_context *ice,
}
}
genX(emit_3dprimitive_was)(batch);
genX(maybe_emit_breakpoint)(batch, false);
#if GFX_VERx10 == 125