Leif Delgass wrote: > > On Mon, 13 May 2002, Ian Romanick wrote: > > > On Sun, May 12, 2002 at 06:18:58PM -0400, Leif Delgass wrote: > > > > > In working on AGP texturing for mach64, I'm starting from the Rage128 > > > code, which seems to have some problems (though the texture aging problem > > > could affect other drivers). My understanding is that textures in the > > > global LRU are marked as "used" and aged so that placeholders can be > > > inserted in a context's local LRU when another context steals its texture > > > memory. The problem is that nowhere are these texture regions released by > > > the context using them. The global LRU is only reset when the heap is > > > full. So the heap has to fill up before placeholders begin to get swapped > > > out. I've seen this when running multiple contexts at once, or repeatedly > > > starting, stopping, and restarting a single app. This isn't a huge > > > problem with a single heap, but with an AGP heap it means that card memory > > > is effectively leaked. Once the card memory global LRU is nearly filled > > > in the sarea with regions marked as "used", newly started apps will start > > > out only using AGP mem (with the r128 algorithm). Only if the app uses > > > enough mem. to fill AGP will it start to swap out the placeholders from > > > the local LRU and use card memory. > > > > If this is true, then I believe it is a bug in the r128 driver. IIRC, all > > of the space in the global texture heaps is freed when the context is > > destroyed. This is the way that the Radeon and MGA drivers work. The r128 > > driver follows the same model so it is /intended/ to work the same. > > It looks to me like this is a bug in all the drivers. Try grepping for > 'in_use' in the Mesa drivers. I don't see anywhere in _any_ of the > drivers where a context sets in_use to zero in a texture region in the > global heap.
Sorry to come to this late. The 'in_use' flag isn't used, you are right. But it's not really needed, either. Basically the key is that a driver must always be able to cope with having all of it's textures ripped out from under it (in the current scheme). When it grabs the lock and finds it has been contended, it looks at the global lru to see if any or all of it's textures have been clobbered. This is basically a refinement of the tdfx situation, where one flag indicates that all of the textures are gone. Keith _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel