iris: fix random failures via CS stall...but why?
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 27 Sep 2018 10:50:26 +0000 (12:50 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_query.c

index fac5e6b5e9965ac8c452d3fe1c697157d5f50285..f746349361da328061eee4007c4805a59f0851fa 100644 (file)
@@ -359,6 +359,12 @@ iris_get_query_result_resource(struct pipe_context *ctx,
          ice->vtbl.store_data_imm64(batch, iris_resource_bo(p_res), offset,
                                     q->result);
       }
+
+      /* Make sure the result lands before they use bind the QBO elsewhere
+       * and use the result.
+       */
+      // XXX: Why?  i965 doesn't do this.
+      iris_emit_pipe_control_flush(batch, PIPE_CONTROL_CS_STALL);
       return;
    }