iris: enable preemption support for gen10
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 19 Apr 2019 13:04:59 +0000 (09:04 -0400)
committerRafael Antognolli <rafael.antognolli@intel.com>
Wed, 24 Apr 2019 21:47:47 +0000 (14:47 -0700)
this automatically enables preemption on gen10 where it is disabled by
default but still available

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/gallium/drivers/iris/iris_context.c

index a1d11755a24110cfc28ffa18e4ee83e722d66a84..91cd6a02262bc9f781a74e2957b295cd9d24bf34 100644 (file)
@@ -218,6 +218,8 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
 
    ice->vtbl.init_render_context(screen, &ice->batches[IRIS_BATCH_RENDER],
                                  &ice->vtbl, &ice->dbg);
+   if (screen->devinfo.gen == 10)
+      gen10_iris_enable_obj_preemption(ice, &ice->batches[IRIS_BATCH_RENDER], true);
    ice->vtbl.init_compute_context(screen, &ice->batches[IRIS_BATCH_COMPUTE],
                                   &ice->vtbl, &ice->dbg);