#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
-#include "util/debug.h"
static __DRIimage*
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
dri2_dpy->fd = -1;
disp->DriverData = (void *) dri2_dpy;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
+ if (!disp->Options.UseFallback) {
driver_loaded = surfaceless_probe_device(disp, false);
if (!driver_loaded)
_eglLog(_EGL_WARNING,
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
-#include "util/debug.h"
#include "util/u_vector.h"
#include "eglglobals.h"
{
EGLBoolean initialized = EGL_FALSE;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false))
+ if (!disp->Options.UseFallback)
initialized = dri2_initialize_wayland_drm(drv, disp);
if (!initialized)
{
EGLBoolean initialized = EGL_FALSE;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
+ if (!disp->Options.UseFallback) {
#ifdef HAVE_DRI3
if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
initialized = dri2_initialize_x11_dri3(drv, disp);
#include "egldriver.h"
#include "egllog.h"
+#include "util/debug.h"
+
static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
static _EGLDriver *_eglDriver;
assert(!dpy->Initialized);
/* set options */
- dpy->Options.UseFallback = EGL_FALSE;
+ dpy->Options.UseFallback =
+ env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
best_drv = _eglMatchAndInitialize(dpy);
if (!best_drv) {