Fixed conform problems with recent material tracking change.

Remove redundant 'update_materials' stage.
Fix conform segfault with seperate specular colors in mustpass.c.  These
tests still fail, however.
This commit is contained in:
Keith Whitwell
2001-02-16 00:35:34 +00:00
parent 86ca15ece7
commit 2448fc7dee
12 changed files with 129 additions and 143 deletions

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.43 2001/02/06 21:42:48 brianp Exp $ # $Id: Makefile.X11,v 1.44 2001/02/16 00:35:34 keithw Exp $
# Mesa 3-D graphics library # Mesa 3-D graphics library
# Version: 3.5 # Version: 3.5
@@ -36,7 +36,6 @@ CORE_SOURCES = \
tnl/t_pipeline.c \ tnl/t_pipeline.c \
tnl/t_vb_fog.c \ tnl/t_vb_fog.c \
tnl/t_vb_light.c \ tnl/t_vb_light.c \
tnl/t_vb_material.c \
tnl/t_vb_normals.c \ tnl/t_vb_normals.c \
tnl/t_vb_points.c \ tnl/t_vb_points.c \
tnl/t_vb_render.c \ tnl/t_vb_render.c \

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.43 2001/02/06 21:42:48 brianp Exp $ # $Id: Makefile.X11,v 1.44 2001/02/16 00:35:34 keithw Exp $
# Mesa 3-D graphics library # Mesa 3-D graphics library
# Version: 3.5 # Version: 3.5
@@ -36,7 +36,6 @@ CORE_SOURCES = \
tnl/t_pipeline.c \ tnl/t_pipeline.c \
tnl/t_vb_fog.c \ tnl/t_vb_fog.c \
tnl/t_vb_light.c \ tnl/t_vb_light.c \
tnl/t_vb_material.c \
tnl/t_vb_normals.c \ tnl/t_vb_normals.c \
tnl/t_vb_points.c \ tnl/t_vb_points.c \
tnl/t_vb_render.c \ tnl/t_vb_render.c \

View File

