diff options
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 9d29f8d..a714c0a 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -665,6 +665,15 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx, return GL_FALSE; } + /* From the GL 4.5 specification, page 429: + * "An INVALID_VALUE error is generated if id is not the name of a + * transform feedback object." + */ + if (!obj->EverBound) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback*(name)"); + return GL_FALSE; + } + if (stream >= ctx->Const.MaxVertexStreams) { _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedbackStream*(index>=MaxVertexStream)"); |