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

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Wed Apr 18 02:51:04 PDT 2012


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.

-------------- 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/20120418/3d4fc5e4/attachment.pgp>


More information about the xorg-devel mailing list