[PATCH 03/11] glx: Extend __GLXscreen::createContext to take attributes

Ian Romanick idr at freedesktop.org
Mon May 7 11:48:51 PDT 2012


On 04/18/2012 02:51 AM, Christopher James Halse Rogers wrote:
> On Tue, 2012-04-17 at 08:36 -0700, Ian Romanick wrote:
>> On 04/17/2012 03:05 AM, Christopher James Halse Rogers wrote:
>>> On Fri, 2012-04-13 at 18:11 -0700, Ian Romanick wrote:
>>>> From: Ian Romanick<ian.d.romanick at intel.com>
>>>>
>>>> The attributes will be used for glXCreateContextAttribsARB additions
>>>> in follow-on patches.
>>>>
>>>> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>
>>>> Reviewed-by: Jesse Barnes<jbarnes at virtuousgeek.org>
>>>> ---
>>>>    glx/glxcmds.c      |   12 ++++++++++--
>>>>    glx/glxdri.c       |   10 +++++++++-
>>>>    glx/glxdri2.c      |    5 ++++-
>>>>    glx/glxdriswrast.c |    4 +++-
>>>>    glx/glxscreens.h   |    5 ++++-
>>>>    5 files changed, 30 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/glx/glxcmds.c b/glx/glxcmds.c
>>>> index 5c70afa..f754104 100644
>>>> --- a/glx/glxcmds.c
>>>> +++ b/glx/glxcmds.c
>>>> @@ -276,8 +276,16 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
>>>>        /*
>>>>         ** Allocate memory for the new context
>>>>         */
>>>> -    if (!isDirect)
>>>> -        glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc);
>>>> +    if (!isDirect) {
>>>> +        int err;
>>>
>>> This variable shadows the err defined at the top of the function, which
>>> is not used after this point; any reason why you didn't just reuse the
>>> existing variable?
>
> You're still (as far as I can tell) unnecessarily shadowing the "int
> err" defined at the top of the function here.

D'oh!  You are totally correct.  I think I just missed that while making 
the other change.  I've updated my branch with the change.


More information about the xorg-devel mailing list