iris: Bail on queries for INTEL_NO_HW=1.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 19 Jun 2019 04:47:12 +0000 (23:47 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 19 Jun 2019 16:55:43 +0000 (11:55 -0500)
We don't execute any of the commands to record snapshots, so we can't
actually produce a real result.  We do however need to avoid waiting
on a syncpt which will never be signalled.  So, just return 0.

src/gallium/drivers/iris/iris_query.c

index 6d9659080a7b182fed8652c95663b8d96a989278..d30011fe4674430f4bc44e16fdeb9ce89a19b706 100644 (file)
@@ -859,6 +859,11 @@ iris_get_query_result(struct pipe_context *ctx,
    const struct gen_device_info *devinfo = &screen->devinfo;
    struct iris_bo *bo = iris_resource_bo(q->query_state_ref.res);
 
+   if (unlikely(screen->no_hw)) {
+      result->u64 = 0;
+      return true;
+   }
+
    if (!q->ready) {
       if (iris_batch_references(&ice->batches[q->batch_idx], bo))
          iris_batch_flush(&ice->batches[q->batch_idx]);