mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
6414d6bd8d
commit
47273d7312
4 changed files with 7 additions and 6 deletions
|
|
@ -36,7 +36,6 @@
|
|||
#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,
|
||||
|
|
@ -325,7 +324,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
#include "egl_dri2.h"
|
||||
#include "egl_dri2_fallbacks.h"
|
||||
#include "loader.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/u_vector.h"
|
||||
#include "eglglobals.h"
|
||||
|
||||
|
|
@ -1972,7 +1971,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
{
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -1460,7 +1460,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
{
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
#include "egldriver.h"
|
||||
#include "egllog.h"
|
||||
|
||||
#include "util/debug.h"
|
||||
|
||||
static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
|
||||
static _EGLDriver *_eglDriver;
|
||||
|
||||
|
|
@ -86,7 +88,8 @@ _eglMatchDriver(_EGLDisplay *dpy)
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue