aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/api_validate.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/api_validate.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/api_validate.c')
-rw-r--r--mesalib/src/mesa/main/api_validate.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index cf6aaf0c6..ece0a2b4a 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -593,26 +593,42 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
GLboolean
_mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
GLenum mode,
- struct gl_transform_feedback_object *obj)
+ struct gl_transform_feedback_object *obj,
+ GLuint stream,
+ GLsizei numInstances)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
- if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback")) {
+ if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback*(mode)")) {
return GL_FALSE;
}
if (!obj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback(name)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback*(name)");
return GL_FALSE;
}
if (!obj->EndedAnytime) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback*");
return GL_FALSE;
}
- if (!check_valid_to_render(ctx, "glDrawTransformFeedback")) {
+ if (stream >= ctx->Const.MaxVertexStreams) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawTransformFeedbackStream*(index>=MaxVertexStream)");
+ return GL_FALSE;
+ }
+
+ if (numInstances <= 0) {
+ if (numInstances < 0)
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawTransformFeedback*Instanced(numInstances=%d)",
+ numInstances);
+ return GL_FALSE;
+ }
+
+ if (!check_valid_to_render(ctx, "glDrawTransformFeedback*")) {
return GL_FALSE;
}