From 08020927e826068a1ebc208e63c6a0d53711e96e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 17 Nov 2006 21:58:02 +0000 Subject: Use RENDERINPUTS macros to access render_inputs_bitset --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/mesa/drivers/dri/nouveau/nv10_swtcl.c') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 510704f7d4..772a5368e9 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -627,10 +627,11 @@ static void nv10ChooseRenderState(GLcontext *ctx) -static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) +static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) { GLcontext* ctx=nmesa->glCtx; TNLcontext *tnl = TNL_CONTEXT(ctx); + DECLARE_RENDERINPUTS(index); struct vertex_buffer *VB = &tnl->vb; int attr_size[16]; int default_attr_size[8]={3,3,3,4,3,1,4,4}; @@ -638,20 +639,22 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint int slots=0; int total_size=0; + RENDERINPUTS_COPY(index, nmesa->render_inputs_bitset); + /* * Determine attribute sizes */ for(i=0;i<8;i++) { - if (index&(1<TexCoordPtr[i]->size; + if (RENDERINPUTS_TEST(index, i)) + attr_size[i]=VB->TexCoordPtr[i-8]->size; else attr_size[i]=0; } @@ -661,7 +664,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint */ for(i=0;i<16;i++) { - if (index&(1<render_inputs_bitset; - - if (index!=nmesa->render_inputs_bitset) + DECLARE_RENDERINPUTS(index); + + RENDERINPUTS_COPY(index, tnl->render_inputs_bitset); + if (!RENDERINPUTS_EQUAL(index, nmesa->render_inputs_bitset)) { - nmesa->render_inputs_bitset=index; - nv10OutputVertexFormat(nmesa,index); + RENDERINPUTS_COPY(nmesa->render_inputs_bitset, index); + nv10OutputVertexFormat(nmesa); } } -- cgit v1.2.3