D3D7 -> WineD3D, 2nd attempt
oliver_stieber at yahoo.co.uk
Sat Oct 15 14:13:24 CDT 2005
--- Lionel Ulmer <lionel.ulmer at free.fr> wrote:
> On Sat, Oct 15, 2005 at 07:30:34PM +0100, Oliver Stieber wrote:
> > Add the OpenGL context to the device structure.
> > Make a per-device critical section.
> > Whenever a call is made enter the critical section
> > Then check that the current active context is the same as the context on the device.
> > If not then make the device context active.
> How did you plan to solve the 'one needs to release a context before it is
> free to be used in another thread' problem ?
> The only 'easy' way out I can see would be to always release the context at
> the end of each processing so that any subsequent thread could, if needed,
> get the context.
We could do that, or we could signal the other thread an tell it to release the context which
should cut down on the context switching, I'm not sure how easy that would be to setup (it doesn't
seem possible using even objects because the thread has to be waiting)
Another option would be to create a new context that shares resources with the other contexts and
copy over the state from the old context to the new one.
Either way there's only a slight performance hit for single threaded applications.
> Lionel Ulmer - http://www.bbrox.org/
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
More information about the wine-devel