diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-07-05 00:53:13 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-07-05 00:53:13 +1000 |
commit | 77f8167d75d0016c76812fc147c06072e5729965 (patch) | |
tree | f610929b3fa6d62013593df797b9e05d7c1452b4 /src/mesa/main/api_validate.c | |
parent | 6f56b527d866506a323feb19f9d8529d40034af2 (diff) | |
parent | 194cfc7a4ed86653db34be0e331ad7c23b5334eb (diff) |
Merge remote branch 'upstream/gallium-0.1' into gallium-0.1
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 9144b4bc66..2eb96ae3f4 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -59,9 +59,10 @@ _mesa_validate_DrawElements(GLcontext *ctx, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions */ - if (!ctx->Array.ArrayObj->Vertex.Enabled - && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled)) + /* Always need vertex positions, unless a vertex program is in use */ + if (!ctx->VertexProgram._Current && + !ctx->Array.ArrayObj->Vertex.Enabled && + !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) return GL_FALSE; /* Vertex buffer object tests */ @@ -177,9 +178,10 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions */ - if (!ctx->Array.ArrayObj->Vertex.Enabled - && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled)) + /* Always need vertex positions, unless a vertex program is in use */ + if (!ctx->VertexProgram._Current && + !ctx->Array.ArrayObj->Vertex.Enabled && + !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) return GL_FALSE; /* Vertex buffer object tests */ @@ -247,8 +249,10 @@ _mesa_validate_DrawArrays(GLcontext *ctx, if (ctx->NewState) _mesa_update_state(ctx); - /* Always need vertex positions */ - if (!ctx->Array.ArrayObj->Vertex.Enabled && !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + /* Always need vertex positions, unless a vertex program is in use */ + if (!ctx->VertexProgram._Current && + !ctx->Array.ArrayObj->Vertex.Enabled && + !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) return GL_FALSE; if (ctx->Const.CheckArrayBounds) { |