From: Felix <fx...@gm...> - 2005-01-24 22:57:50
|
Am Montag, den 24.01.2005, 18:12 +0100 schrieb Roland Scheidegger: > Felix K=FChling wrote: > > I intend to improve the heuristics that chooses the texture heap in > > driAllocateTexture. This may involve the texture size to allocate, the > > heap sizes and the amount of free space on each heap and maybe the ages > > of textures on each heap. I haven't thought too much about the details > > yet. If anyone has already put some thought into this I'd appreciate > > your input. > IMHO, the ages of textures might be crucial to get a reasonable=20 > heuristic. I'm not sure how much of a performance hit (especially with=20 > agp 4x and the relatively slow savage chips) agp texturing has (if the=20 > cards in question only have slow, narrow ram interfaces it might=20 > actually even be faster), but I would think that in general it would be=20 > beneficial to try local memory first, but if no recently-not-accessed=20 > textures exist (though determining of the threshold what is recent=20 > enough might involve some black magic), just use the agp gart heap=20 > instead of throwing some local texture out. At least on the Savage4 with 4x AGP there is no major performance difference between local and AGP textures. However, the performance hit of texture uploads is really bad (could probably be improved a lot by optimizing the tiling functions). So my assumptions for an optimization will be that, if you have to start kicking textures, you want to balance kicks fairly (proportionally?) between texture heaps. > I don't think the other criteria you suggest (such as texture size in=20 > relation to heap size) are really a good indicator where you'd want to=20 > place the texture (ok for that just-fits-local-heap big texture you=20 > might be better off usually with gart heap so all other textures fit=20 > into local memory, but OTOH maybe it's the only texture currently really=20 > accessed). I started thinking about some variation of round robin that would ensure that each heap kicks an equal proportion of data on average over time. This would avoid the black magic of age thresholds and the like and would allow new textures to replace old textures on all heaps, thus reducing texture trashing on the first heap. >=20 > Roland >=20 --=20 | Felix K=FChling <fx...@gm...> http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 | |