diff options
author | Brian <[email protected]> | 2007-02-01 09:51:48 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-01 09:51:48 -0700 |
commit | f3e507ef9f75dbfc58ccd07b5fe8cfca10d9a9e3 (patch) | |
tree | 52aaa2c8e7f9688752f2010254cd04aa5b117743 /src/mesa/swrast/s_pointtemp.h | |
parent | 81ef03be65f1458d627528a13cb86feb992d758f (diff) |
New SWspanarrays attribs[] array.
Replace texcoord[], varying[], etc. arrays with single attribs[] array, indexed
by FRAG_ATTRIB_* values.
Eliminates need to copy data into fragment program machine input registers.
Will lead to future clean-ups.
Diffstat (limited to 'src/mesa/swrast/s_pointtemp.h')
-rw-r--r-- | src/mesa/swrast/s_pointtemp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index b41776b0175..f68630af93a 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -280,7 +280,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & TEXTURE for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - COPY_4V(span->array->texcoords[u][count], texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); span->array->lambda[u][count] = 0.0; } } @@ -342,14 +342,14 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) r = vert->texcoord[u][0]; else /* GL_R */ r = vert->texcoord[u][2]; - span->array->texcoords[u][count][0] = s; - span->array->texcoords[u][count][1] = t; - span->array->texcoords[u][count][2] = r; - span->array->texcoords[u][count][3] = 1.0F; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][0] = s; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][1] = t; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][2] = r; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][3] = 1.0F; span->array->lambda[u][count] = 0.0; /* XXX fix? */ } else { - COPY_4V(span->array->texcoords[u][count], vert->texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], vert->texcoord[u]); } } } @@ -402,7 +402,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & TEXTURE for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture.Unit[u]._ReallyEnabled) { - COPY_4V(span->array->texcoords[u][count], texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); } } #endif |