@@ -1,4 +1,4 @@
/* $Id: state.c,v 1.57 2001/02/12 19:04:30 brianp Exp $ */ /* $Id: state.c,v 1.58 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -26,7 +26,8 @@
/* /*
* This file manages internal Mesa state update. * This file manages recalculation of derived values in the
* __GLcontext.
*/ */
@@ -944,74 +945,65 @@ void gl_update_state( GLcontext *ctx )
*/ */
ctx->NewState = 0; ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state); ctx->Driver.UpdateState(ctx, new_state);
ctx->Array.NewState = 0;
#ifdef DEBUG /* At this point we can do some assertions to be sure the required
/* At this point we can do some assertions to be sure the required device * device driver function pointers are all initialized.
* driver function pointers are all initialized. *
* KW: Moved the some of these asserts to t_vb_render.c, as they
* are strictly only required for that stage. The Driver struct
* should probably be split; the read/write span/pixels functions
* should be referenced only from swrast, for instance.
*/ */
assert(ctx->Driver.GetString); ASSERT(ctx->Driver.GetString);
assert(ctx->Driver.UpdateState); ASSERT(ctx->Driver.UpdateState);
assert(ctx->Driver.Clear); ASSERT(ctx->Driver.Clear);
assert(ctx->Driver.SetDrawBuffer); ASSERT(ctx->Driver.SetDrawBuffer);
assert(ctx->Driver.SetReadBuffer); ASSERT(ctx->Driver.SetReadBuffer);
assert(ctx->Driver.GetBufferSize); ASSERT(ctx->Driver.GetBufferSize);
if (ctx->Visual.rgbMode) { if (ctx->Visual.rgbMode) {
assert(ctx->Driver.WriteRGBASpan); ASSERT(ctx->Driver.WriteRGBASpan);
assert(ctx->Driver.WriteRGBSpan); ASSERT(ctx->Driver.WriteRGBSpan);
assert(ctx->Driver.WriteMonoRGBASpan); ASSERT(ctx->Driver.WriteMonoRGBASpan);
assert(ctx->Driver.WriteRGBAPixels); ASSERT(ctx->Driver.WriteRGBAPixels);
assert(ctx->Driver.WriteMonoRGBAPixels); ASSERT(ctx->Driver.WriteMonoRGBAPixels);
assert(ctx->Driver.ReadRGBASpan); ASSERT(ctx->Driver.ReadRGBASpan);
assert(ctx->Driver.ReadRGBAPixels); ASSERT(ctx->Driver.ReadRGBAPixels);
} }
else { else {
assert(ctx->Driver.WriteCI32Span); ASSERT(ctx->Driver.WriteCI32Span);
assert(ctx->Driver.WriteCI8Span); ASSERT(ctx->Driver.WriteCI8Span);
assert(ctx->Driver.WriteMonoCISpan); ASSERT(ctx->Driver.WriteMonoCISpan);
assert(ctx->Driver.WriteCI32Pixels); ASSERT(ctx->Driver.WriteCI32Pixels);
assert(ctx->Driver.WriteMonoCIPixels); ASSERT(ctx->Driver.WriteMonoCIPixels);
assert(ctx->Driver.ReadCI32Span); ASSERT(ctx->Driver.ReadCI32Span);
assert(ctx->Driver.ReadCI32Pixels); ASSERT(ctx->Driver.ReadCI32Pixels);
} }
if (ctx->Visual.accumRedBits > 0) { if (ctx->Visual.accumRedBits > 0) {
assert(ctx->Driver.Accum); ASSERT(ctx->Driver.Accum);
} }
assert(ctx->Driver.DrawPixels); ASSERT(ctx->Driver.DrawPixels);
assert(ctx->Driver.ReadPixels); ASSERT(ctx->Driver.ReadPixels);
assert(ctx->Driver.CopyPixels); ASSERT(ctx->Driver.CopyPixels);
assert(ctx->Driver.Bitmap); ASSERT(ctx->Driver.Bitmap);
assert(ctx->Driver.ResizeBuffersMESA); ASSERT(ctx->Driver.ResizeBuffersMESA);
assert(ctx->Driver.TexImage1D); ASSERT(ctx->Driver.TexImage1D);
assert(ctx->Driver.TexImage2D); ASSERT(ctx->Driver.TexImage2D);
assert(ctx->Driver.TexImage3D); ASSERT(ctx->Driver.TexImage3D);
assert(ctx->Driver.TexSubImage1D); ASSERT(ctx->Driver.TexSubImage1D);
assert(ctx->Driver.TexSubImage2D); ASSERT(ctx->Driver.TexSubImage2D);
assert(ctx->Driver.TexSubImage3D); ASSERT(ctx->Driver.TexSubImage3D);
if (ctx->Extensions.ARB_texture_compression) { if (ctx->Extensions.ARB_texture_compression) {
assert(ctx->Driver.CompressedTexImage1D); ASSERT(ctx->Driver.CompressedTexImage1D);
assert(ctx->Driver.CompressedTexImage2D); ASSERT(ctx->Driver.CompressedTexImage2D);
assert(ctx->Driver.CompressedTexImage3D); ASSERT(ctx->Driver.CompressedTexImage3D);
assert(ctx->Driver.CompressedTexSubImage1D); ASSERT(ctx->Driver.CompressedTexSubImage1D);
assert(ctx->Driver.CompressedTexSubImage2D); ASSERT(ctx->Driver.CompressedTexSubImage2D);
assert(ctx->Driver.CompressedTexSubImage3D); ASSERT(ctx->Driver.CompressedTexSubImage3D);
assert(ctx->Driver.IsCompressedFormat); ASSERT(ctx->Driver.IsCompressedFormat);
assert(ctx->Driver.GetCompressedTexImage); ASSERT(ctx->Driver.GetCompressedTexImage);
assert(ctx->Driver.BaseCompressedTexFormat); ASSERT(ctx->Driver.BaseCompressedTexFormat);
} }
assert(ctx->Driver.RenderStart); ASSERT(ctx->Driver.RenderStart);
assert(ctx->Driver.RenderFinish); ASSERT(ctx->Driver.RenderFinish);
assert(ctx->Driver.BuildProjectedVertices);
assert(ctx->Driver.RenderPrimitive);
assert(ctx->Driver.PointsFunc);
assert(ctx->Driver.LineFunc);
assert(ctx->Driver.TriangleFunc);
assert(ctx->Driver.QuadFunc);
assert(ctx->Driver.ResetLineStipple);
assert(ctx->Driver.RenderInterp);
assert(ctx->Driver.RenderCopyPV);
assert(ctx->Driver.RenderClippedLine);
assert(ctx->Driver.RenderClippedPolygon);
#endif
ctx->Array.NewState = 0;
} }

