[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 05:11:57 PDT 2014
Hi,
Still trying the patch. Meanwhile I found two more things here:
2014-06-15 13:49 GMT+02:00 Giovanni Campagna <scampa.giovanni at gmail.com>:
> From: Giovanni Campagna <gcampagna at src.gnome.org>
> [..]
> static int
> +dri_screen_create_swrast(struct gbm_dri_device *dri)
> +{
> + int ret = 0;
> +
> + dri->base.driver_name = "swrast";
> +
> + ret = dri_load_driver(dri);
The driver_name is later freed with free, so to avoid abort strdup should
be necessary.
> + 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.
> +
> + dri->lookup_image = NULL;
> + dri->lookup_user_data = NULL;
> +
> + return 0;
> +}
> [...]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140702/9c05d020/attachment.html>
More information about the mesa-dev
mailing list