Fixes for x86_64 Unichrome.
This commit is contained in:
@@ -675,13 +675,14 @@ viaCreateContext(const __GLcontextModes *visual,
|
||||
(*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;
|
||||
}
|
||||
|
||||
@@ -797,9 +798,9 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
|
||||
__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) {
|
||||
|
||||
@@ -89,8 +89,8 @@ struct via_renderbuffer {
|
||||
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;
|
||||
@@ -106,8 +106,8 @@ struct via_renderbuffer {
|
||||
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;
|
||||
@@ -303,7 +303,7 @@ struct via_context {
|
||||
volatile GLuint* regEngineStatus;
|
||||
volatile GLuint* regTranSet;
|
||||
volatile GLuint* regTranSpace;
|
||||
GLuint* agpBase;
|
||||
GLuint agpBase;
|
||||
GLuint drawType;
|
||||
|
||||
GLuint nDoneFirstFlip;
|
||||
|
||||
@@ -142,12 +142,12 @@ via_alloc_texture(struct via_context *vmesa,
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,8 +168,14 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
|
||||
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;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct {
|
||||
|
||||
drmAddress reg;
|
||||
drmAddress agpLinearStart;
|
||||
GLuint* agpBase;
|
||||
GLuint agpBase;
|
||||
|
||||
__DRIscreenPrivate *driScrnPriv;
|
||||
drmBufMapPtr bufs;
|
||||
|
||||
Reference in New Issue
Block a user