mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
mesa: fix vertex array validation test for attribute 0 (vert pos)
We don't actually need vertex array[0] enabled when using a vertex program/shader. cherry-picked from master
This commit is contained in:
parent
98b7174ad6
commit
1ca2306147
1 changed files with 12 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue