[Mesa-dev] [PATCH 25/30] egl/dri2: use dri2_bind_extensions to manage the optional extensions

Emil Velikov emil.l.velikov at gmail.com
Fri Aug 26 10:43:27 UTC 2016


On 25 August 2016 at 18:16, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> On Thu, Aug 25, 2016 at 9:18 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> From: Emil Velikov <emil.velikov at collabora.com>
>>
>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>> ---
>>  src/egl/drivers/dri2/egl_dri2.c | 28 ++++++++++------------------
>>  1 file changed, 10 insertions(+), 18 deletions(-)
>>
>> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
>> index f41f9a9..6edee68 100644
>> --- a/src/egl/drivers/dri2/egl_dri2.c
>> +++ b/src/egl/drivers/dri2/egl_dri2.c
>> @@ -387,6 +387,15 @@ static struct dri2_extension_match swrast_core_extensions[] = {
>>     { NULL, 0, 0 }
>>  };
>>
>> +static struct dri2_extension_match optional_core_extensions[] = {
>> +   { __DRI2_ROBUSTNESS, 1, offsetof(struct dri2_egl_display, robustness), true },
>> +   { __DRI2_CONFIG_QUERY, 1, offsetof(struct dri2_egl_display, config), true },
>> +   { __DRI2_FENCE, 1, offsetof(struct dri2_egl_display, fence), true },
>> +   { __DRI2_RENDERER_QUERY, 1, offsetof(struct dri2_egl_display, rendererQuery), true },
>> +   { __DRI2_INTEROP, 1, offsetof(struct dri2_egl_display, interop), true },
>> +   { NULL, 0, 0 }
>> +};
>
> If we're grouping optional extensions in their own array anyway (which
> I like), why don't we make the 'optional' flag an argument to
> dri2_bind_extensions() instead?
>
This in one of the things I was split about - should we mix'n'match
mandatory and optional extensions. Be that in the list(s) or the
function.
Unless we hear anyone put a good argument for the current approach
I'll go with your suggestion.

-Emil


More information about the mesa-dev mailing list