aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo
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/vbo
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/vbo')
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_array.c62
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_api.c45
2 files changed, 101 insertions, 6 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c
index d2854dd6c..a923aa1fa 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_array.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_array.c
@@ -1286,12 +1286,17 @@ vbo_exec_MultiDrawElementsBaseVertex(GLenum mode,
static void
vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj,
- GLuint numInstances)
+ GLuint stream, GLuint numInstances)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
struct _mesa_prim prim[2];
+ if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj, stream,
+ numInstances)) {
+ return;
+ }
+
vbo_bind_arrays(ctx);
/* init most fields to zero */
@@ -1334,11 +1339,52 @@ vbo_exec_DrawTransformFeedback(GLenum mode, GLuint name)
_mesa_debug(ctx, "glDrawTransformFeedback(%s, %d)\n",
_mesa_lookup_enum_by_nr(mode), name);
- if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj)) {
- return;
- }
+ vbo_draw_transform_feedback(ctx, mode, obj, 0, 1);
+}
+
+static void GLAPIENTRY
+vbo_exec_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_transform_feedback_object *obj =
+ _mesa_lookup_transform_feedback_object(ctx, name);
+
+ if (MESA_VERBOSE & VERBOSE_DRAW)
+ _mesa_debug(ctx, "glDrawTransformFeedbackStream(%s, %u, %u)\n",
+ _mesa_lookup_enum_by_nr(mode), name, stream);
+
+ vbo_draw_transform_feedback(ctx, mode, obj, stream, 1);
+}
+
+static void GLAPIENTRY
+vbo_exec_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_transform_feedback_object *obj =
+ _mesa_lookup_transform_feedback_object(ctx, name);
+
+ if (MESA_VERBOSE & VERBOSE_DRAW)
+ _mesa_debug(ctx, "glDrawTransformFeedbackInstanced(%s, %d)\n",
+ _mesa_lookup_enum_by_nr(mode), name);
+
+ vbo_draw_transform_feedback(ctx, mode, obj, 0, primcount);
+}
+
+static void GLAPIENTRY
+vbo_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+ GLuint stream, GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_transform_feedback_object *obj =
+ _mesa_lookup_transform_feedback_object(ctx, name);
+
+ if (MESA_VERBOSE & VERBOSE_DRAW)
+ _mesa_debug(ctx, "glDrawTransformFeedbackStreamInstanced"
+ "(%s, %u, %u, %i)\n",
+ _mesa_lookup_enum_by_nr(mode), name, stream, primcount);
- vbo_draw_transform_feedback(ctx, mode, obj, 1);
+ vbo_draw_transform_feedback(ctx, mode, obj, stream, primcount);
}
#endif
@@ -1365,6 +1411,12 @@ vbo_exec_array_init( struct vbo_exec_context *exec )
exec->vtxfmt.DrawElementsInstancedBaseVertexBaseInstance = vbo_exec_DrawElementsInstancedBaseVertexBaseInstance;
#if FEATURE_EXT_transform_feedback
exec->vtxfmt.DrawTransformFeedback = vbo_exec_DrawTransformFeedback;
+ exec->vtxfmt.DrawTransformFeedbackStream =
+ vbo_exec_DrawTransformFeedbackStream;
+ exec->vtxfmt.DrawTransformFeedbackInstanced =
+ vbo_exec_DrawTransformFeedbackInstanced;
+ exec->vtxfmt.DrawTransformFeedbackStreamInstanced =
+ vbo_exec_DrawTransformFeedbackStreamInstanced;
#endif
}
diff --git a/mesalib/src/mesa/vbo/vbo_save_api.c b/mesalib/src/mesa/vbo/vbo_save_api.c
index d27525812..a02a13db5 100644
--- a/mesalib/src/mesa/vbo/vbo_save_api.c
+++ b/mesalib/src/mesa/vbo/vbo_save_api.c
@@ -1068,6 +1068,45 @@ _save_DrawTransformFeedback(GLenum mode, GLuint name)
static void GLAPIENTRY
+_save_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ (void) mode;
+ (void) name;
+ (void) stream;
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION,
+ "glDrawTransformFeedbackStream");
+}
+
+
+static void GLAPIENTRY
+_save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ (void) mode;
+ (void) name;
+ (void) primcount;
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION,
+ "glDrawTransformFeedbackInstanced");
+}
+
+
+static void GLAPIENTRY
+_save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+ GLuint stream, GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ (void) mode;
+ (void) name;
+ (void) stream;
+ (void) primcount;
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION,
+ "glDrawTransformFeedbackStreamInstanced");
+}
+
+
+static void GLAPIENTRY
_save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1416,9 +1455,13 @@ _save_vtxfmt_init(struct gl_context *ctx)
vfmt->DrawRangeElements = _save_DrawRangeElements;
vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex;
vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex;
- vfmt->DrawTransformFeedback = _save_DrawTransformFeedback;
vfmt->MultiDrawElementsEXT = _save_MultiDrawElements;
vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex;
+ vfmt->DrawTransformFeedback = _save_DrawTransformFeedback;
+ vfmt->DrawTransformFeedbackStream = _save_DrawTransformFeedbackStream;
+ vfmt->DrawTransformFeedbackInstanced = _save_DrawTransformFeedbackInstanced;
+ vfmt->DrawTransformFeedbackStreamInstanced =
+ _save_DrawTransformFeedbackStreamInstanced;
}