[Glamor] [PATCH] GLX: Enable glx support.

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 10 04:08:44 PST 2012


On Fri, 10 Feb 2012 16:48:57 +0800, zhigang.gong at linux.intel.com wrote:
> From: Zhigang Gong <zhigang.gong at linux.intel.com>
> 
> If we are using MESA as our GL library, then both xserver's
> GLX and glamor are link to the same library. As xserver's
> GLX has its own _glapi_get/set_context/dispatch etc, and it
> is a simplified version derived from mesa thus is not
> sufficient for mesa/egl's dri loader which is used by glamor.

There are a few more places where the dispatch table is accessed
directly outside of a context. I'd recommend renaming
glamor_priv->dispatch and wrapping the access to the dispatch table
with a function that also ensured the context was bound.

dispatch = glamor_get_dispatch(glamor_priv);
...
glamor_put_dispatch(glamor_priv);

So that you catch all places where we attempt to call into GL without a
context. As an optimisation you can then do glamor_get_context();
glamor_put_context() around the rendering entry points to reduce the
frequency of having to restore the old context. (Along with allowing the
context to be recursively acquired and making the old context part of
the glamor_egl state.)

More annoyingly it appears the inclusion of the headers in the wrong
order is back again as I am gettting structure size mismatches between
glamor and intel again. :(
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Glamor mailing list