[Xorg] Update on video memory manager work

Ian Romanick idr at us.ibm.com
Wed Jul 28 17:27:39 PDT 2004


Since there was so much interest at DDC, I wanted to give a brief update 
of my memory manager work.  I have about 95% of the baseline 
functionality (i.e., what's required to just replace the existing 
texture manager) done.  When I was at DDC, I was still hitting a few 
assertion failures, but, as of today, I've fixed all those.

I have hit one snag, but it's just a temporary set back.  The best way 
to explain is with an example.  Keep in mind that the current texture 
manager can (at least theoretically) also encounter this problem.  Say 
you have 32MB of memory and 3 texture units.  Say the application wants 
to bind a 16MB texture and two 8MB textures.  Since 16 + 8 + 8 = 32, it 
should fit, right?  Well, the allocator selects the location to put a 
texture based on a (driver supplied) cost function.  For each allocation 
it finds the location in memory with the least cost to put the texture. 
  Given that, it could put the first texture (say, one of the 8MB 
textures) at offset 0, and the second (say, the other 8MB texture) at 
0x00830000.  Guess what?  Now there's no 16MB chunk of memory for the 
other texture.

So, I'm going to rework the interface a little bit so that the allocator 
can look at all the require allocations at once.  It will place them in 
memory using some sort of path finding algorithm (probably A*).  That 
seems like a reasonably good fit.  Who thought you'd need AI for a video 
driver? ;)

Once I get that done, I'll have to find some way to reasonably 
distribute the simulator for people to review.





More information about the xorg mailing list