Hi!

It looks like the dri implementation is quite broken for
makeContextCurrent(NULL, None, None).
Drivers expect this to get through to the driver makeCurrent hook to be 
able to flush and to notify core mesa.

However the current glx code sends this request to the X server only, 
and the dri bindContext() hooks can't take NULL as a context argument, 
because they use the context argument to get function tables.

I see two ways of fixing this:
1) Extend dri_glx::driBindContext to take an extra 
(__GLXDRIcontextPrivate *)argument which is never NULL, and similarly 
extend dri_util::driBindContext to take an extra (__DRIcontext *) 
argument to access the function tables. Can we do this? Any special care 
that needs to be taken with extension versioning etc?? I'm not 100% 
sure, but I think driBindContext used to let the (NULL, None, None) call 
through to the driver MakeCurrent at some point.

2) Make sure all drivers implement the following driUnbindContext code:
(driUnbindContext is currently on the old context if any _after_ 
driBindContext is called for the new context)

if (current_context == context_to_unbind)
   driver::makeCurrent(NULL, NULL, NULL);

This would certainly be simpler, but requires fixing all dri drivers...
Any suggestions? I started out with 1) but I'm leaning more towards 2) 
at this point as 1) seems to get nasty.

/Thomas





------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to