When transform feedback is paused, it is legal to change programs or
to perform drawing operations using a drawing mode that doesn't match
the transform feedback mode.
Reviewed-by: Brian Paul <brianp@vmare.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (obj->Active) {
+ if (obj->Active && !obj->Paused) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUseProgram(transform feedback active)");
return;
return;
}
- if (ctx->TransformFeedback.CurrentObject->Active) {
+ if (ctx->TransformFeedback.CurrentObject->Active &&
+ !ctx->TransformFeedback.CurrentObject->Paused) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUseShaderProgramEXT(transform feedback is active)");
return;
GLboolean
_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode)
{
- if (ctx->TransformFeedback.CurrentObject->Active) {
+ if (ctx->TransformFeedback.CurrentObject->Active &&
+ !ctx->TransformFeedback.CurrentObject->Paused) {
switch (mode) {
case GL_POINTS:
return ctx->TransformFeedback.Mode == GL_POINTS;