diff options
author | brianp <brianp> | 2002-06-26 15:04:34 +0000 |
---|---|---|
committer | brianp <brianp> | 2002-06-26 15:04:34 +0000 |
commit | 65ba6a533fb23480952c01575c19f5a6bf0f3f8f (patch) | |
tree | 517937c0335ce1f304ee617a21ad51e5c558024f /xc/extras | |
parent | dee82c9b16f1a168d0e32c70c079b56a371deb90 (diff) |
bring in final Mesa 4.0.3 changes
Diffstat (limited to 'xc/extras')
-rw-r--r-- | xc/extras/Mesa/src/OSmesa/osmesa.c | 4 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_tri.c | 10 | ||||
-rw-r--r-- | xc/extras/Mesa/src/swrast/s_texture.c | 6 |
3 files changed, 14 insertions, 6 deletions
diff --git a/xc/extras/Mesa/src/OSmesa/osmesa.c b/xc/extras/Mesa/src/OSmesa/osmesa.c index a0fe13fb8..f3691e900 100644 --- a/xc/extras/Mesa/src/OSmesa/osmesa.c +++ b/xc/extras/Mesa/src/OSmesa/osmesa.c @@ -1781,6 +1781,7 @@ osmesa_choose_line_function( GLcontext *ctx ) osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return NULL; + if (swrast->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE @@ -1930,6 +1931,9 @@ osmesa_choose_triangle_function( GLcontext *ctx ) if (osmesa->format != OSMESA_RGBA && osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return (swrast_tri_func) NULL; + if (ctx->Polygon.CullFlag && + ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) + return (swrast_tri_func) NULL; if (swrast->_RasterMask == DEPTH_BIT && ctx->Depth.Func == GL_LESS && diff --git a/xc/extras/Mesa/src/X/xm_tri.c b/xc/extras/Mesa/src/X/xm_tri.c index c4b561298..c2e205afe 100644 --- a/xc/extras/Mesa/src/X/xm_tri.c +++ b/xc/extras/Mesa/src/X/xm_tri.c @@ -1526,10 +1526,12 @@ static swrast_tri_func get_triangle_func( GLcontext *ctx ) triFuncName = NULL; #endif - if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; - if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; - if (ctx->Texture._ReallyEnabled) return (swrast_tri_func) NULL; - if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_tri_func) NULL; + if (ctx->RenderMode != GL_RENDER || + ctx->Polygon.SmoothFlag || + ctx->Texture._ReallyEnabled || + (swrast->_RasterMask & MULTI_DRAW_BIT) || + (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)) + return (swrast_tri_func) NULL; if (xmesa->xm_buffer->buffer==XIMAGE) { if ( ctx->Light.ShadeModel==GL_SMOOTH diff --git a/xc/extras/Mesa/src/swrast/s_texture.c b/xc/extras/Mesa/src/swrast/s_texture.c index 9b985cae2..c3e215eca 100644 --- a/xc/extras/Mesa/src/swrast/s_texture.c +++ b/xc/extras/Mesa/src/swrast/s_texture.c @@ -2173,6 +2173,7 @@ texture_combine(const GLcontext *ctx, (arg0[i][GCOMP]-0.5F) * (arg1[i][GCOMP]-0.5F) + (arg0[i][BCOMP]-0.5F) * (arg1[i][BCOMP]-0.5F)) * 4.0F; + dot = CLAMP(dot, 0.0F, CHAN_MAXF); #else GLint dot = (S_PROD((GLint)arg0[i][RCOMP] - half, (GLint)arg1[i][RCOMP] - half) + @@ -2180,8 +2181,8 @@ texture_combine(const GLcontext *ctx, (GLint)arg1[i][GCOMP] - half) + S_PROD((GLint)arg0[i][BCOMP] - half, (GLint)arg1[i][BCOMP] - half)) >> 6; -#endif dot = CLAMP(dot, 0, CHAN_MAX); +#endif rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = (GLchan) dot; } } @@ -2198,6 +2199,7 @@ texture_combine(const GLcontext *ctx, (arg0[i][GCOMP]-0.5F) * (arg1[i][GCOMP]-0.5F) + (arg0[i][BCOMP]-0.5F) * (arg1[i][BCOMP]-0.5F)) * 4.0F; + dot = CLAMP(dot, 0.0, CHAN_MAXF) * RGBmult; #else GLint dot = (S_PROD((GLint)arg0[i][RCOMP] - half, (GLint)arg1[i][RCOMP] - half) + @@ -2205,8 +2207,8 @@ texture_combine(const GLcontext *ctx, (GLint)arg1[i][GCOMP] - half) + S_PROD((GLint)arg0[i][BCOMP] - half, (GLint)arg1[i][BCOMP] - half)) >> 6; -#endif dot = CLAMP(dot, 0, CHAN_MAX) << RGBshift; +#endif rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = (GLchan) dot; } } |