aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2017-12-12 14:46:13 +0200
committerTapani Pälli <[email protected]>2017-12-15 08:42:48 +0200
commit33f73345da01a70aa0e5d61069508e169cb6a6ed (patch)
treeeda993eebaeee58b75d6742a8c6b61945efc4351 /src/mesa/main/get.c
parent0a202dd5e82b6796e919b5f970f8f79622967174 (diff)
mesa: GL_EXT_disjoint_timer_query extension API bits
Patch adds GL_GPU_DISJOINT_EXT and enables to use timer queries when EXT_disjoint_timer_query is enabled. v2: enable extension only when EXT_disjoint_timer_query set Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> (v1) Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index c1b1a89ee05..7f2d72aa4bd 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -578,6 +578,13 @@ static const int extra_EXT_provoking_vertex_32[] = {
EXTRA_END
};
+static const int extra_EXT_disjoint_timer_query[] = {
+ EXTRA_API_ES2,
+ EXTRA_API_ES3,
+ EXT(EXT_disjoint_timer_query),
+ EXTRA_END
+};
+
/* This is the big table describing all the enums we accept in
* glGet*v(). The table is partitioned into six parts: enums
@@ -1160,6 +1167,16 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_int_n.ints[0] = GL_PROGRAM_BINARY_FORMAT_MESA;
}
break;
+ /* GL_EXT_disjoint_timer_query */
+ case GL_GPU_DISJOINT_EXT:
+ {
+ simple_mtx_lock(&ctx->Shared->Mutex);
+ v->value_int = ctx->Shared->DisjointOperation;
+ /* Reset state as expected by the spec. */
+ ctx->Shared->DisjointOperation = false;
+ simple_mtx_unlock(&ctx->Shared->Mutex);
+ }
+ break;
}
}