tnl: Replace deprecated FogCoordPtr with AttribPtr[_TNL_ATTRIB_FOG]
This commit is contained in:
parent
0a91878015
commit
37c79d4d76
|
@ -133,9 +133,9 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
#endif
|
||||
|
||||
#if DO_FOG
|
||||
if (VB->FogCoordPtr) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
} else {
|
||||
static GLfloat tmp[4] = {0, 0, 0, 0};
|
||||
fog = &tmp;
|
||||
|
|
|
@ -200,9 +200,9 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
if (DO_FOG) {
|
||||
if (VB->FogCoordPtr) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
} else {
|
||||
static GLfloat tmp[4] = {0, 0, 0, 0};
|
||||
fog = &tmp;
|
||||
|
|
|
@ -273,8 +273,8 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
|
|||
if (!rmesa->tcl.fog.buf)
|
||||
emit_vecfog( ctx,
|
||||
&(rmesa->tcl.aos[nr]),
|
||||
(char *)VB->FogCoordPtr->data,
|
||||
VB->FogCoordPtr->stride,
|
||||
(char *)VB->AttribPtr[_TNL_ATTRIB_FOG]->data,
|
||||
VB->AttribPtr[_TNL_ATTRIB_FOG]->stride,
|
||||
count);
|
||||
|
||||
vfmt |= RADEON_CP_VC_FRMT_FPFOG;
|
||||
|
|
|
@ -142,9 +142,9 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
if (DO_SPEC_OR_FOG) {
|
||||
if (VB->FogCoordPtr) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
} else {
|
||||
fog = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_FOG];
|
||||
fog_stride = 0;
|
||||
|
|
|
@ -82,8 +82,8 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
if (IND & TDFX_FOGC_BIT) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -91,8 +91,8 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
if (IND & SETUP_FOGC) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
}
|
||||
|
||||
if (start) {
|
||||
|
|
|
@ -202,8 +202,6 @@ struct vertex_buffer
|
|||
* it that is one of VERT_ATTRIB_X. For things only produced by TNL,
|
||||
* such as backface color or eye-space coordinates, they are stored
|
||||
* here.
|
||||
* XXX some of these fields alias AttribPtr below and should be removed
|
||||
* such as FogCoordPtr, etc.
|
||||
*/
|
||||
GLuint *Elts;
|
||||
GLvector4f *EyePtr; /* _TNL_BIT_POS */
|
||||
|
@ -217,7 +215,6 @@ struct vertex_buffer
|
|||
GLvector4f *BackfaceIndexPtr;
|
||||
GLvector4f *BackfaceColorPtr;
|
||||
GLvector4f *BackfaceSecondaryColorPtr;
|
||||
GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */
|
||||
|
||||
const struct _mesa_prim *Primitive;
|
||||
GLuint PrimitiveCount;
|
||||
|
|
|
@ -251,13 +251,10 @@ static void bind_inputs( GLcontext *ctx,
|
|||
*/
|
||||
VB->Count = count;
|
||||
|
||||
|
||||
/* Legacy pointers -- remove one day.
|
||||
*/
|
||||
/* These should perhaps be part of _TNL_ATTRIB_* */
|
||||
VB->BackfaceColorPtr = NULL;
|
||||
VB->BackfaceIndexPtr = NULL;
|
||||
VB->BackfaceSecondaryColorPtr = NULL;
|
||||
VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
|
||||
|
||||
/* Clipping and drawing code still requires this to be a packed
|
||||
* array of ubytes which can be written into. TODO: Fix and
|
||||
|
|
|
@ -228,7 +228,6 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
|
|||
VB->AttribPtr[_TNL_ATTRIB_FOG] = input;
|
||||
}
|
||||
|
||||
VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -454,16 +454,12 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
|
|||
VB->ClipPtr->count = VB->Count;
|
||||
}
|
||||
|
||||
VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->results[VERT_RESULT_COL0];
|
||||
VB->BackfaceColorPtr = &store->results[VERT_RESULT_BFC0];
|
||||
VB->AttribPtr[_TNL_ATTRIB_COLOR1] = &store->results[VERT_RESULT_COL1];
|
||||
VB->BackfaceSecondaryColorPtr = &store->results[VERT_RESULT_BFC1];
|
||||
VB->FogCoordPtr = &store->results[VERT_RESULT_FOGC];
|
||||
|
||||
VB->AttribPtr[VERT_ATTRIB_COLOR0] = &store->results[VERT_RESULT_COL0];
|
||||
VB->AttribPtr[VERT_ATTRIB_COLOR1] = &store->results[VERT_RESULT_COL1];
|
||||
VB->AttribPtr[VERT_ATTRIB_FOG] = &store->results[VERT_RESULT_FOGC];
|
||||
VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->results[VERT_RESULT_PSIZ];
|
||||
VB->BackfaceColorPtr = &store->results[VERT_RESULT_BFC0];
|
||||
VB->BackfaceSecondaryColorPtr = &store->results[VERT_RESULT_BFC1];
|
||||
|
||||
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||
VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]
|
||||
|
|
|
@ -200,9 +200,9 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
if (DO_FOG) {
|
||||
if (VB->FogCoordPtr) {
|
||||
fog = VB->FogCoordPtr->data;
|
||||
fog_stride = VB->FogCoordPtr->stride;
|
||||
if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
|
||||
fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
|
||||
fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
|
||||
}
|
||||
else {
|
||||
static GLfloat tmp[4] = {0, 0, 0, 0};
|
||||
|
|
|
@ -135,7 +135,7 @@ int main( int argc, char **argv )
|
|||
OFFSET( "VB_INDEX_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR_INDEX] );
|
||||
OFFSET( "VB_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR0] );
|
||||
OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR1] );
|
||||
OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, FogCoordPtr );
|
||||
OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_FOG] );
|
||||
OFFSET( "VB_PRIMITIVE ", struct vertex_buffer, Primitive );
|
||||
printf( "\n" );
|
||||
|
||||
|
|
Loading…
Reference in New Issue