iris: try and avoid pointless compute submissions
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 19 Oct 2018 09:12:29 +0000 (02:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
if apps don't use compute shaders, we don't even want to kick off the
compute initialization batch

src/gallium/drivers/iris/iris_context.c

index c594f19beb9120931e0c9559d22284a898889523..14c5d1dbad968000083708be144aaeab54491c93 100644 (file)
@@ -42,7 +42,9 @@ iris_flush(struct pipe_context *ctx,
    struct iris_context *ice = (struct iris_context *)ctx;
 
    iris_batch_flush(&ice->render_batch);
-   iris_batch_flush(&ice->compute_batch);
+
+   if (ice->compute_batch.contains_draw)
+      iris_batch_flush(&ice->compute_batch);
 
    // XXX: bogus!!!
    if (fence)