[Mesa-dev] [PATCH v3 1/3] Add support for swrast to the DRM EGL platform
Emil Velikov
emil.l.velikov at gmail.com
Wed Jul 2 09:48:17 PDT 2014
On 02/07/14 13:11, Andreas Pokorny wrote:
> 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.
>
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.
>
>> + 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.
Cheers,
Emil
>
>> +
>> + dri->lookup_image = NULL;
>> + dri->lookup_user_data = NULL;
>> +
>> + return 0;
>> +}
>> [...]
>>
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list