[Mesa-dev] [PATCH v3 1/3] Add support for swrast to the DRM EGL platform

Andreas Pokorny andreas.pokorny at gmail.com
Wed Jul 2 10:29:01 PDT 2014


2014-07-02 18:48 GMT+02:00 Emil Velikov <emil.l.velikov at gmail.com>:

> On 02/07/14 13:11, Andreas Pokorny wrote:
> > Hi,
> > Still trying the patch. Meanwhile I found two more things here:
> >
> > [...]
> >
> > The driver_name is later freed with free, so to avoid abort strdup should
> > be necessary.
> >
> The free snuck in shortly before Giovanni sent out the last revision. It
> is on
> my todo list, as I rebase the patches next week.
>

Good. There was another case with "kms_swrast" in the other patch.

>
>
>
> >> +   if (ret) {
> >> +      fprintf(stderr, "failed to load swrast driver\n");
> >> +      return ret;
> >> +   }
> >> +
> >> +   dri->extensions = gbm_dri_screen_extensions;
> >> +
> >> +   if (dri->swrast == NULL)
> >> +      return -1;
> >> +
> >> +   if (dri->swrast->base.version >= 4) {
> >> +      dri->screen = dri->swrast->createNewScreen2(0, dri->extensions,
> >> +
>  dri->driver_extensions,
> >> +                                                  &dri->driver_configs,
> >> dri);
> >> +   } else {
> >> +      dri->screen = dri->swrast->createNewScreen(0, dri->extensions,
> >> +                                                 &dri->driver_configs,
> >> dri);
> >> +   }
> >>
> >
> > Is there any reason for not binding the gbm_dri_core_extensions here?
> > If there isnt I think you could easily combine that function with
> > dri_screen_create_dri2.
> >
> gbm_dri_core_extensions seems to be missing in here. If you're thinking
> about
> gbm_dri_device_extensions, then things go a bit different. Those extensions
> are present for hw backed drivers only, thus it would make little sense to
> try
> and bind them in here.
>
> A minor split in dri_load_driver() to handle only the required one will
> come
> with the rebase.
>
>
I think am mostly interested in __DRI_IMAGE extension. This part of the
code is still confusing for me.

regards
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140702/71a9dc89/attachment-0001.html>


More information about the mesa-dev mailing list