mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 02:04:41 +08: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>
(cherry picked from commit 48e218b49d
)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28885>
This commit is contained in:
parent
f62e842e31
commit
027ccc89b2
@ -332,7 +332,13 @@ _eglQueryDevicesEXT(EGLint max_devices,
|
||||
|
||||
num_devs = _eglRefreshDeviceList();
|
||||
devs = _eglGlobal.DeviceList;
|
||||
|
||||
#ifdef GALLIUM_SOFTPIPE
|
||||
swrast = devs;
|
||||
#else
|
||||
swrast = NULL;
|
||||
num_devs--;
|
||||
#endif
|
||||
|
||||
/* The first device is swrast. Start with the non-swrast device. */
|
||||
devs = devs->Next;
|
||||
@ -356,7 +362,7 @@ _eglQueryDevicesEXT(EGLint max_devices,
|
||||
}
|
||||
|
||||
/* 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));
|
||||
devices[num_devs - 1] = swrast;
|
||||
}
|
||||
|
@ -27,6 +27,10 @@ link_for_egl = []
|
||||
deps_for_egl = []
|
||||
incs_for_egl = [inc_include, inc_src, inc_egl]
|
||||
|
||||
if with_gallium_softpipe
|
||||
c_args_for_egl += '-DGALLIUM_SOFTPIPE'
|
||||
endif
|
||||
|
||||
files_egl = files(
|
||||
'main/eglapi.c',
|
||||
'main/eglarray.c',
|
||||
|
Loading…
Reference in New Issue
Block a user