* 1.0 would produce a value of 0x0fffffff in the actual Z
* buffer, which is the maximum value.
*
- * Mesa's depth type is a 32-bit int, so we use the following macro
+ * Mesa's depth type is a 32-bit uint, so we use the following macro
* to convert to/from FFB hw Z values. Note we also have to clear
* out the top bits as that is where the Y (stencil) buffer is stored
* and during hw Z buffer reads it is always there. (During writes
* we tell the hw to discard those top 4 bits).
*/
-#define Z_TO_MESA(VAL) ((GLdepth)(((VAL) & 0x0fffffff) << (32 - 28)))
+#define Z_TO_MESA(VAL) ((GLuint)(((VAL) & 0x0fffffff) << (32 - 28)))
#define Z_FROM_MESA(VAL) (((GLuint)((GLdouble)(VAL))) >> (32 - 28))
#endif /* !(_FFB_CONTEXT_H) */
void r128WriteDepthSpanLocked( r128ContextPtr rmesa,
GLuint n, GLint x, GLint y,
- const GLdepth depth[],
+ const GLuint depth[],
const GLubyte mask[] )
{
drm_clip_rect_t *pbox = rmesa->pClipRects;
void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n,
const GLint x[], const GLint y[],
- const GLdepth depth[],
+ const GLuint depth[],
const GLubyte mask[] )
{
drm_clip_rect_t *pbox = rmesa->pClipRects;
extern void r128WriteDepthSpanLocked( r128ContextPtr rmesa,
GLuint n, GLint x, GLint y,
- const GLdepth depth[],
+ const GLuint depth[],
const GLubyte mask[] );
extern void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n,
const GLint x[], const GLint y[],
- const GLdepth depth[],
+ const GLuint depth[],
const GLubyte mask[] );
extern void r128ReadDepthSpanLocked( r128ContextPtr rmesa,
GLuint n, GLint x, GLint y );
static void
fxReadDepthSpan_Z16(GLcontext * ctx, struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y, GLdepth depth[])
+ GLuint n, GLint x, GLint y, GLuint depth[])
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);
GLint bottom = fxMesa->height - 1;
static void
fxReadDepthSpan_Z24(GLcontext * ctx, struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y, GLdepth depth[])
+ GLuint n, GLint x, GLint y, GLuint depth[])
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);
GLint bottom = fxMesa->height - 1;
GLboolean r, GLboolean g, GLboolean b, GLboolean a);
extern void fxDDWriteDepthSpan(GLcontext * ctx, GLuint n, GLint x, GLint y,
- const GLdepth depth[], const GLubyte mask[]);
+ const GLuint depth[], const GLubyte mask[]);
extern void fxDDReadDepthSpan(GLcontext * ctx, GLuint n, GLint x, GLint y,
- GLdepth depth[]);
+ GLuint depth[]);
extern void fxDDWriteDepthPixels(GLcontext * ctx, GLuint n,
const GLint x[], const GLint y[],
- const GLdepth depth[], const GLubyte mask[]);
+ const GLuint depth[], const GLubyte mask[]);
extern void fxDDReadDepthPixels(GLcontext * ctx, GLuint n,
const GLint x[], const GLint y[],
- GLdepth depth[]);
+ GLuint depth[]);
extern void fxDDShadeModel(GLcontext * ctx, GLenum mode);
GLuint i; \
GLchan *img = PIXELADDR4(span.x, span.y); \
for (i = 0; i < span.end; i++, img += 4) { \
- const GLdepth z = FixedToDepth(span.z); \
+ const GLuint z = FixedToDepth(span.z); \
if (z < zRow[i]) { \
PACK_RGBA(img, FixedToChan(span.red), \
FixedToChan(span.green), FixedToChan(span.blue), \
GLuint i; \
GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y); \
for (i = 0; i < span.end; i++) { \
- const GLdepth z = FixedToDepth(span.z); \
+ const GLuint z = FixedToDepth(span.z); \
if (z < zRow[i]) { \
img[i] = pixel; \
zRow[i] = z; \