From 7ca4f07b5b77ccac0a9b60dc5ac9082906b5947e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Mar 2012 14:39:15 -0700 Subject: mesa: Fold error generation into _mesa_valid_prim_mode(). We want to start emitting an INVALID_OPERATION from here for transform feedback. Note that this forced dlist.c to almost not use this function, since it wants different behavior during dlist compile. Just pull the non-TF, non-GS test out for compile, because: 1) TF doesn't matter in that case because there's no drawing. 2) I don't think we're going to see GSes and display lists in the same context, if we don't do GL_ARB_compatibility. Reviewed-by: Brian Paul --- src/mesa/vbo/vbo_exec_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa/vbo/vbo_exec_api.c') diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index cb5f9ae522b..30619906706 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -696,8 +696,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode ) struct vbo_exec_context *exec = &vbo_context(ctx)->exec; int i; - if (!_mesa_valid_prim_mode(ctx, mode)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBegin"); + if (!_mesa_valid_prim_mode(ctx, mode, "glBegin")) { return; } -- cgit v1.2.3