aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-11 12:00:44 +0200
committermarha <marha@users.sourceforge.net>2012-07-11 12:00:44 +0200
commitdb967c2b0fd8506b9e1cf7574d5fb927bec786c5 (patch)
tree5444de1e304af7b5ae8c4b590a08b1b5964c7eca /mesalib/src/mesa/main/dlist.c
parent6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (diff)
parent0bef135026040688be97af98cc99cc82f93838e8 (diff)
downloadvcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.tar.gz
vcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.tar.bz2
vcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/devices.c
Diffstat (limited to 'mesalib/src/mesa/main/dlist.c')
-rw-r--r--mesalib/src/mesa/main/dlist.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index a0d84cfdc..a827d132d 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -469,6 +469,9 @@ typedef enum
OPCODE_BEGIN_CONDITIONAL_RENDER,
OPCODE_END_CONDITIONAL_RENDER,
+ /* ARB_timer_query */
+ OPCODE_QUERY_COUNTER,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -5351,6 +5354,23 @@ save_EndQueryARB(GLenum target)
}
}
+
+static void GLAPIENTRY
+save_QueryCounter(GLuint id, GLenum target)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_QUERY_COUNTER, 2);
+ if (n) {
+ n[1].ui = id;
+ n[2].e = target;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_QueryCounter(ctx->Exec, (id, target));
+ }
+}
+
#endif /* FEATURE_queryobj */
@@ -8345,6 +8365,9 @@ execute_list(struct gl_context *ctx, GLuint list)
case OPCODE_END_QUERY_ARB:
CALL_EndQueryARB(ctx->Exec, (n[1].e));
break;
+ case OPCODE_QUERY_COUNTER:
+ CALL_QueryCounter(ctx->Exec, (n[1].ui, n[2].e));
+ break;
#endif
case OPCODE_DRAW_BUFFERS_ARB:
{
@@ -10309,6 +10332,7 @@ _mesa_create_save_table(void)
_mesa_init_queryobj_dispatch(table); /* glGetQuery, etc */
SET_BeginQueryARB(table, save_BeginQueryARB);
SET_EndQueryARB(table, save_EndQueryARB);
+ SET_QueryCounter(table, save_QueryCounter);
#endif
SET_DrawBuffersARB(table, save_DrawBuffersARB);