Hi!
I've sent two glx dri patches for review. The first one does some minor
optimizations and propagates driver makeCurrent back.
The second one is intended to fix the makeContextCurrent(NULL, None,
None) call and to do some additional error checking. This was prompted
by the newly added sharedtex_mt demo.
Most if not all mesa dri drivers are still broken w r t to the above
call, as it still does not get through to the driver makeCurrent hook.
Instead the correct functionality needs to be implemented in the driver
unbindContext hook, similar to the following:
GLboolean
viaUnbindContext(__DRIcontextPrivate * driContextPriv)
{
if (driContextPriv) {
struct via_context *vmesa =
(struct via_context *)driContextPriv->driverPrivate;
GLcontext *ctx = vmesa->glCtx;
GET_CURRENT_CONTEXT(oldctx);
if (ctx == oldctx)
VIA_FLUSH_DMA(vmesa);
_mesa_make_current(NULL, NULL, NULL);
}
return GL_TRUE;
}
In addition, if the context is changed in the driver makeCurrent hook,
the driver needs to flush the old context first. That could
theoretically also be done unbindContext, but since unbindContext is
called on the old context _after_ makeCurrent, that may not be a good idea.
/Thomas
------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev