Am Freitag, 20. Februar 2004 08:39 schrieb Erdi Chen:
This is a patch to call the context handles destructors and free the context bitmap entries when a process does not destroy its contexts before it exits. It saves context handles in a linked list in the drm_device struct. I decided to use per device list instead of a per file descriptor list for simplicity because the number of contexts will usually be small.
What is "small" for you? Can you please elaborate?
Unless there's more than a couple thousand contexts open, I think having a single list per device is fine. How much time do you think it takes a modern CPU to do a linear search on a linked list of even 10.000 elements? :) If you've got 10.000 active 3D contexts going at once, your machine has probably already caught on fire anyway.
OpenGL is not DirectX (D3D). We test progs/xdemos/glthreads and progs/xdemos/manywin with n >= 100...
In the case of glthreads and manywin, all of the contexts are in a single DRM file handle, so the list size would be the same either way (unless you run multiple copies of the test at once).
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel