Fix some warnings on x86_64

This commit is contained in:
Alan Hourihane
2006-04-07 08:50:39 +00:00
parent 9d3de643d1
commit e2af1da1d3
8 changed files with 16 additions and 10 deletions

View File

@@ -84,7 +84,7 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis,
12,
I830_NR_TEX_REGIONS,
intel->sarea->texList,
& intel->sarea->texAge,
(unsigned *) & intel->sarea->texAge,
& intel->swapped,
sizeof( struct i830_texture_object ),
(destroy_texture_object_t *)intelDestroyTexObj );

View File

@@ -127,7 +127,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
12,
I830_NR_TEX_REGIONS,
intel->sarea->texList,
& intel->sarea->texAge,
(unsigned *) & intel->sarea->texAge,
& intel->swapped,
sizeof( struct i915_texture_object ),
(destroy_texture_object_t *)intelDestroyTexObj );

View File

@@ -216,7 +216,7 @@ void intelStartInlinePrimitive( intelContextPtr intel, GLuint prim )
}
#if 1
if (((int)intel->batch.ptr) & 0x4) {
if (((unsigned long)intel->batch.ptr) & 0x4) {
BEGIN_BATCH(1);
OUT_BATCH(0);
ADVANCE_BATCH();

View File

@@ -43,8 +43,9 @@ extern int VERBOSE;
#define BEGIN_BATCH(n) \
do { \
if (VERBOSE) fprintf(stderr, \
"BEGIN_BATCH(%d) in %s, %d dwords free\n", \
(n), __FUNCTION__, intel->batch.space/4); \
"BEGIN_BATCH(%ld) in %s, %d dwords free\n", \
((unsigned long)n), __FUNCTION__, \
intel->batch.space/4); \
if (intel->batch.space < (n)*4) \
intelFlushBatch(intel, GL_TRUE); \
if (intel->batch.space == intel->batch.size) intel->batch.func = __FUNCTION__; \

View File

@@ -207,7 +207,7 @@ struct intel_context
GLenum render_primitive;
GLenum reduced_primitive;
GLuint vertex_size;
char *verts; /* points to tnl->clipspace.vertex_buf */
unsigned char *verts; /* points to tnl->clipspace.vertex_buf */
/* Fallback rasterization functions

View File

@@ -140,7 +140,7 @@ void intelRefillBatchLocked( intelContextPtr intel, GLboolean allow_unlock )
fprintf(stderr, "%s: now using half %d\n", __FUNCTION__, buf);
intel->batch.start_offset = intel->alloc.offset + buf * half;
intel->batch.ptr = (char *)intel->alloc.ptr + buf * half;
intel->batch.ptr = (unsigned char *)intel->alloc.ptr + buf * half;
intel->batch.size = half - 8;
intel->batch.space = half - 8;
assert(intel->batch.space >= 0);

View File

@@ -157,13 +157,15 @@ intersect_region(const drm_clip_rect_t *box,
if (by < y) bh -= y - by, by = y;
if (bx + bw > x + width) bw = x + width - bx;
if (by + bh > y + height) bh = y + height - by;
if (bw <= 0) return GL_FALSE;
if (bh <= 0) return GL_FALSE;
*xOut = bx;
*yOut = by;
*wOut = bw;
*hOut = bh;
if (bw <= 0) return GL_FALSE;
if (bh <= 0) return GL_FALSE;
return GL_TRUE;
}
@@ -423,6 +425,8 @@ intelTryDrawPixels( GLcontext *ctx,
}
else
return GL_FALSE;
return GL_FALSE;
}
static void

View File

@@ -787,7 +787,8 @@ int intelUploadTexImages( intelContextPtr intel,
}
/* Set the base offset of the texture image */
t->BufAddr = intel->intelScreen->tex.map + t->base.memBlock->ofs;
t->BufAddr = (GLubyte *) (intel->intelScreen->tex.map +
t->base.memBlock->ofs);
t->TextureOffset = intel->intelScreen->tex.offset + t->base.memBlock->ofs;
t->dirty = ~0;
}