--- src/mesa/main/dlist.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index a0d84cf..0b7caab 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -469,6 +469,10 @@ typedef enum OPCODE_BEGIN_CONDITIONAL_RENDER, OPCODE_END_CONDITIONAL_RENDER, + /* 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, @@ -5335,7 +5339,6 @@ save_BeginQueryARB(GLenum target, GLuint id) } } - static void GLAPIENTRY save_EndQueryARB(GLenum target) { @@ -5351,6 +5354,39 @@ save_EndQueryARB(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 */ @@ -8345,6 +8381,12 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_END_QUERY_ARB: CALL_EndQueryARB(ctx->Exec, (n[1].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: { @@ -10437,6 +10479,10 @@ _mesa_create_save_table(void) 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 */ -- 1.7.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev