summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-04-23 10:53:00 -0600
committerBrian Paul <brianp@vmware.com>2013-04-23 21:09:17 -0600
commit976b529b7c977e11a487c61d92bc5037cfd32155 (patch)
tree6dc4c36e09fe236f3c04e53004a6ef6a928262bd /src/mesa/vbo/vbo_exec_api.c
parent9a32203e1618486e87c7baf494134e05f0e38cf3 (diff)
downloadexternal_mesa3d-976b529b7c977e11a487c61d92bc5037cfd32155.zip
external_mesa3d-976b529b7c977e11a487c61d92bc5037cfd32155.tar.gz
external_mesa3d-976b529b7c977e11a487c61d92bc5037cfd32155.tar.bz2
mesa: use new _mesa_inside_begin_end() function
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index c06e464..53889d0 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -74,7 +74,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
GLuint last_begin = exec->vtx.prim[exec->vtx.prim_count-1].begin;
GLuint last_count;
- if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(exec->ctx)) {
GLint i = exec->vtx.prim_count - 1;
assert(i >= 0);
exec->vtx.prim[i].count = (exec->vtx.vert_count -
@@ -96,7 +96,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
*/
assert(exec->vtx.prim_count == 0);
- if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(exec->ctx)) {
exec->vtx.prim[0].mode = exec->ctx->Driver.CurrentExecPrimitive;
exec->vtx.prim[0].start = 0;
exec->vtx.prim[0].count = 0;
@@ -269,7 +269,7 @@ vbo_exec_wrap_upgrade_vertex(struct vbo_exec_context *exec,
/* Heuristic: Attempt to isolate attributes received outside
* begin/end so that they don't bloat the vertices.
*/
- if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END &&
+ if (!_mesa_inside_begin_end(ctx) &&
!oldSize && lastcount > 8 && exec->vtx.vertex_size) {
vbo_exec_copy_to_current( exec );
reset_attrfv( exec );
@@ -789,7 +789,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
int i;
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBegin");
return;
}
@@ -852,7 +852,7 @@ static void GLAPIENTRY vbo_exec_End( void )
GET_CURRENT_CONTEXT( ctx );
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
+ if (!_mesa_inside_begin_end(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glEnd");
return;
}
@@ -1242,7 +1242,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
assert(exec->flush_call_depth == 1);
#endif
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(ctx)) {
/* We've had glBegin but not glEnd! */
#ifdef DEBUG
exec->flush_call_depth--;