From 14940c4ffe066a8b85bc14274c19ad3d8e334d61 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 5 Nov 2000 18:40:57 +0000 Subject: - Changes for new software rasterizer modules - Remove support for choosing software fallbacks from core code - Remove partial fallback code from vbrender.c -- drivers are now expected to be able to find a triangle/quad function for every state, even if they have to use _swsetup_Triangle or _swsetup_Quad. - Marked derived variables in the GLcontext struct with a leading underscore '_'. --- src/mesa/drivers/d3d/D3Dvbrender.c | 14 +++++++------- src/mesa/drivers/ggi/default/stubs.c | 2 +- src/mesa/drivers/windows/wmesa.c | 20 ++++++++++---------- src/mesa/drivers/windows/wmesaBackup.c | 27 ++++++++++++++++++--------- src/mesa/drivers/windows/wmesaOld.c | 25 +++++++++++++++++-------- src/mesa/drivers/windows/wmesa_stereo.c | 16 ++++++++-------- 6 files changed, 61 insertions(+), 43 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/d3d/D3Dvbrender.c b/src/mesa/drivers/d3d/D3Dvbrender.c index 0ef32e26ce..852e6e56e7 100644 --- a/src/mesa/drivers/d3d/D3Dvbrender.c +++ b/src/mesa/drivers/d3d/D3Dvbrender.c @@ -428,7 +428,7 @@ static void RenderTriangleVB( GLcontext *ctx, GLuint start, GLuint end ) DPF(( DBG_FUNC, "RenderTriangleVB" )); - if ( (!(ctx->IndirectTriangles & DD_SW_SETUP)) && !VB->ClipOrMask ) + if ( !VB->ClipOrMask ) { DPF(( DBG_PRIM_INFO, "DirectTriangles( %d )", (end-start) )); for( index = start, cVertex = 0; index < end; ) @@ -602,7 +602,7 @@ static void RenderTriangleFanVB( GLcontext *ctx, GLuint start, GLuint end ) DPF(( DBG_FUNC, "RenderTriangleFanVB();" )); /* Special case that we can blast the fan without culling, offset, etc... */ - if ( (!(ctx->IndirectTriangles & DD_SW_SETUP)) && !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) + if ( !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) { DPF(( DBG_PRIM_INFO, "DirectTriangles( %d )", (end-start) )); @@ -760,7 +760,7 @@ static void RenderTriangleStripVB( GLcontext *ctx, GLuint start, GLuint end ) DPF(( DBG_FUNC, "RenderTriangleStripVB();" )); /* Special case that we can blast the fan without culling, offset, etc... */ - if ( (!(ctx->IndirectTriangles & DD_SW_SETUP)) && !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) + if ( !VB->ClipOrMask && (ctx->Light.ShadeModel != GL_FLAT) ) { DPF(( DBG_PRIM_PROFILE, "DirectTriangles" )); @@ -946,7 +946,7 @@ static void RenderQuadVB( GLcontext *ctx, GLuint start, GLuint end ) #define v3 (index+2) #define v4 (index+3) - if ( (!(ctx->IndirectTriangles & DD_SW_SETUP)) && !VB->ClipOrMask ) + if ( !VB->ClipOrMask ) { DPF(( DBG_PRIM_PROFILE, "DirectTriangles" )); @@ -1511,7 +1511,7 @@ static void SetRenderStates( GLcontext *ctx ) /*================================================*/ /* Check too see if there are new TEXTURE states. */ /*================================================*/ - if ( ctx->Texture.ReallyEnabled ) + if ( ctx->Texture._ReallyEnabled ) { switch( ctx->Texture.Set[ctx->Texture.CurrentSet].EnvMode ) { @@ -1871,9 +1871,9 @@ static void DebugRenderStates( GLcontext *ctx, BOOL bForce ) /*================================================*/ /* Check too see if there are new TEXTURE states. */ /*================================================*/ - if ( texture != ctx->Texture.ReallyEnabled ) + if ( texture != ctx->Texture._ReallyEnabled ) { - texture = ctx->Texture.ReallyEnabled; + texture = ctx->Texture._ReallyEnabled; DPF(( 0, "\tTexture\t\t%s", (texture) ? "ENABLED" : "--------" )); } diff --git a/src/mesa/drivers/ggi/default/stubs.c b/src/mesa/drivers/ggi/default/stubs.c index f9df294ee4..b1d915b2cb 100644 --- a/src/mesa/drivers/ggi/default/stubs.c +++ b/src/mesa/drivers/ggi/default/stubs.c @@ -389,7 +389,7 @@ triangle_func ggiGetTriangleFunc(GLcontext *ctx) if (ctx->Stencil.Enabled) return NULL; if (ctx->Polygon.SmoothFlag) return NULL; if (ctx->Polygon.StippleFlag) return NULL; - if (ctx->Texture.ReallyEnabled) return NULL; + if (ctx->Texture._ReallyEnabled) return NULL; if (ctx->Light.ShadeModel==GL_SMOOTH) return NULL; if (ctx->Depth.Test && ctx->Depth.Func != GL_LESS) return NULL; diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c index 6b2b02bc35..aa0f58c5fc 100644 --- a/src/mesa/drivers/windows/wmesa.c +++ b/src/mesa/drivers/windows/wmesa.c @@ -1,4 +1,4 @@ -/* $Id: wmesa.c,v 1.9 2000/09/28 22:44:32 brianp Exp $ */ +/* $Id: wmesa.c,v 1.10 2000/11/05 18:41:00 keithw Exp $ */ /* * Windows (Win32) device driver for Mesa 3.4 @@ -650,8 +650,8 @@ static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last ) extern points_func choose_points_function( GLcontext* ctx ) { STARTPROFILE - if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0 - && !ctx->Texture.ReallyEnabled && ctx->Visual->RGBAflag) { + if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->_RasterMask==0 + && !ctx->Texture._ReallyEnabled && ctx->Visual->RGBAflag) { ENDPROFILE(choose_points_function) return fast_rgb_points; } @@ -708,8 +708,8 @@ static line_func choose_line_function( GLcontext* ctx ) { STARTPROFILE if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag - && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0 - && !ctx->Texture.ReallyEnabled && Current->rgb_flag) { + && ctx->Light.ShadeModel==GL_FLAT && ctx->_RasterMask==0 + && !ctx->Texture._ReallyEnabled && Current->rgb_flag) { ENDPROFILE(choose_line_function) return fast_flat_rgb_line; } @@ -2851,11 +2851,11 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) int depth = wmesa->cColorBits; if (ctx->Polygon.SmoothFlag) return NULL; - if (ctx->Texture.ReallyEnabled) return NULL; + if (ctx->Texture._ReallyEnabled) return NULL; if (!wmesa->db_flag) return NULL; /*if (wmesa->xm_buffer->buffer==XIMAGE)*/ { if ( ctx->Light.ShadeModel==GL_SMOOTH - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2875,7 +2875,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } if ( ctx->Light.ShadeModel==GL_FLAT - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2894,7 +2894,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) return NULL; } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_SMOOTH && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { @@ -2913,7 +2913,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_FLAT && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { diff --git a/src/mesa/drivers/windows/wmesaBackup.c b/src/mesa/drivers/windows/wmesaBackup.c index 57269fbadb..baa57a4ee4 100644 --- a/src/mesa/drivers/windows/wmesaBackup.c +++ b/src/mesa/drivers/windows/wmesaBackup.c @@ -1,4 +1,4 @@ -/* $Id: wmesaBackup.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ +/* $Id: wmesaBackup.c,v 1.2 2000/11/05 18:41:00 keithw Exp $ */ /* * File name : wmesa.c @@ -22,8 +22,17 @@ /* * $Log: wmesaBackup.c,v $ - * Revision 1.1 1999/08/19 00:55:42 jtg - * Initial revision + * Revision 1.2 2000/11/05 18:41:00 keithw + * - Changes for new software rasterizer modules + * - Remove support for choosing software fallbacks from core code + * - Remove partial fallback code from vbrender.c -- drivers are now + * expected to be able to find a triangle/quad function for every state, + * even if they have to use _swsetup_Triangle or _swsetup_Quad. + * - Marked derived variables in the GLcontext struct with a leading + * underscore '_'. + * + * Revision 1.1.1.1 1999/08/19 00:55:42 jtg + * Imported sources * * Revision 1.1 1999/01/03 03:08:57 brianp * Initial revision @@ -685,7 +694,7 @@ static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last ) extern points_func choose_points_function( GLcontext* ctx ) { STARTPROFILE - if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0 + if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->_RasterMask==0 && !ctx->Texture.Enabled && ctx->Visual->RGBAflag) { ENDPROFILE(choose_points_function) return fast_rgb_points; @@ -743,7 +752,7 @@ static line_func choose_line_function( GLcontext* ctx ) { STARTPROFILE if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag - && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0 + && ctx->Light.ShadeModel==GL_FLAT && ctx->_RasterMask==0 && !ctx->Texture.Enabled && Current->rgb_flag) { ENDPROFILE(choose_line_function) return fast_flat_rgb_line; @@ -2777,7 +2786,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) if (!wmesa->db_flag) return NULL; /*if (wmesa->xm_buffer->buffer==XIMAGE)*/ { if ( ctx->Light.ShadeModel==GL_SMOOTH - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2797,7 +2806,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } if ( ctx->Light.ShadeModel==GL_FLAT - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2816,7 +2825,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) return NULL; } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_SMOOTH && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { @@ -2835,7 +2844,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_FLAT && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { diff --git a/src/mesa/drivers/windows/wmesaOld.c b/src/mesa/drivers/windows/wmesaOld.c index afaeecebcf..801d5724e7 100644 --- a/src/mesa/drivers/windows/wmesaOld.c +++ b/src/mesa/drivers/windows/wmesaOld.c @@ -20,8 +20,17 @@ /* * $Log: wmesaOld.c,v $ - * Revision 1.1 1999/08/19 00:55:42 jtg - * Initial revision + * Revision 1.2 2000/11/05 18:41:00 keithw + * - Changes for new software rasterizer modules + * - Remove support for choosing software fallbacks from core code + * - Remove partial fallback code from vbrender.c -- drivers are now + * expected to be able to find a triangle/quad function for every state, + * even if they have to use _swsetup_Triangle or _swsetup_Quad. + * - Marked derived variables in the GLcontext struct with a leading + * underscore '_'. + * + * Revision 1.1.1.1 1999/08/19 00:55:42 jtg + * Imported sources * * Revision 1.2 1999/01/03 03:08:57 brianp * Ted Jump's changes @@ -668,7 +677,7 @@ static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last ) extern points_func choose_points_function( GLcontext* ctx ) { STARTPROFILE - if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0 + if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->_RasterMask==0 && !ctx->Texture.Enabled && ctx->Visual->RGBAflag) { ENDPROFILE(choose_points_function) return fast_rgb_points; @@ -726,7 +735,7 @@ static line_func choose_line_function( GLcontext* ctx ) { STARTPROFILE if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag - && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0 + && ctx->Light.ShadeModel==GL_FLAT && ctx->_RasterMask==0 && !ctx->Texture.Enabled && Current->rgb_flag) { ENDPROFILE(choose_line_function) return fast_flat_rgb_line; @@ -2635,7 +2644,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) if (!wmesa->db_flag) return NULL; /*if (wmesa->xm_buffer->buffer==XIMAGE)*/ { if ( ctx->Light.ShadeModel==GL_SMOOTH - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2655,7 +2664,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } if ( ctx->Light.ShadeModel==GL_FLAT - && ctx->RasterMask==DEPTH_BIT + && ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Polygon.StippleFlag==GL_FALSE) { @@ -2674,7 +2683,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) return NULL; } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_SMOOTH && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { @@ -2693,7 +2702,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) } } - if ( ctx->RasterMask==0 /* no depth test */ + if ( ctx->_RasterMask==0 /* no depth test */ && ctx->Light.ShadeModel==GL_FLAT && ctx->Polygon.StippleFlag==GL_FALSE) { switch (wmesa->pixelformat) { diff --git a/src/mesa/drivers/windows/wmesa_stereo.c b/src/mesa/drivers/windows/wmesa_stereo.c index 70251ae877..d3787909ee 100644 --- a/src/mesa/drivers/windows/wmesa_stereo.c +++ b/src/mesa/drivers/windows/wmesa_stereo.c @@ -419,8 +419,8 @@ static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last ) extern points_func choose_points_function( GLcontext* ctx ) { STARTPROFILE - if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0 - && !ctx->Texture.ReallyEnabled && ctx->Visual->RGBAflag) { + if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->_RasterMask==0 + && !ctx->Texture._ReallyEnabled && ctx->Visual->RGBAflag) { ENDPROFILE(choose_points_function) return fast_rgb_points; } @@ -477,8 +477,8 @@ static line_func choose_line_function( GLcontext* ctx ) { STARTPROFILE if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag - && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0 - && !ctx->Texture.ReallyEnabled && Current->rgb_flag) { + && ctx->Light.ShadeModel==GL_FLAT && ctx->_RasterMask==0 + && !ctx->Texture._ReallyEnabled && Current->rgb_flag) { ENDPROFILE(choose_line_function) return fast_flat_rgb_line; } @@ -589,9 +589,9 @@ static triangle_func choose_triangle_function( GLcontext *ctx ) { if (ctx->Polygon.SmoothFlag) return NULL; if (ctx->Polygon.StippleFlag) return NULL; - if (ctx->Texture.ReallyEnabled) return NULL; + if (ctx->Texture._ReallyEnabled) return NULL; - if (ctx->RasterMask==DEPTH_BIT + if (ctx->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Visual->RGBAflag) { @@ -659,8 +659,8 @@ static polygon_func choose_polygon_function( GLcontext* ctx ) { STARTPROFILE if (!ctx->Polygon.SmoothFlag && !ctx->Polygon.StippleFlag - && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0 - && !ctx->Texture.ReallyEnabled && Current->rgb_flag==GL_TRUE) { + && ctx->Light.ShadeModel==GL_FLAT && ctx->_RasterMask==0 + && !ctx->Texture._ReallyEnabled && Current->rgb_flag==GL_TRUE) { ENDPROFILE(choose_polygon_function) return fast_flat_rgb_polygon; } -- cgit v1.2.3