aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
commitf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (patch)
tree15b5078011dc751f9c1a1bb21e51dc2e600ee205 /mesalib/src/mesa/main/dlist.c
parent165450290d6c26756ede118f52ba2164abce7c9a (diff)
downloadvcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.gz
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.bz2
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.zip
xserver mesa git update 13 Jul 2012
Diffstat (limited to 'mesalib/src/mesa/main/dlist.c')
-rw-r--r--mesalib/src/mesa/main/dlist.c126
1 files changed, 124 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index a827d132d..40961b15c 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -472,6 +472,15 @@ typedef enum
/* ARB_timer_query */
OPCODE_QUERY_COUNTER,
+ /* ARB_transform_feedback3 */
+ OPCODE_BEGIN_QUERY_INDEXED,
+ OPCODE_END_QUERY_INDEXED,
+ OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM,
+
+ /* ARB_transform_feedback_instanced */
+ OPCODE_DRAW_TRANSFORM_FEEDBACK_INSTANCED,
+ OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM_INSTANCED,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -504,6 +513,7 @@ union gl_dlist_node
GLuint ui;
GLenum e;
GLfloat f;
+ GLsizei si;
GLvoid *data;
void *next; /* If prev node's opcode==OPCODE_CONTINUE */
};
@@ -5338,7 +5348,6 @@ save_BeginQueryARB(GLenum target, GLuint id)
}
}
-
static void GLAPIENTRY
save_EndQueryARB(GLenum target)
{
@@ -5354,7 +5363,6 @@ save_EndQueryARB(GLenum target)
}
}
-
static void GLAPIENTRY
save_QueryCounter(GLuint id, GLenum target)
{
@@ -5371,6 +5379,39 @@ 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 */
@@ -6441,6 +6482,60 @@ save_DrawTransformFeedback(GLenum mode, GLuint name)
}
}
+static void GLAPIENTRY
+save_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM, 3);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].ui = stream;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackStream(ctx->Exec, (mode, name, stream));
+ }
+}
+
+static void GLAPIENTRY
+save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_INSTANCED, 3);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].si = primcount;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackInstanced(ctx->Exec, (mode, name, primcount));
+ }
+}
+
+static void GLAPIENTRY
+save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+ GLuint stream, GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM_INSTANCED, 4);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].ui = stream;
+ n[4].si = primcount;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackStreamInstanced(ctx->Exec, (mode, name, stream,
+ primcount));
+ }
+}
/* aka UseProgram() */
static void GLAPIENTRY
@@ -8368,6 +8463,12 @@ execute_list(struct gl_context *ctx, GLuint list)
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:
{
@@ -8686,6 +8787,18 @@ execute_list(struct gl_context *ctx, GLuint list)
case OPCODE_DRAW_TRANSFORM_FEEDBACK:
CALL_DrawTransformFeedback(ctx->Exec, (n[1].e, n[2].ui));
break;
+ case OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM:
+ CALL_DrawTransformFeedbackStream(ctx->Exec,
+ (n[1].e, n[2].ui, n[3].ui));
+ break;
+ case OPCODE_DRAW_TRANSFORM_FEEDBACK_INSTANCED:
+ CALL_DrawTransformFeedbackInstanced(ctx->Exec,
+ (n[1].e, n[2].ui, n[3].si));
+ break;
+ case OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM_INSTANCED:
+ CALL_DrawTransformFeedbackStreamInstanced(ctx->Exec,
+ (n[1].e, n[2].ui, n[3].ui, n[4].si));
+ break;
case OPCODE_BIND_SAMPLER:
@@ -10461,6 +10574,15 @@ _mesa_create_save_table(void)
SET_PauseTransformFeedback(table, save_PauseTransformFeedback);
SET_ResumeTransformFeedback(table, save_ResumeTransformFeedback);
SET_DrawTransformFeedback(table, save_DrawTransformFeedback);
+ SET_DrawTransformFeedbackStream(table, save_DrawTransformFeedbackStream);
+ SET_DrawTransformFeedbackInstanced(table,
+ save_DrawTransformFeedbackInstanced);
+ SET_DrawTransformFeedbackStreamInstanced(table,
+ save_DrawTransformFeedbackStreamInstanced);
+#if FEATURE_queryobj
+ SET_BeginQueryIndexed(table, save_BeginQueryIndexed);
+ SET_EndQueryIndexed(table, save_EndQueryIndexed);
+#endif
#endif
/* GL_ARB_instanced_arrays */