View File

@@ -1,4 +1,4 @@
/* $Id: ss_context.c,v 1.9 2001/01/29 20:47:39 keithw Exp $ */ /* $Id: ss_context.c,v 1.10 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -153,6 +153,16 @@ _swsetup_RenderStart( GLcontext *ctx )
VB->import_data( ctx, VB->import_data( ctx,
VB->importable_data, VB->importable_data,
VEC_NOT_WRITEABLE|VEC_BAD_STRIDE); VEC_NOT_WRITEABLE|VEC_BAD_STRIDE);
/* Ugly hack: Tie up some dangling pointers for flat/twoside code
* in ss_tritmp.h and ss_interptmp.h
*/
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) == 0 ||
ctx->Texture._ReallyEnabled == 0) {
VB->SecondaryColorPtr[0] = VB->ColorPtr[0];
VB->SecondaryColorPtr[1] = VB->ColorPtr[1];
}
} }
void void

View File

@@ -78,14 +78,6 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
} }
} }
/* Tie up some dangling pointers for flat/twoside code in ss_tritmp.h
*/
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) == 0) {
VB->SecondaryColorPtr[0] = VB->ColorPtr[0];
VB->SecondaryColorPtr[1] = VB->ColorPtr[1];
}
proj = VB->ProjectedClipPtr->data; proj = VB->ProjectedClipPtr->data;
if (IND & FOG) if (IND & FOG)
fog = VB->FogCoordPtr->data; fog = VB->FogCoordPtr->data;

View File

