diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2000-12-28 22:11:04 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2000-12-28 22:11:04 +0000 |
commit | 88f3b89a2cb77766d2009b9868c44e03abe2dbb2 (patch) | |
tree | c382e12f28f661a17974ea79b394fbabf101d89e /src/mesa/drivers/glide/fxdd.c | |
parent | e5d6fb20a5c2519ac216a9fa247b5922e76528c1 (diff) | |
download | external_mesa3d-88f3b89a2cb77766d2009b9868c44e03abe2dbb2.zip external_mesa3d-88f3b89a2cb77766d2009b9868c44e03abe2dbb2.tar.gz external_mesa3d-88f3b89a2cb77766d2009b9868c44e03abe2dbb2.tar.bz2 |
Add render stage for unclipped vb's to fx driver.
Bump MAX_TEXTURE_UNITS to 8
Fix mem. leak in destroy_lists
Fix crash in q3 (cva generally)
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 3bbe423..0f1ace3 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -61,6 +61,8 @@ #include "tnl/tnl.h" #include "array_cache/acache.h" +#include "tnl/t_pipeline.h" + /* These lookup table are used to extract RGB values in [0,255] from * 16-bit pixel values. */ @@ -645,25 +647,21 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name) } } -#if 0 -static const struct gl_pipeline_stage * const fx_pipeline[] = { +static const struct gl_pipeline_stage *fx_pipeline[] = { &_tnl_update_material_stage, + /* TODO: Add the fastpath here */ &_tnl_vertex_transform_stage, &_tnl_normal_transform_stage, - &_tnl_lighting_stage, /* OMIT: fog coordinate stage */ + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, /* TODO: Omit fog stage */ &_tnl_texgen_stage, &_tnl_texture_transform_stage, &_tnl_point_attenuation_stage, - &_fx_fast_render_stage, /* ADD: the fastpath as a render stage */ + &fx_render_stage, /* ADD: render simple unclipped vb's */ &_tnl_render_stage, /* KEEP: the old render stage for fallbacks */ - 0 + 0, }; -#else -/* Need to turn off tnl fogging, both the stage and the clipping in - * _tnl_render_stage. Could insert a dummy stage that did nothing but - * provided storage that clipping could spin on? - */ -#endif + @@ -771,6 +769,9 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) _tnl_CreateContext( fxMesa->glCtx ); _swsetup_CreateContext( fxMesa->glCtx ); + _tnl_destroy_pipeline( fxMesa->glCtx ); + _tnl_install_pipeline( fxMesa->glCtx, fx_pipeline ); + fxAllocVB( fxMesa->glCtx ); fxSetupDDPointers(fxMesa->glCtx); @@ -780,6 +781,11 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) _swrast_allow_vertex_fog( fxMesa->glCtx, GL_FALSE ); _swrast_allow_pixel_fog( fxMesa->glCtx, GL_TRUE ); + /* Tell tnl not to calculate or use vertex fog factors. (Needed to + * tell render stage not to clip fog coords). + */ +/* _tnl_calculate_vertex_fog( fxMesa->glCtx, GL_FALSE ); */ + fxDDInitExtensions(fxMesa->glCtx); #ifdef FXVTXFMT |