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

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Mon May 7 12:09:40 PDT 2012


On Mon, 2012-05-07 at 11:48 -0700, Ian Romanick wrote:
> 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.

Thanks :)

I've gone over the other patches in your branch I made comments on in
review; you can add my Reviewed-by for everything that doesn't already
have it in the branch ending with a6e82d220.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120507/b4acabfc/attachment.pgp>


More information about the xorg-devel mailing list