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,
}
}
+
+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 */
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:
{
_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);