summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-06 12:55:17 -0700
committerBrian <[email protected]>2007-01-06 12:55:17 -0700
commit113b0a7f2e83f02ae9da6977ff416df5cf9671de (patch)
tree9885b08054bba638a08dfb053d7fcc2fb305f534 /src/mesa
parentb530d96216f8a01e2dd4100941f6b1aa4d9dfbcd (diff)
Use GLuint instead of GLint to store intermediate Z values. Fixes problems when using 32-bit Z buffer.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_linetemp.h11
-rw-r--r--src/mesa/swrast/s_pointtemp.h6
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index f5b2d95653f..8b3918511d1 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -80,14 +80,15 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
GLint numPixels;
GLint xstep, ystep;
#if defined(DEPTH_TYPE)
- const GLint depthBits = ctx->Visual.depthBits;
+ const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0;
struct gl_renderbuffer *zrb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
#define FixedToDepth(F) ((F) >> fixedToDepthShift)
GLint zPtrXstep, zPtrYstep;
DEPTH_TYPE *zPtr;
#elif defined(INTERP_Z)
- const GLint depthBits = ctx->Visual.depthBits;
+ const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
+/*ctx->Visual.depthBits;*/
#endif
#ifdef PIXEL_ADDRESS
PIXEL_TYPE *pixelPtr;
@@ -268,7 +269,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
}
else {
/* don't use fixed point */
- span.z = (GLint) vert0->win[2];
+ span.z = (GLuint) vert0->win[2];
span.zStep = (GLint) ((vert1->win[2] - vert0->win[2]) / numPixels);
}
}
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index 6316833a686..083f1ebe83c 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -194,7 +194,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
{{
GLint x, y;
const GLfloat radius = 0.5F * size;
- const GLint z = (GLint) (vert->win[2] + 0.5F);
+ const GLuint z = (GLuint) (vert->win[2] + 0.5F);
GLuint count;
#if FLAGS & SMOOTH
const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */