From 80d96ca4c862dcf275b93e603916193094c59d6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Mon, 20 Nov 2017 08:31:40 +0200 Subject: [PATCH] mesa: add DisjointOperation to gl_shared_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This state will be used by EXT_disjoint_timer_query. As first usage, patch sets DisjointOperation true when gpu reset happens. Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Reviewed-by: Ian Romanick --- src/mesa/main/mtypes.h | 8 ++++++++ src/mesa/main/robustness.c | 1 + 2 files changed, 9 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b372921e9f0..0aac49402e8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3310,6 +3310,14 @@ struct gl_shared_state /** EXT_external_objects */ struct _mesa_HashTable *MemoryObjects; + /** + * Some context in this share group was affected by a disjoint + * operation. This operation can be anything that has effects on + * values of timer queries in such manner that they become invalid for + * performance metrics. As example gpu reset, counter overflow or gpu + * frequency changes. + */ + bool DisjointOperation; }; diff --git a/src/mesa/main/robustness.c b/src/mesa/main/robustness.c index a61c07f125f..e7d7007da48 100644 --- a/src/mesa/main/robustness.c +++ b/src/mesa/main/robustness.c @@ -145,6 +145,7 @@ _mesa_GetGraphicsResetStatusARB( void ) */ if (status != GL_NO_ERROR) { ctx->Shared->ShareGroupReset = true; + ctx->Shared->DisjointOperation = true; } else if (ctx->Shared->ShareGroupReset && !ctx->ShareGroupReset) { status = GL_INNOCENT_CONTEXT_RESET_ARB; } -- 2.30.2