Instead of setting based on set/unset, allow users to use boolean values.
In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
If set to 'verbose' additional information will be printed.
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
If set to 'verbose' additional information will be printed.
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
-<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
+<li>LIBGL_ALWAYS_SOFTWARE - if set to `true`, always use software rendering
<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
calls per second.
<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
calls per second.
Use kill -10 <pid> to toggle the hud as desired.
<li>GALLIUM_HUD_DUMP_DIR - specifies a directory for writing the displayed
hud values into files.
Use kill -10 <pid> to toggle the hud as desired.
<li>GALLIUM_HUD_DUMP_DIR - specifies a directory for writing the displayed
hud values into files.
-<li>GALLIUM_DRIVER - useful in combination with LIBGL_ALWAYS_SOFTWARE=1 for
+<li>GALLIUM_DRIVER - useful in combination with LIBGL_ALWAYS_SOFTWARE=true for
choosing one of the software renderers "softpipe", "llvmpipe" or "swr".
<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
rather than stderr.
choosing one of the software renderers "softpipe", "llvmpipe" or "swr".
<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
rather than stderr.
eval $__glxgears_cmd
eval $__es2info_cmd
eval $__es2gears_cmd
eval $__glxgears_cmd
eval $__es2info_cmd
eval $__es2gears_cmd
- export LIBGL_ALWAYS_SOFTWARE=1
+ export LIBGL_ALWAYS_SOFTWARE=true
eval $__glxinfo_cmd
eval $__glxgears_cmd
eval $__es2info_cmd
eval $__es2gears_cmd
eval $__glxinfo_cmd
eval $__glxgears_cmd
eval $__es2info_cmd
eval $__es2gears_cmd
- export LIBGL_ALWAYS_SOFTWARE=1
+ export LIBGL_ALWAYS_SOFTWARE=true
export GALLIUM_DRIVER=softpipe
eval $__glxinfo_cmd
eval $__glxgears_cmd
export GALLIUM_DRIVER=softpipe
eval $__glxinfo_cmd
eval $__glxgears_cmd
$(MESA_TOP)/src/egl/drivers/dri2
LOCAL_STATIC_LIBRARIES := \
$(MESA_TOP)/src/egl/drivers/dri2
LOCAL_STATIC_LIBRARIES := \
libmesa_loader
LOCAL_SHARED_LIBRARIES := \
libmesa_loader
LOCAL_SHARED_LIBRARIES := \
$(LIBEGL_C_FILES)
libEGL_common_la_LIBADD = \
$(LIBEGL_C_FILES)
libEGL_common_la_LIBADD = \
+ $(top_builddir)/src/util/libmesautil.la \
$(EGL_LIB_DEPS)
dri2_backend_FILES =
$(EGL_LIB_DEPS)
dri2_backend_FILES =
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 += $(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 \
dri2_backend_FILES += \
drivers/dri2/platform_wayland.c \
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
])
egl_sources.append('drivers/haiku/egl_haiku.cpp')
])
egl_sources.append('drivers/haiku/egl_haiku.cpp')
+env.Prepend(LIBS = [mesautil])
+
egl = env.SharedLibrary(
target = 'EGL',
source = egl_sources,
egl = env.SharedLibrary(
target = 'EGL',
source = egl_sources,
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
#include "util/u_vector.h"
#include "eglglobals.h"
#include "util/u_vector.h"
#include "eglglobals.h"
{
EGLBoolean initialized = EGL_TRUE;
{
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)) {
if (hw_accel) {
if (!dri2_initialize_wayland_drm(drv, disp)) {
#endif
#include <sys/types.h>
#include <sys/stat.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include "util/macros.h"
#include "egl_dri2.h"
#include "util/macros.h"
#include "egl_dri2.h"
{
EGLBoolean initialized = EGL_FALSE;
{
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);
#ifdef HAVE_DRI3
if (!getenv("LIBGL_DRI3_DISABLE"))
initialized = dri2_initialize_x11_dri3(drv, disp);
attr[numattr++] = kCGLPFAOffScreen;
}
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;
apple_glx_diagnostic
("Software rendering requested. Using kCGLRendererGenericFloatID.\n");
attr[numattr++] = kCGLPFARendererID;
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL);
#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();
dpyPriv->drawHash = __glxHashCreate();