mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 09:20:23 +01:00
st/egl: Fix eglChooseConfig when configs is NULL.
When configs is NULL, the app wants to know the number of matching configs.
This commit is contained in:
parent
aa68dd9a49
commit
9f2062fb12
1 changed files with 4 additions and 4 deletions
|
|
@ -158,17 +158,17 @@ egl_g3d_choose_config(_EGLDriver *drv, _EGLDisplay *dpy, const EGLint *attribs,
|
|||
(_EGLArrayForEach) egl_g3d_match_config, (void *) &criteria);
|
||||
|
||||
/* perform sorting of configs */
|
||||
if (tmp_configs && tmp_size) {
|
||||
if (configs && tmp_size) {
|
||||
_eglSortConfigs((const _EGLConfig **) tmp_configs, tmp_size,
|
||||
egl_g3d_compare_config, (void *) &criteria);
|
||||
size = MIN2(tmp_size, size);
|
||||
for (i = 0; i < size; i++)
|
||||
tmp_size = MIN2(tmp_size, size);
|
||||
for (i = 0; i < tmp_size; i++)
|
||||
configs[i] = _eglGetConfigHandle(tmp_configs[i]);
|
||||
}
|
||||
|
||||
FREE(tmp_configs);
|
||||
|
||||
*num_configs = size;
|
||||
*num_configs = tmp_size;
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue