[Mesa-dev] [PATCH 02/10] egl: add simple EGL_EXT_device_base implementation

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 29 10:39:01 UTC 2018


Hi Eric,

On 29 August 2018 at 11:29, Eric Engestrom <eric.engestrom at intel.com> wrote:

>> +EGLBoolean
>> +_eglQueryDevicesEXT(EGLint max_devices,
>> +                    _EGLDevice **devices,
>> +                    EGLint *num_devices)
>> +{
>> +   _EGLDevice *dev, *devs;
>> +   int i = 0, num_devs;
>> +
>> +   if ((devices && max_devices <= 0) || !num_devices)
>> +      return _eglError(EGL_BAD_PARAMETER, "eglQueryDevicesEXT");
>> +
>> +   mtx_lock(_eglGlobal.Mutex);
>> +
>> +   num_devs = 0;
>> +   devs = _eglGlobal.DeviceList;
>
> I think this is wrong; you need to loop through the DeviceList until NULL
> and store the count in num_devs.  As is, this will always return 0.
>

You're right, it should ... I've added that in 3/10 :-\
I'm planning to split better the patches in v2 and address a few nitpicks [1].

Kindly let me know if you'll continue with the series or will wait for v2.

Thanks
Emil

[1] https://lists.freedesktop.org/archives/mesa-dev/2018-August/203759.html


More information about the mesa-dev mailing list