diff options
author | Daniel Borca <[email protected]> | 2004-07-16 07:54:46 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-07-16 07:54:46 +0000 |
commit | 25f0e8227f1f8131a1add3cdcd8eb47a1e7e8f89 (patch) | |
tree | 7342ca0cd9781b46e39a4c08412f7b24f0a8275c /src/mesa/drivers | |
parent | 1ff6188c0937f0425d1a9b6cd10a42c7cf9f50c1 (diff) |
minor corrections
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 51 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxvb.c | 2 |
2 files changed, 36 insertions, 17 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index a08ad97fde4..8e94a4c3a37 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1491,8 +1491,15 @@ fxDDInitExtensions(GLcontext * ctx) _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); _mesa_enable_extension(ctx, "GL_S3_s3tc"); _mesa_enable_extension(ctx, "GL_NV_blend_square"); - } else if (fxMesa->HaveTexus2) { - _mesa_enable_extension(ctx, "GL_ARB_texture_compression"); + } else { + if (fxMesa->HaveTexus2) { + _mesa_enable_extension(ctx, "GL_ARB_texture_compression"); + } +#if FX_TC_NCC + else +#endif + /* doesn't like texture compression */ + _mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap"); } if (fxMesa->HaveCmbExt) { @@ -1517,13 +1524,11 @@ fxDDInitExtensions(GLcontext * ctx) _mesa_enable_extension(ctx, "GL_IBM_multimode_draw_arrays"); _mesa_enable_extension(ctx, "GL_ARB_vertex_buffer_object"); #if 0 - /* not until texel fetchers are right */ - _mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap"); -#endif -#if 0 /* not just yet */ - _mesa_enable_extension(ctx, "GL_ARB_fragment_program"); _mesa_enable_extension(ctx, "GL_ARB_vertex_program"); + _mesa_enable_extension(ctx, "GL_NV_vertex_program"); + _mesa_enable_extension(ctx, "GL_NV_vertex_program1_1"); + _mesa_enable_extension(ctx, "GL_MESA_program_debug"); #endif } @@ -1555,16 +1560,36 @@ fx_check_IsInHardware(GLcontext * ctx) } if (ctx->Color.BlendEnabled) { - if ((ctx->Color.BlendEquationRGB != GL_FUNC_ADD) || - (ctx->Color.BlendEquationA != GL_FUNC_ADD)) { + if (ctx->Color.BlendEquationRGB != GL_FUNC_ADD) { if (!fxMesa->HavePixExt || ((ctx->Color.BlendEquationRGB != GL_FUNC_SUBTRACT) && - (ctx->Color.BlendEquationRGB != GL_FUNC_REVERSE_SUBTRACT)) || + (ctx->Color.BlendEquationRGB != GL_FUNC_REVERSE_SUBTRACT))) { + return FX_FALLBACK_BLEND; + } + } + + if (ctx->Color.BlendEquationA != GL_FUNC_ADD) { + if (!fxMesa->HavePixExt || ((ctx->Color.BlendEquationA != GL_FUNC_SUBTRACT) && (ctx->Color.BlendEquationA != GL_FUNC_REVERSE_SUBTRACT))) { return FX_FALLBACK_BLEND; } } + +#if 0 + /* [dBorca] + * We fail the spec here, unless certain blending modes: + * (c1 + c2) * 1 + d * 1 = c1 * 1 + d * 1 + c2 * 1 + * (c1 + c2) * 1 + d * 0 = c1 * 1 + d * 0 + c2 * 1 + */ + if (NEED_SECONDARY_COLOR(ctx)) { + if ((ctx->Color.BlendEquationRGB != GL_FUNC_ADD) && + (ctx->Color.BlendSrcRGB != GL_ONE)) { + /* Can't use multipass to blend ColorSum stage */ + return FX_FALLBACK_SPECULAR; + } + } +#endif } /* [dBorca] @@ -1578,12 +1603,6 @@ fx_check_IsInHardware(GLcontext * ctx) return FX_FALLBACK_LOGICOP; } -#if 0 /* multipass ColorSum stage */ - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) { - return FX_FALLBACK_SPECULAR; - } -#endif - if ((fxMesa->colDepth != 32) && ((ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP]) || (ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP]))) { diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c index b2367d4c27a..ddcedfa29f1 100644 --- a/src/mesa/drivers/glide/fxvb.c +++ b/src/mesa/drivers/glide/fxvb.c @@ -73,7 +73,7 @@ static struct { tnl_copy_pv_func copy_pv; tnl_interp_func interp; GLboolean (*check_tex_sizes)( GLcontext *ctx ); - GLuint vertex_format; + GLuint vertex_format; } setup_tab[MAX_SETUP]; |