[Glamor] [PATCH] GLX: Enable glx support.
zhigang gong
zhigang.gong at gmail.com
Fri Feb 10 06:44:17 PST 2012
On Fri, Feb 10, 2012 at 8:08 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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.)
Both the two advices look good for me. Will write new patch based on
your comment latter.
>
> 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. :(
Sorry for that, The wrong order is in glamor_picture.c. I remember I fixed
it on my local tree, but don't know why I lost that patch. Now I already push
it to the master tree. Please check it out and have a try.
Thanks.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
More information about the Glamor
mailing list