diff options
author | Danylo Piliaiev <[email protected]> | 2019-08-01 13:57:14 +0300 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-08-08 13:39:15 +0000 |
commit | b8842bc3128a255677a1a8ea5207df46f8e54a04 (patch) | |
tree | cce70187d7af24768bc3866b0fdcf99c174ed5ed /src/mesa/drivers/dri | |
parent | 23a9d20997517dfff7f35e3a6c2b954564f0f6c4 (diff) |
i965: Emit a dummy MEDIA_VFE_STATE before switching from GPGPU to 3D
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 <[email protected]>
Signed-off-by: Danylo Piliaiev <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_misc_state.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index b752294250e..e73cadc5d3e 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -493,6 +493,27 @@ brw_emit_select_pipeline(struct brw_context *brw, enum brw_pipeline pipeline) } } + 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+]": |