diff options
author | Brian Paul <[email protected]> | 2006-06-14 04:05:17 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-06-14 04:05:17 +0000 |
commit | 62e1fae858509615c6e54e0b9388cfa2691a5919 (patch) | |
tree | 35fb599ca4b17f1c909d916e2e91d2a1b6f587c5 /src/mesa/tnl/t_vb_arbshader.c | |
parent | 62dc134771858638ac38687c16bbb0578d20c419 (diff) |
A number of vertex buffer fields like NormalPtr, FogCoordPtr, etc are really
just aliases for members of the VB->AttribPtr[] array.
Begin replacing FogCoordPtr with VB->AttribPtr[_TNL_ATTRIB_FOG], and similarly
for NormalPtr, TexCoordPtr, PointSizePtr, etc.
Diffstat (limited to 'src/mesa/tnl/t_vb_arbshader.c')
-rw-r--r-- | src/mesa/tnl/t_vb_arbshader.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c index ec8dd5e2f57..174d7985432 100644 --- a/src/mesa/tnl/t_vb_arbshader.c +++ b/src/mesa/tnl/t_vb_arbshader.c @@ -236,25 +236,30 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag vb->ClipPtr = &store->outputs[VERT_RESULT_HPOS]; vb->ClipPtr->count = vb->Count; + vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0]; - vb->SecondaryColorPtr[0] = &store->outputs[VERT_RESULT_COL1]; - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) - vb->TexCoordPtr[i] = &store->outputs[VERT_RESULT_TEX0 + i]; + vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0]; vb->ColorPtr[1] = &store->outputs[VERT_RESULT_BFC0]; + + vb->SecondaryColorPtr[0] = + vb->AttribPtr[VERT_ATTRIB_COLOR1] = &store->outputs[VERT_RESULT_COL1]; + vb->SecondaryColorPtr[1] = &store->outputs[VERT_RESULT_BFC1]; - vb->FogCoordPtr = &store->outputs[VERT_RESULT_FOGC]; - vb->PointSizePtr = &store->outputs[VERT_RESULT_PSIZ]; - for (i = 0; i < MAX_VARYING_VECTORS; i++) - vb->VaryingPtr[i] = &store->varyings[i]; - vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0]; - vb->AttribPtr[VERT_ATTRIB_COLOR1] = vb->SecondaryColorPtr[0]; - vb->AttribPtr[VERT_ATTRIB_FOG] = vb->FogCoordPtr; - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) - vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = vb->TexCoordPtr[i]; + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + vb->TexCoordPtr[i] = + vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->outputs[VERT_RESULT_TEX0 + i]; + } + + vb->FogCoordPtr = + vb->AttribPtr[VERT_ATTRIB_FOG] = &store->outputs[VERT_RESULT_FOGC]; + vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ]; - for (i = 0; i < MAX_VARYING_VECTORS; i++) + + for (i = 0; i < MAX_VARYING_VECTORS; i++) { + vb->VaryingPtr[i] = &store->varyings[i]; vb->AttribPtr[_TNL_ATTRIB_GENERIC0 + i] = vb->VaryingPtr[i]; + } store->ormask = 0; store->andmask = CLIP_FRUSTUM_BITS; |