mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 05:00:48 +02: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.h"
|
||||||
#include "egl_dri2_fallbacks.h"
|
#include "egl_dri2_fallbacks.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "util/debug.h"
|
|
||||||
|
|
||||||
static __DRIimage*
|
static __DRIimage*
|
||||||
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
|
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
|
||||||
|
|
@ -325,7 +324,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
|
||||||
dri2_dpy->fd = -1;
|
dri2_dpy->fd = -1;
|
||||||
disp->DriverData = (void *) dri2_dpy;
|
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);
|
driver_loaded = surfaceless_probe_device(disp, false);
|
||||||
if (!driver_loaded)
|
if (!driver_loaded)
|
||||||
_eglLog(_EGL_WARNING,
|
_eglLog(_EGL_WARNING,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
#include "egl_dri2.h"
|
#include "egl_dri2.h"
|
||||||
#include "egl_dri2_fallbacks.h"
|
#include "egl_dri2_fallbacks.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "util/debug.h"
|
|
||||||
#include "util/u_vector.h"
|
#include "util/u_vector.h"
|
||||||
#include "eglglobals.h"
|
#include "eglglobals.h"
|
||||||
|
|
||||||
|
|
@ -1972,7 +1971,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||||
{
|
{
|
||||||
EGLBoolean initialized = EGL_FALSE;
|
EGLBoolean initialized = EGL_FALSE;
|
||||||
|
|
||||||
if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false))
|
if (!disp->Options.UseFallback)
|
||||||
initialized = dri2_initialize_wayland_drm(drv, disp);
|
initialized = dri2_initialize_wayland_drm(drv, disp);
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
|
|
|
||||||
|
|
@ -1460,7 +1460,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
|
||||||
{
|
{
|
||||||
EGLBoolean initialized = EGL_FALSE;
|
EGLBoolean initialized = EGL_FALSE;
|
||||||
|
|
||||||
if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
|
if (!disp->Options.UseFallback) {
|
||||||
#ifdef HAVE_DRI3
|
#ifdef HAVE_DRI3
|
||||||
if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
|
if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
|
||||||
initialized = dri2_initialize_x11_dri3(drv, disp);
|
initialized = dri2_initialize_x11_dri3(drv, disp);
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@
|
||||||
#include "egldriver.h"
|
#include "egldriver.h"
|
||||||
#include "egllog.h"
|
#include "egllog.h"
|
||||||
|
|
||||||
|
#include "util/debug.h"
|
||||||
|
|
||||||
static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
|
static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
|
||||||
static _EGLDriver *_eglDriver;
|
static _EGLDriver *_eglDriver;
|
||||||
|
|
||||||
|
|
@ -86,7 +88,8 @@ _eglMatchDriver(_EGLDisplay *dpy)
|
||||||
assert(!dpy->Initialized);
|
assert(!dpy->Initialized);
|
||||||
|
|
||||||
/* set options */
|
/* set options */
|
||||||
dpy->Options.UseFallback = EGL_FALSE;
|
dpy->Options.UseFallback =
|
||||||
|
env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
|
||||||
|
|
||||||
best_drv = _eglMatchAndInitialize(dpy);
|
best_drv = _eglMatchAndInitialize(dpy);
|
||||||
if (!best_drv) {
|
if (!best_drv) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue