Am Donnerstag, den 10.02.2005, 15:31 -0500 schrieb Jon Smirl:
> I haven't looked at the texture heap management code, but one simple
> idea for heap management would be to cascade the on-board heap to the
> AGP one. How does the current algorithm work? Does an algorithm like
> the one below have merit? It should sort the hot textures on-board,
> and single use textures should fall out of the cache.
> 
> 1) load all textures initially in the on-board heap. Since if you are
> loading them you're probably going to use them.

Drivers usually upload textures to the hardware just before binding them
to a hardware texture unit. So this assumption is always true.

> 2) Do LRU with the on-board heap. 
> 3) When you run out of space on-board, demote the end of the LRU list
> to the top of the AGP heap and copy the texture between heaps.

This means you copy a texture when you don't know if or when you're
going to need it again. So the move of the texture may just be a waste
of time. It would be better to just kick the texture and upload it again
later when it's really needed.

> 4) Run LRU on the AGP heap.
> 5) When it runs out of space lose the item.
> 6) an added twist would be if the top of the AGP heap gets hit too
> often knock it out of cache so that it will get reloaded on-board.

I'd rather reverse your scheme. Upload a texture to the GART heap first,
because that's potentially faster (though not with the current
implementation in the radeon drivers). When the texture is needed more
frequently, try promoting it to the local texture heap.

This scheme would give good results with movie players that need fast
texture uploads and typically use each texture exactly once. It would
also improve performance with games, simulations, ... that tend to use
the same textures many times and benefit from the higher memory
bandwidth when accessing local textures.

> 
> 
> Jon Smirl
> [EMAIL PROTECTED]
> 

-- 
| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to