diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/Android.mk | 1 | ||||
-rw-r--r-- | src/egl/Makefile.am | 2 | ||||
-rw-r--r-- | src/egl/SConscript | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_wayland.c | 3 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_x11.c | 3 | ||||
-rw-r--r-- | src/glx/apple/apple_visual.c | 2 | ||||
-rw-r--r-- | src/glx/glxext.c | 2 |
7 files changed, 10 insertions, 5 deletions
diff --git a/src/egl/Android.mk b/src/egl/Android.mk index 00553226773..d7a6e88918f 100644 --- a/src/egl/Android.mk +++ b/src/egl/Android.mk @@ -48,6 +48,7 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/egl/drivers/dri2 LOCAL_STATIC_LIBRARIES := \ + libmesa_util \ libmesa_loader LOCAL_SHARED_LIBRARIES := \ diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am index bb8ec9745dd..8ff1ffaba18 100644 --- a/src/egl/Makefile.am +++ b/src/egl/Makefile.am @@ -45,6 +45,7 @@ libEGL_common_la_SOURCES = \ $(LIBEGL_C_FILES) libEGL_common_la_LIBADD = \ + $(top_builddir)/src/util/libmesautil.la \ $(EGL_LIB_DEPS) dri2_backend_FILES = @@ -82,7 +83,6 @@ AM_CFLAGS += $(WAYLAND_CFLAGS) libEGL_common_la_LIBADD += $(WAYLAND_LIBS) libEGL_common_la_LIBADD += $(LIBDRM_LIBS) libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la -libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la dri2_backend_FILES += \ drivers/dri2/platform_wayland.c \ drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \ diff --git a/src/egl/SConscript b/src/egl/SConscript index 8f8b11a61ce..927092d2284 100644 --- a/src/egl/SConscript +++ b/src/egl/SConscript @@ -24,6 +24,8 @@ env.Append(CPPDEFINES = [ ]) egl_sources.append('drivers/haiku/egl_haiku.cpp') +env.Prepend(LIBS = [mesautil]) + egl = env.SharedLibrary( target = 'EGL', source = egl_sources, diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index bf2adbf63bd..eb10a7dd137 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -42,6 +42,7 @@ #include "egl_dri2.h" #include "egl_dri2_fallbacks.h" #include "loader.h" +#include "util/debug.h" #include "util/u_vector.h" #include "eglglobals.h" @@ -1940,7 +1941,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) { EGLBoolean initialized = EGL_TRUE; - int hw_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL); + bool hw_accel = !env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false); if (hw_accel) { if (!dri2_initialize_wayland_drm(drv, disp)) { diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 5ca5b912dab..5d5eea3773b 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -40,6 +40,7 @@ #endif #include <sys/types.h> #include <sys/stat.h> +#include "util/debug.h" #include "util/macros.h" #include "egl_dri2.h" @@ -1458,7 +1459,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp) { EGLBoolean initialized = EGL_FALSE; - if (!getenv("LIBGL_ALWAYS_SOFTWARE")) { + if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) { #ifdef HAVE_DRI3 if (!getenv("LIBGL_DRI3_DISABLE")) initialized = dri2_initialize_x11_dri3(drv, disp); diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c index d665cd7e01c..a4918239178 100644 --- a/src/glx/apple/apple_visual.c +++ b/src/glx/apple/apple_visual.c @@ -90,7 +90,7 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m attr[numattr++] = kCGLPFAOffScreen; } - else if (getenv("LIBGL_ALWAYS_SOFTWARE") != NULL) { + else if (env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) { apple_glx_diagnostic ("Software rendering requested. Using kCGLRendererGenericFloatID.\n"); attr[numattr++] = kCGLPFARendererID; diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 3431f3e5cae..cd9a3ba6ba0 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -908,7 +908,7 @@ __glXInitialize(Display * dpy) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL); - glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL); + glx_accel = !env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false); dpyPriv->drawHash = __glxHashCreate(); |