mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 16:00:08 +01:00
egl: don't expose swrast device if swrast is not built
This fixes piglit/egl_ext_device_base without swrast. Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20951>
This commit is contained in:
parent
5952715064
commit
48e218b49d
2 changed files with 11 additions and 1 deletions
|
|
@ -316,7 +316,13 @@ _eglQueryDevicesEXT(EGLint max_devices,
|
||||||
|
|
||||||
num_devs = _eglRefreshDeviceList();
|
num_devs = _eglRefreshDeviceList();
|
||||||
devs = _eglGlobal.DeviceList;
|
devs = _eglGlobal.DeviceList;
|
||||||
|
|
||||||
|
#ifdef GALLIUM_SOFTPIPE
|
||||||
swrast = devs;
|
swrast = devs;
|
||||||
|
#else
|
||||||
|
swrast = NULL;
|
||||||
|
num_devs--;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The first device is swrast. Start with the non-swrast device. */
|
/* The first device is swrast. Start with the non-swrast device. */
|
||||||
devs = devs->Next;
|
devs = devs->Next;
|
||||||
|
|
@ -340,7 +346,7 @@ _eglQueryDevicesEXT(EGLint max_devices,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* User requested the full device list, add the sofware device. */
|
/* User requested the full device list, add the sofware device. */
|
||||||
if (max_devices >= num_devs) {
|
if (max_devices >= num_devs && swrast) {
|
||||||
assert(_eglDeviceSupports(swrast, _EGL_DEVICE_SOFTWARE));
|
assert(_eglDeviceSupports(swrast, _EGL_DEVICE_SOFTWARE));
|
||||||
devices[num_devs - 1] = swrast;
|
devices[num_devs - 1] = swrast;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@ link_for_egl = []
|
||||||
deps_for_egl = []
|
deps_for_egl = []
|
||||||
incs_for_egl = [inc_include, inc_src, inc_egl]
|
incs_for_egl = [inc_include, inc_src, inc_egl]
|
||||||
|
|
||||||
|
if with_gallium_softpipe
|
||||||
|
c_args_for_egl += '-DGALLIUM_SOFTPIPE'
|
||||||
|
endif
|
||||||
|
|
||||||
files_egl = files(
|
files_egl = files(
|
||||||
'main/eglapi.c',
|
'main/eglapi.c',
|
||||||
'main/eglarray.c',
|
'main/eglarray.c',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue