There is an object-level preemption workaround which requires this.
However, even without object-level preemption, we seem to have issues
with geometry flickering when 3D and compute are combined in the same
batch and this appears to fix it.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110395
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
}
}
+ if (devinfo->gen == 9 && pipeline == BRW_RENDER_PIPELINE) {
+ /* We seem to have issues with geometry flickering when 3D and compute
+ * are combined in the same batch and this appears to fix it.
+ */
+ const uint32_t subslices = MAX2(brw->screen->subslice_total, 1);
+ const uint32_t maxNumberofThreads =
+ devinfo->max_cs_threads * subslices - 1;
+
+ BEGIN_BATCH(9);
+ OUT_BATCH(MEDIA_VFE_STATE << 16 | (9 - 2));
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ OUT_BATCH(2 << 8 | maxNumberofThreads << 16);
+ OUT_BATCH(0);
+ OUT_BATCH(2 << 16);
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ ADVANCE_BATCH();
+ }
+
if (devinfo->gen >= 6) {
/* From "BXML » GT » MI » vol1a GPU Overview » [Instruction]
* PIPELINE_SELECT [DevBWR+]":