[Mesa-dev] glxinfo proposed change
Brian Paul
brianp at vmware.com
Mon Jan 7 14:49:44 PST 2013
On 01/07/2013 02:34 PM, Matt Turner wrote:
> On Mon, Jan 7, 2013 at 1:08 PM, Jorge Ramirez Ortiz, HCL Europe
> <Jorge.Ramirez-Ortiz at hcl.com> wrote:
>> You are absolutely wrong. NULL is a valid return value. Please read the code.
>
> I'm not sure if you missed Ian's point or you're just being pedantic,
> but let me try to explain. The glxinfo code does this:
>
> if (glXMakeCurrent(dpy, win, ctx)) {
> ...
> const char *glVersion = (const char *) glGetString(GL_VERSION);
>
> For glGetString(GL_VERSION) to be called, you have a context. So,
> you've got a context and you're supplying a proper argument. It cannot
> return NULL. As a result, glxinfo does not need to check for NULL.
Sounds like Jorge is concerned about the case of driver bring-up when
glGetString() is possibly broken (but it would seem to be trivial to
simply fix that).
The glxinfo change is trivial and fine by me.
-Brian
More information about the mesa-dev
mailing list