diff options
author | marha <marha@users.sourceforge.net> | 2011-12-17 13:43:14 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-17 13:43:14 +0100 |
commit | abacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (patch) | |
tree | a05bb04105e9dd1cda779071d9ca274b86840c7e /mesalib/src/mesa/main/api_validate.c | |
parent | 47913e82955ec8e2b1ba4d4b145497dede9163b5 (diff) | |
download | vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.gz vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.bz2 vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.zip |
libX11 libxtrans mesa xserver git update 17 dec 2011
Diffstat (limited to 'mesalib/src/mesa/main/api_validate.c')
-rw-r--r-- | mesalib/src/mesa/main/api_validate.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index efdecb212..945f12752 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -474,3 +474,37 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, return GL_TRUE; } + + +#if FEATURE_EXT_transform_feedback + +GLboolean +_mesa_validate_DrawTransformFeedback(struct gl_context *ctx, + GLenum mode, + struct gl_transform_feedback_object *obj) +{ + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); + + if (!_mesa_valid_prim_mode(ctx, mode)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawTransformFeedback(mode)"); + return GL_FALSE; + } + + if (!obj) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback(name)"); + return GL_FALSE; + } + + if (!obj->EndedAnytime) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback"); + return GL_FALSE; + } + + if (!check_valid_to_render(ctx, "glDrawTransformFeedback")) { + return GL_FALSE; + } + + return GL_TRUE; +} + +#endif |