X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Ftnl%2Ft_vb_cull.c;h=712901acf3020a38c90d737fe43da0618fffcc8a;hb=9b70c33e735ff060ddad7d0b501d19c670f41618;hp=3a022e84c463baa7f63d9ca8799f51838f2b135f;hpb=a2ea606377ed5679dc513eabcf2d398216b47d61;p=mesa.git diff --git a/src/mesa/tnl/t_vb_cull.c b/src/mesa/tnl/t_vb_cull.c index 3a022e84c46..712901acf30 100644 --- a/src/mesa/tnl/t_vb_cull.c +++ b/src/mesa/tnl/t_vb_cull.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" @@ -52,15 +52,12 @@ static GLboolean run_cull_stage( GLcontext *ctx, const GLfloat a = ctx->Transform.CullObjPos[0]; const GLfloat b = ctx->Transform.CullObjPos[1]; const GLfloat c = ctx->Transform.CullObjPos[2]; - GLfloat *norm = (GLfloat *)VB->NormalPtr->data; - GLuint stride = VB->NormalPtr->stride; + GLfloat *norm = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data; + GLuint stride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride; GLuint count = VB->Count; GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) - return GL_TRUE; - - if (ctx->VertexProgram._Enabled || + if (ctx->VertexProgram._Current || !ctx->Transform.CullVertexFlag) return GL_TRUE;