[Mesa-dev] [PATCH 2/4] i965: set DisjointOperation true on timestamp overflow

Tapani Pälli tapani.palli at intel.com
Mon Nov 20 07:18:28 UTC 2017


Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 src/mesa/drivers/dri/i965/brw_queryobj.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index bd3f5738eb..b7885430c6 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -71,6 +71,10 @@ brw_raw_timestamp_delta(struct brw_context *brw, uint64_t time0, uint64_t time1)
       return (uint32_t)time1 - (uint32_t)time0;
    } else {
       if (time0 > time1) {
+         struct gl_context *ctx = &brw->ctx;
+         simple_mtx_lock(&ctx->Shared->Mutex);
+         ctx->Shared->DisjointOperation = true;
+         simple_mtx_unlock(&ctx->Shared->Mutex);
          return (1ULL << 36) + time1 - time0;
       } else {
          return time1 - time0;
-- 
2.14.3



More information about the mesa-dev mailing list