On Sat, 22 Feb 2014 03:03:57 +0000 Emil Velikov <emil.l.veli...@gmail.com> wrote:
> v2: nv04-2x cards support upto opengl 1.3. > v3: Include correct headers. > > Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> > --- > src/mesa/drivers/dri/nouveau/nouveau_screen.c | 83 > ++++++++++++++++++++++++++- > 1 file changed, 82 insertions(+), 1 deletion(-) ... I still think there is something funny here: > +static int > +nouveau_query_renderer_integer(__DRIscreen *psp, int param, > + unsigned int *value) > +{ > + const struct nouveau_screen *const screen = > + (struct nouveau_screen *) psp->driverPrivate; > + > + switch (param) { > + case __DRI2_RENDERER_VENDOR_ID: > + value[0] = 0x10de; > + return 0; > + case __DRI2_RENDERER_DEVICE_ID: { > + struct drm_nouveau_getparam gp; > + int *chip_id = 0, ret; chip_id is set to NULL. > + > + memset(&gp, 0, sizeof(gp)); > + gp.param = NOUVEAU_GETPARAM_PCI_DEVICE; > + gp.value = (unsigned long) chip_id; gp.value is now 0 (NULL). > + > + ret = drmCommandWriteRead(psp->fd, DRM_NOUVEAU_GETPARAM, &gp, > sizeof(gp)); > + if (ret) { > + nouveau_error("Error retrieving NOUVEAU_GETPARAM_PCI_DEVICE.\n"); > + *chip_id = -1; Dereferencing NULL. > + } > + value[0] = *chip_id; Dereferencing NULL. Am I missing something? You didn't mention anything about this when Ilia pointed it out. Thanks, pq > + return 0; > + } _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev