Hello,
sorry for the missing references to the previous postings
but I read them on the site.
Ok, I experienced the same problem of Failure in texture upload.o
My system has a G200 AGP with 8 MB.
I think this 8 mb of ram are the clue of both the texture problem
and (someway related) of the mga_get_buffer_ioctl() problem.
When i saw that error... and that NIL I decided to do
a lil surfing between the amazon of the X source code.
(X 4.1.0)
[ i will give you a looong answer so get your
preferred wine and sit comfortably ]
The error is reported from the mgatexmem.c file within the
libGL DRI extensions:
if (mmesa->TexObjList[heap].prev ==
&(mmesa->TexObjList[heap]))
{
fprintf(stderr, "Failed to upload texture, sz %d\n",
t->totalSize);
mmDumpMemInfo( mmesa->texHeap[heap] );
return -1;
}
Look at the lines around... it tries to do this:
t->MemBlock = mmAllocMem( mmesa->texHeap[heap],
t->totalSize,
6, 0 );
Now, from the error we know mmesa->texHeap[heap] is NIL and heap is 0
mmAllocMem doesn't allocate memory if the originating region (the 1st
parameter) is NULL. This is the problem: t->memBlock will be ALWAYS
NULL.
Looking at my XFree log i noticed this (and please confirm me it):
MGA(0): Reserved 0 kb for textures at offset .....
Let's take a look to the AccelInit() function into the mga_storm.c file
pMGADRIServer->textureSize = pMga->FbMapSize - 5 * bufferSize;
This variable is the size (in bytes) allocated for the textures..
bufferSize (defined as (pScrn->virtualY * bpp/8) and then aligned)
on my system is ~ 2 mb.
FbMapSize is the size allowed for all our video buffers memory
( i think the RAM on the card ) in fact it's 8 MB on my system.
A few math: 8 - (5*2) is less than 0. Oh no!
OK... let's continue reading this:
if(pMGADRIServer->textureSize < 512*1024)
{
pMGADRIServer->textureSize = 0;
pMGADRIServer->textureOffset = 0;
}
The comment just above says : 'make enough room for two 256x256x32bpp
textures'. This is strange... i think it should be..
pMGADRIServer->textureSize= 512*1024;
I recompiled the driver and restarted X.
Hm... first change:
(EE) MGA(0): Memory manager initialization to (0,0) (1280,1023) failed
This is quite not good...but I really don't know WHY it doesn't work.
Now, tuxracer works perfectly... and Quake 3 seems to work in a
1024x768 fashion without problems.. OH YES!
Tuxracer works for about half an hour... and then I decided 'it works'
Quake 3... works.. but I now started to exprience the second problem
(mga_get_buffer_ioctl: err=-16, hardware busy)
This is quite harded to solve... because we are talking about
the DRM layer and DMA transfers... now, i think it's not because
I changed that senseless zero... and I am about to
update my bios just after pressing my esc-:wq y sequence.
Byeeee
Alessio
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel