Steven Newbury wrote:
>
> On Friday 25 May 2001 01:22, ralf willenbacher wrote:
> > thanks for trying it out.
> > i fixed a typo (again)..
> <patch snipped>
> In your patch you changed 'totalcard = b->size' and 'totalagp=b->size' to
> 'totalcard += b->size' and 'totalagp += b->size' in
> xc/lib/GL/mesa/src/drv/mga/mgatexmem.c. This change stopped things working
> quite right.
i use the total size to figure out where to kick a texture out.
without the right numbers it could end up returning 0 and that would be
bad
since my g200 has no space on the card at all.
It starts up fine but seems to only have a couple of Mb of
> texture space available - while I have 44Mb allocated giving 32Mb for
> textures.
it only uploads into card space, this is slower then into agp space.
> The XF86Config option AGPSize still does not take effect,
i have
Section "Device"
Identifier "g200"
Driver "mga"
Option "AGPSize" "32"
EndSection
and get
(II) MGA(0): [agp] 32768 kB allocated with handle 0xd1041000
im currently running with this pice of code..
static int mgaChooseTexHeap( mgaContextPtr mmesa, mgaTextureObjectPtr t
)
{
int freeagp, freecard;
int fitincard, fitinagp;
int totalcard, totalagp;
TMemBlock *b;
totalcard = totalagp = fitincard = fitinagp = freeagp = freecard = 0;
b = mmesa->texHeap[0];
while(b)
{
totalcard += b->size;
if(b->free)
{
if(t->totalSize <= b->size)fitincard = 1;
}
b = b->next;
}
b = mmesa->texHeap[1];
while(b)
{
totalagp += b->size;
if(b->free)
{
if(t->totalSize <= b->size)fitinagp = 1;
}
b = b->next;
}
if(fitincard)return 0;
if(fitinagp)return 1;
if(totalcard && totalagp)
{
int ages;
int ratio = (totalcard > totalagp) ? totalcard / totalagp :
totalagp / totalcard;
ages = mmesa->sarea->texAge[0] + mmesa->sarea->texAge[1];
if( (ages % ratio) == 0)
{
fprintf(stderr,"goes into heap %d\n", totalcard > totalagp ? 1 :
0);
return totalcard > totalagp ? 1 : 0;
}
else
{
fprintf(stderr,"goes into heap %d\n", totalcard > totalagp ? 0 :
1);
return totalcard > totalagp ? 0 : 1;
}
}
fprintf(stderr, "goes into heap %d\n", totalagp ? 1 : 0);
if(totalagp) return 1;
return 0;
}
using the sarea ages is really wishfull thinking but it should work to
select the smaller memory space from time to time.
--
ralf willenbacher ([EMAIL PROTECTED])
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dri-devel