[Mesa-dev] [PATCH 9/9] HACK: eg: hack to drop SOFTWARE egl device
Emil Velikov
emil.l.velikov at gmail.com
Mon May 6 15:01:32 UTC 2019
For some extreme corner-cases where you'd want to do it.
---
src/egl/main/egldevice.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/egl/main/egldevice.c b/src/egl/main/egldevice.c
index 3e8c0e5aeb5..4a3127d7d62 100644
--- a/src/egl/main/egldevice.c
+++ b/src/egl/main/egldevice.c
@@ -321,15 +321,20 @@ _eglQueryDevicesEXT(EGLint max_devices,
devices[i] = dev;
dev = dev->Next;
}
-
+#define HACK_DROP_SOFTWARE_DEVICE 0
+#if !HACK_DROP_SOFTWARE_DEVICE
/* User requested the full device list, add the sofware device. */
if (max_devices >= num_devs) {
/* The first device is always software */
assert(_eglDeviceSupports(devs, _EGL_DEVICE_SOFTWARE));
devices[num_devs - 1] = devs;
}
+#endif
out:
+#if HACK_DROP_SOFTWARE_DEVICE
+ *num_devices--;
+#endif
mtx_unlock(_eglGlobal.Mutex);
return EGL_TRUE;
--
2.21.0
More information about the mesa-dev
mailing list