@@ -1,4 +1,4 @@
/* $Id: t_imm_dlist.c,v 1.8 2001/02/15 01:33:52 keithw Exp $ */ /* $Id: t_imm_dlist.c,v 1.9 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -180,6 +180,8 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
IM->AndFlag = node->AndFlag; IM->AndFlag = node->AndFlag;
IM->LastData = node->LastData; IM->LastData = node->LastData;
IM->LastPrimitive = node->LastPrimitive; IM->LastPrimitive = node->LastPrimitive;
IM->LastMaterial = node->LastMaterial;
IM->MaterialOrMask = node->MaterialOrMask;
if ((MESA_VERBOSE & VERBOSE_DISPLAY_LIST) && if ((MESA_VERBOSE & VERBOSE_DISPLAY_LIST) &&
(MESA_VERBOSE & VERBOSE_IMMEDIATE)) (MESA_VERBOSE & VERBOSE_IMMEDIATE))

View File

@@ -1,4 +1,4 @@
/* $Id: t_imm_exec.c,v 1.11 2001/02/15 01:33:52 keithw Exp $ */ /* $Id: t_imm_exec.c,v 1.12 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -76,6 +76,8 @@ void _tnl_reset_input( GLcontext *ctx,
IM->BeginState = beginstate; IM->BeginState = beginstate;
IM->SavedBeginState = savedbeginstate; IM->SavedBeginState = savedbeginstate;
IM->TexSize = 0; IM->TexSize = 0;
IM->LastMaterial = 0;
IM->MaterialOrMask = 0;
IM->ArrayEltFlags = ~ctx->Array._Enabled; IM->ArrayEltFlags = ~ctx->Array._Enabled;
IM->ArrayEltIncr = ctx->Array.Vertex.Enabled ? 1 : 0; IM->ArrayEltIncr = ctx->Array.Vertex.Enabled ? 1 : 0;

View File

@@ -1,4 +1,4 @@
/* $Id: t_pipeline.c,v 1.12 2001/02/15 01:33:52 keithw Exp $ */ /* $Id: t_pipeline.c,v 1.13 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -202,7 +202,6 @@ void _tnl_run_pipeline( GLcontext *ctx )
* case, if it becomes necessary to do so. * case, if it becomes necessary to do so.
*/ */
const struct gl_pipeline_stage *_tnl_default_pipeline[] = { const struct gl_pipeline_stage *_tnl_default_pipeline[] = {
&_tnl_update_material_stage,
&_tnl_vertex_transform_stage, &_tnl_vertex_transform_stage,
&_tnl_normal_transform_stage, &_tnl_normal_transform_stage,
&_tnl_lighting_stage, &_tnl_lighting_stage,

View File

@@ -1,4 +1,4 @@
/* $Id: t_pipeline.h,v 1.5 2001/01/05 02:26:49 keithw Exp $ */ /* $Id: t_pipeline.h,v 1.6 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -48,7 +48,6 @@ extern void _tnl_install_pipeline( GLcontext *ctx,
/* These are implemented in the t_vb_*.c files: /* These are implemented in the t_vb_*.c files:
*/ */
extern const struct gl_pipeline_stage _tnl_update_material_stage;
extern const struct gl_pipeline_stage _tnl_vertex_transform_stage; extern const struct gl_pipeline_stage _tnl_vertex_transform_stage;
extern const struct gl_pipeline_stage _tnl_normal_transform_stage; extern const struct gl_pipeline_stage _tnl_normal_transform_stage;
extern const struct gl_pipeline_stage _tnl_lighting_stage; extern const struct gl_pipeline_stage _tnl_lighting_stage;

View File

@@ -1,4 +1,4 @@
/* $Id: t_vb_light.c,v 1.6 2001/01/29 22:10:24 brianp Exp $ */ /* $Id: t_vb_light.c,v 1.7 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -133,17 +133,21 @@ static GLboolean run_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage )
GLuint ind; GLuint ind;
/* Make sure we can talk about elements 0..2 in the vector we are /* Make sure we can talk about elements 0..2 in the vector we are
* lighting. TODO: Don't repeat this in CVA! * lighting.
*/ */
if (input->size <= 2) { if (stage->changed_inputs & (VERT_EYE|VERT_OBJ)) {
if (input->flags & VEC_NOT_WRITEABLE) { if (input->size <= 2) {
ASSERT(VB->importable_data & VERT_OBJ); if (input->flags & VEC_NOT_WRITEABLE) {
VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); ASSERT(VB->importable_data & VERT_OBJ);
input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr;
ASSERT((input->flags & VEC_NOT_WRITEABLE) == 0);
}
gl_vector4f_clean_elem(input, VB->Count, 2); VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE );
input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr;
ASSERT((input->flags & VEC_NOT_WRITEABLE) == 0);
}
gl_vector4f_clean_elem(input, VB->Count, 2);
}
} }
if (VB->Flag) if (VB->Flag)
@@ -170,8 +174,8 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
if (ctx->Visual.rgbMode) { if (ctx->Visual.rgbMode) {
if (ctx->Light._NeedVertices) { if (ctx->Light._NeedVertices) {
if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR &&
ctx->Texture._ReallyEnabled) ctx->Texture._ReallyEnabled)
tab = _tnl_light_spec_tab; tab = _tnl_light_spec_tab;
else else
tab = _tnl_light_tab; tab = _tnl_light_tab;
@@ -182,7 +186,6 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
else else
tab = _tnl_light_fast_tab; tab = _tnl_light_fast_tab;
} }
/* tab = _tnl_light_tab; */
} }
else else
tab = _tnl_light_ci_tab; tab = _tnl_light_ci_tab;
@@ -306,8 +309,9 @@ static void dtr( struct gl_pipeline_stage *stage )
const struct gl_pipeline_stage _tnl_lighting_stage = const struct gl_pipeline_stage _tnl_lighting_stage =
{ {
"lighting", "lighting",
_NEW_LIGHT, /* recheck */ _NEW_LIGHT|_NEW_TEXTURE, /* recheck; texture for seperate_specular */
_NEW_LIGHT|_NEW_MODELVIEW, /* recalc -- modelview dependency _NEW_LIGHT|_NEW_MODELVIEW|
_NEW_TEXTURE, /* recalc -- modelview dependency
* otherwise not captured by inputs * otherwise not captured by inputs
* (which may be VERT_OBJ) */ * (which may be VERT_OBJ) */
0,0,0, /* active, inputs, outputs */ 0,0,0, /* active, inputs, outputs */

View File

@@ -1,4 +1,4 @@
/* $Id: t_vb_lighttmp.h,v 1.6 2001/02/14 23:00:42 brianp Exp $ */ /* $Id: t_vb_lighttmp.h,v 1.7 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -114,6 +114,8 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
(void) nstride; (void) nstride;
(void) vstride; (void) vstride;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
if (IDX & LIGHT_COLORMATERIAL) { if (IDX & LIGHT_COLORMATERIAL) {
CMcolor = (GLchan (*)[4]) VB->ColorPtr[0]->data; CMcolor = (GLchan (*)[4]) VB->ColorPtr[0]->data;
CMstride = VB->ColorPtr[0]->stride; CMstride = VB->ColorPtr[0]->stride;
@@ -279,15 +281,6 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
Bcolor[j][3] = sumA[1]; Bcolor[j][3] = sumA[1];
} }
} }
if ( CHECK_COLOR_MATERIAL(j) )
gl_update_color_material( ctx, CMcolor[j] );
if ( CHECK_MATERIAL(j) )
gl_update_material( ctx, new_material[j], new_material_mask[j] );
if ( CHECK_VALIDATE(j) )
gl_validate_all_lighting_tables( ctx );
} }
@@ -318,6 +311,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
GLuint *new_material_mask = VB->MaterialMask; GLuint *new_material_mask = VB->MaterialMask;
GLuint nr = VB->Count; GLuint nr = VB->Count;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) flags; (void) flags;
(void) nstride; (void) nstride;
(void) vstride; (void) vstride;
@@ -483,15 +477,6 @@ static void TAG(light_rgba)( GLcontext *ctx,
Bcolor[j][3] = sumA[1]; Bcolor[j][3] = sumA[1];
} }
} }
if ( CHECK_COLOR_MATERIAL(j) )
gl_update_color_material( ctx, (GLchan *)CMcolor[j] );
if ( CHECK_MATERIAL(j) )
gl_update_material( ctx, new_material[j], new_material_mask[j] );
if ( CHECK_VALIDATE(j) )
gl_validate_all_lighting_tables( ctx );
} }
@@ -521,6 +506,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
GLfloat base[2][3]; GLfloat base[2][3];
GLuint nr = VB->Count; GLuint nr = VB->Count;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) input; /* doesn't refer to Eye or Obj */ (void) input; /* doesn't refer to Eye or Obj */
(void) flags; (void) flags;
(void) nr; (void) nr;
@@ -647,6 +633,7 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
GLuint nr = VB->Count; GLuint nr = VB->Count;
struct gl_light *light; struct gl_light *light;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) flags; (void) flags;
(void) input; (void) input;
(void) nr; (void) nr;
@@ -778,6 +765,7 @@ static void TAG(light_ci)( GLcontext *ctx,
GLuint *new_material_mask = VB->MaterialMask; GLuint *new_material_mask = VB->MaterialMask;
GLuint nr = VB->Count; GLuint nr = VB->Count;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) flags; (void) flags;
(void) nstride; (void) nstride;
(void) vstride; (void) vstride;
@@ -936,15 +924,6 @@ static void TAG(light_ci)( GLcontext *ctx,
indexResult[side][j] = (GLuint) (GLint) index; indexResult[side][j] = (GLuint) (GLint) index;
} }
} /*for vertex*/ } /*for vertex*/
if ( CHECK_COLOR_MATERIAL(j) )
gl_update_color_material( ctx, CMcolor[j] );
if ( CHECK_MATERIAL(j) )
gl_update_material( ctx, new_material[j], new_material_mask[j] );
if ( CHECK_VALIDATE(j) )
gl_validate_all_lighting_tables( ctx );
} }

