(*dri_interface->getUST)( &vmesa->swap_ust );
- vmesa->regMMIOBase = (GLuint *)((GLuint)viaScreen->reg);
- vmesa->pnGEMode = (GLuint *)((GLuint)viaScreen->reg + 0x4);
- vmesa->regEngineStatus = (GLuint *)((GLuint)viaScreen->reg + 0x400);
- vmesa->regTranSet = (GLuint *)((GLuint)viaScreen->reg + 0x43C);
- vmesa->regTranSpace = (GLuint *)((GLuint)viaScreen->reg + 0x440);
+ vmesa->regMMIOBase = (GLuint *)((unsigned long)viaScreen->reg);
+ vmesa->pnGEMode = (GLuint *)((unsigned long)viaScreen->reg + 0x4);
+ vmesa->regEngineStatus = (GLuint *)((unsigned long)viaScreen->reg + 0x400);
+ vmesa->regTranSet = (GLuint *)((unsigned long)viaScreen->reg + 0x43C);
+ vmesa->regTranSpace = (GLuint *)((unsigned long)viaScreen->reg + 0x440);
vmesa->agpBase = viaScreen->agpBase;
+
return GL_TRUE;
}
__DRIdrawablePrivate *driReadPriv)
{
if (VIA_DEBUG & DEBUG_DRI) {
- fprintf(stderr, "driContextPriv = %08x\n", (GLuint)driContextPriv);
- fprintf(stderr, "driDrawPriv = %08x\n", (GLuint)driDrawPriv);
- fprintf(stderr, "driReadPriv = %08x\n", (GLuint)driReadPriv);
+ fprintf(stderr, "driContextPriv = %016lx\n", (unsigned long)driContextPriv);
+ fprintf(stderr, "driDrawPriv = %016lx\n", (unsigned long)driDrawPriv);
+ fprintf(stderr, "driReadPriv = %016lx\n", (unsigned long)driReadPriv);
}
if (driContextPriv) {
struct gl_renderbuffer Base; /* must be first! */
drm_handle_t handle;
drmSize size;
- GLuint offset;
- GLuint index;
+ unsigned long offset;
+ unsigned long index;
GLuint pitch;
GLuint bpp;
char *map;
struct via_tex_buffer {
struct via_tex_buffer *next, *prev;
struct via_texture_image *image;
- GLuint index;
- GLuint offset;
+ unsigned long index;
+ unsigned long offset;
GLuint size;
GLuint memType;
unsigned char *bufAddr;
volatile GLuint* regEngineStatus;
volatile GLuint* regTranSet;
volatile GLuint* regTranSpace;
- GLuint* agpBase;
+ GLuint agpBase;
GLuint drawType;
GLuint nDoneFirstFlip;
t->index = fb.index;
if (t->memType == VIA_MEM_AGP) {
- t->bufAddr = (GLubyte *)((GLuint)vmesa->viaScreen->agpLinearStart +
+ t->bufAddr = (GLubyte *)((unsigned long)vmesa->viaScreen->agpLinearStart +
fb.offset);
- t->texBase = (GLuint)vmesa->agpBase + fb.offset;
+ t->texBase = vmesa->agpBase + fb.offset;
}
else {
- t->bufAddr = (GLubyte *)(fb.offset + (GLuint)vmesa->driScreen->pFB);
+ t->bufAddr = (GLubyte *)((unsigned long)vmesa->driScreen->pFB + fb.offset);
t->texBase = fb.offset;
}
sPriv->private = NULL;
__driUtilMessage("viaInitDriver: drmMap agp failed");
return GL_FALSE;
- }
- viaScreen->agpBase = (GLuint *)gDRIPriv->agp.handle;
+ }
+
+ /*
+ * FIXME: This is an invalid assumption that works until handle is
+ * changed to mean something else than the 32-bit physical AGP address.
+ */
+
+ viaScreen->agpBase = gDRIPriv->agp.handle;
} else
viaScreen->agpLinearStart = 0;