summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa
diff options
context:
space:
mode:
authordawes <dawes>2001-05-01 21:39:08 +0000
committerdawes <dawes>2001-05-01 21:39:08 +0000
commiteaffbc49b7ffad575e12c348b31c083eee0dfd2b (patch)
tree6f71460dddcd7ab96f89a1045b4d4e4fcd2ea7b3 /xc/extras/Mesa
parentc983988d91d546ee463ea56c1d0a8126c2c2bc7a (diff)
Initial merge for XFree86 4.0.99.3 import
Diffstat (limited to 'xc/extras/Mesa')
-rw-r--r--xc/extras/Mesa/include/GL/gl.h2
-rw-r--r--xc/extras/Mesa/src/X/xmesa2.c15
-rw-r--r--xc/extras/Mesa/src/aatritemp.h4
-rw-r--r--xc/extras/Mesa/src/context.c6
-rw-r--r--xc/extras/Mesa/src/fog_tmp.h3
-rw-r--r--xc/extras/Mesa/src/image.c3
-rw-r--r--xc/extras/Mesa/src/mmath.h1
7 files changed, 21 insertions, 13 deletions
diff --git a/xc/extras/Mesa/include/GL/gl.h b/xc/extras/Mesa/include/GL/gl.h
index 10b3e3e98..89e371bd9 100644
--- a/xc/extras/Mesa/include/GL/gl.h
+++ b/xc/extras/Mesa/include/GL/gl.h
@@ -22,7 +22,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/extras/Mesa/include/GL/gl.h,v 1.8 2001/01/08 01:07:12 martin Exp $ */
+/* $XFree86: xc/extras/Mesa/include/GL/gl.h,v 1.9 2001/04/09 23:08:58 dawes Exp $ */
#ifndef __gl_h_
diff --git a/xc/extras/Mesa/src/X/xmesa2.c b/xc/extras/Mesa/src/X/xmesa2.c
index 3b4ca355e..96d6d8761 100644
--- a/xc/extras/Mesa/src/X/xmesa2.c
+++ b/xc/extras/Mesa/src/X/xmesa2.c
@@ -944,16 +944,16 @@ clear_32bit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
- if (all) {
- register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height;
- register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data;
- register GLuint pixel = (GLuint) xmesa->clearpixel;
- if (xmesa->swapbytes) {
- pixel = ((pixel >> 24) & 0x000000ff)
+ register GLuint pixel = (GLuint) xmesa->clearpixel;
+ if (xmesa->swapbytes) {
+ pixel = ((pixel >> 24) & 0x000000ff)
| ((pixel >> 8) & 0x0000ff00)
| ((pixel << 8) & 0x00ff0000)
| ((pixel << 24) & 0xff000000);
- }
+ }
+ if (all) {
+ register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height;
+ register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data;
if (pixel==0) {
MEMSET( ptr4, pixel, 4*n );
}
@@ -966,7 +966,6 @@ clear_32bit_ximage( GLcontext *ctx, GLboolean all,
}
else {
register int i, j;
- register GLuint pixel = (GLuint) xmesa->clearpixel;
for (j=0;j<height;j++) {
register GLuint *ptr4 = PIXELADDR4( xmesa->xm_buffer, x, y+j );
for (i=0;i<width;i++) {
diff --git a/xc/extras/Mesa/src/aatritemp.h b/xc/extras/Mesa/src/aatritemp.h
index e0d623eb0..38c2fa24a 100644
--- a/xc/extras/Mesa/src/aatritemp.h
+++ b/xc/extras/Mesa/src/aatritemp.h
@@ -354,6 +354,10 @@
startX--;
}
+ if (startX > ctx->DrawBuffer->Xmax) {
+ startX = ctx->DrawBuffer->Xmax;
+ }
+
/* enter interior of triangle */
ix = startX;
count = 0;
diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c
index 43219cd28..326fc58aa 100644
--- a/xc/extras/Mesa/src/context.c
+++ b/xc/extras/Mesa/src/context.c
@@ -1890,7 +1890,11 @@ _mesa_get_dispatch(GLcontext *ctx)
void gl_problem( const GLcontext *ctx, const char *s )
{
fprintf( stderr, "Mesa implementation error: %s\n", s );
- fprintf( stderr, "Report to Mesa bug database at www.mesa3d.org\n" );
+#ifdef XF86DRI
+ fprintf( stderr, "Please report to the DRI bug database at dri.sourceforge.net\n");
+#else
+ fprintf( stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
+#endif
(void) ctx;
}
diff --git a/xc/extras/Mesa/src/fog_tmp.h b/xc/extras/Mesa/src/fog_tmp.h
index b3400d4e6..830173129 100644
--- a/xc/extras/Mesa/src/fog_tmp.h
+++ b/xc/extras/Mesa/src/fog_tmp.h
@@ -251,6 +251,7 @@ static void TAG(fog_rgba_vertices)( struct vertex_buffer *VB,
CLAMPED_FLOAT_COLOR_TO_UBYTE_COLOR(out[i][2], t);
}
+ out[i][3] = in[3];
}
}
break;
@@ -269,6 +270,7 @@ static void TAG(fog_rgba_vertices)( struct vertex_buffer *VB,
t = f * UBYTE_COLOR_TO_FLOAT_COLOR(in[2]) + (1.0F-f)*bFog;
CLAMPED_FLOAT_COLOR_TO_UBYTE_COLOR(out[i][2], t);
}
+ out[i][3] = in[3];
}
break;
case GL_EXP2:
@@ -287,6 +289,7 @@ static void TAG(fog_rgba_vertices)( struct vertex_buffer *VB,
t = f * UBYTE_COLOR_TO_FLOAT_COLOR(in[2]) + (1.0F-f)*bFog;
CLAMPED_FLOAT_COLOR_TO_UBYTE_COLOR(out[i][2], t);
}
+ out[i][3] = in[3];
}
break;
default:
diff --git a/xc/extras/Mesa/src/image.c b/xc/extras/Mesa/src/image.c
index 5ffb84dce..87ba3699c 100644
--- a/xc/extras/Mesa/src/image.c
+++ b/xc/extras/Mesa/src/image.c
@@ -1821,8 +1821,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
stride = 2;
break;
case GL_INTENSITY:
- redIndex = 0;
- greenIndex = blueIndex = alphaIndex = -1;
+ redIndex = greenIndex = blueIndex = alphaIndex = 0;
stride = 1;
break;
case GL_RGB:
diff --git a/xc/extras/Mesa/src/mmath.h b/xc/extras/Mesa/src/mmath.h
index a42db5ddb..b737c8036 100644
--- a/xc/extras/Mesa/src/mmath.h
+++ b/xc/extras/Mesa/src/mmath.h
@@ -22,7 +22,6 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/extras/Mesa/src/mmath.h,v 1.7 2000/09/24 13:50:14 alanh Exp $ */
/*