/* ARB_timer_query */
OPCODE_QUERY_COUNTER,
+ /* ARB_transform_feedback3 */
+ OPCODE_BEGIN_QUERY_INDEXED,
+ OPCODE_END_QUERY_INDEXED,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
}
}
-
static void GLAPIENTRY
save_EndQueryARB(GLenum target)
{
}
}
-
static void GLAPIENTRY
save_QueryCounter(GLuint id, GLenum target)
{
}
}
+static void GLAPIENTRY
+save_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_QUERY_INDEXED, 3);
+ if (n) {
+ n[1].e = target;
+ n[2].ui = index;
+ n[3].ui = id;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BeginQueryIndexed(ctx->Exec, (target, index, id));
+ }
+}
+
+static void GLAPIENTRY
+save_EndQueryIndexed(GLenum target, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_END_QUERY_INDEXED, 2);
+ if (n) {
+ n[1].e = target;
+ n[2].ui = index;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_EndQueryIndexed(ctx->Exec, (target, index));
+ }
+}
+
#endif /* FEATURE_queryobj */
case OPCODE_QUERY_COUNTER:
CALL_QueryCounter(ctx->Exec, (n[1].ui, n[2].e));
break;
+ case OPCODE_BEGIN_QUERY_INDEXED:
+ CALL_BeginQueryIndexed(ctx->Exec, (n[1].e, n[2].ui, n[3].ui));
+ break;
+ case OPCODE_END_QUERY_INDEXED:
+ CALL_EndQueryIndexed(ctx->Exec, (n[1].e, n[2].ui));
+ break;
#endif
case OPCODE_DRAW_BUFFERS_ARB:
{
SET_PauseTransformFeedback(table, save_PauseTransformFeedback);
SET_ResumeTransformFeedback(table, save_ResumeTransformFeedback);
SET_DrawTransformFeedback(table, save_DrawTransformFeedback);
+#if FEATURE_queryobj
+ SET_BeginQueryIndexed(table, save_BeginQueryIndexed);
+ SET_EndQueryIndexed(table, save_EndQueryIndexed);
+#endif
#endif
/* GL_ARB_instanced_arrays */