aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 12:16:00 +0200
commitdcf9ae77854778629cabd0d6943dda3678eb91fa (patch)
tree087d3bb4beb55bcc0c5857b41d2b5b10edd0e2f3 /mesalib/src/mesa/main/api_validate.c
parent2c8d7aa6bda138693fa1827852ba6b75d1721ff8 (diff)
parentf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (diff)
downloadvcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.gz
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.bz2
vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/glx/glxext.c xorg-server/hw/xwin/InitOutput.c
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;
}