View File

@@ -1,4 +1,4 @@
/* $Id: t_vb_render.c,v 1.12 2001/01/29 20:47:39 keithw Exp $ */ /* $Id: t_vb_render.c,v 1.13 2001/02/16 00:35:35 keithw Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -63,13 +63,13 @@
typedef void (*clip_line_func)( GLcontext *ctx, /* typedef void (*clip_line_func)( GLcontext *ctx, */
GLuint i, GLuint j, /* GLuint i, GLuint j, */
GLubyte mask); /* GLubyte mask); */
typedef void (*clip_poly_func)( GLcontext *ctx, /* typedef void (*clip_poly_func)( GLcontext *ctx, */
GLuint n, GLuint vlist[], /* GLuint n, GLuint vlist[], */
GLubyte mask ); /* GLubyte mask ); */
@@ -250,10 +250,10 @@ static void clip_elt_triangles( GLcontext *ctx,
#define RENDER_LINE( v1, v2 ) \ #define RENDER_LINE( v1, v2 ) \
LineFunc( ctx, v1, v2 ) LineFunc( ctx, v1, v2 )
#define RENDER_TRI( v1, v2, v3 ) \ #define RENDER_TRI( v1, v2, v3 ) \
TriangleFunc( ctx, v1, v2, v3 ) TriangleFunc( ctx, v1, v2, v3 )
#define RENDER_QUAD( v1, v2, v3, v4 ) \ #define RENDER_QUAD( v1, v2, v3, v4 ) \
QuadFunc( ctx, v1, v2, v3, v4 ) QuadFunc( ctx, v1, v2, v3, v4 )
#define TAG(x) _tnl_##x##_verts #define TAG(x) _tnl_##x##_verts
@@ -299,11 +299,25 @@ static GLboolean run_render( GLcontext *ctx,
render_func *tab; render_func *tab;
GLint pass = 0; GLint pass = 0;
/* Allow the drivers to lock before projected verts are built so /* Allow the drivers to lock before projected verts are built so
* that window coordinates are guarenteed not to change before * that window coordinates are guarenteed not to change before
* rendering. * rendering.
*/ */
ctx->Driver.RenderStart( ctx ); ctx->Driver.RenderStart( ctx );
ASSERT(ctx->Driver.BuildProjectedVertices);
ASSERT(ctx->Driver.RenderPrimitive);
ASSERT(ctx->Driver.PointsFunc);
ASSERT(ctx->Driver.LineFunc);
ASSERT(ctx->Driver.TriangleFunc);
ASSERT(ctx->Driver.QuadFunc);
ASSERT(ctx->Driver.ResetLineStipple);
ASSERT(ctx->Driver.RenderInterp);
ASSERT(ctx->Driver.RenderCopyPV);
ASSERT(ctx->Driver.RenderClippedLine);
ASSERT(ctx->Driver.RenderClippedPolygon);
ctx->Driver.BuildProjectedVertices( ctx, 0, VB->Count, new_inputs ); ctx->Driver.BuildProjectedVertices( ctx, 0, VB->Count, new_inputs );
if (VB->ClipOrMask) { if (VB->ClipOrMask) {
@@ -354,9 +368,8 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->Visual.rgbMode) { if (ctx->Visual.rgbMode) {
inputs |= VERT_RGBA; inputs |= VERT_RGBA;
if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) { if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR)
inputs |= VERT_SPEC_RGB; inputs |= VERT_SPEC_RGB;
}
if (ctx->Texture._ReallyEnabled) { if (ctx->Texture._ReallyEnabled) {
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) { for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
@@ -365,8 +378,7 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
} }
} }
} }
else else {
{
inputs |= VERT_INDEX; inputs |= VERT_INDEX;
} }
@@ -375,17 +387,14 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
/* How do drivers turn this off? /* How do drivers turn this off?
*/ */
if (ctx->Fog.Enabled) { if (ctx->Fog.Enabled)
inputs |= VERT_FOG_COORD; inputs |= VERT_FOG_COORD;
}
if (ctx->_TriangleCaps & DD_TRI_UNFILLED) { if (ctx->_TriangleCaps & DD_TRI_UNFILLED)
inputs |= VERT_EDGE; inputs |= VERT_EDGE;
}
if (ctx->RenderMode==GL_FEEDBACK) { if (ctx->RenderMode==GL_FEEDBACK)
inputs |= VERT_TEX_ANY; inputs |= VERT_TEX_ANY;
}
stage->inputs = inputs; stage->inputs = inputs;
} }