[Mesa-dev] [PATCH mesa 2/3] egl: rename LIBGL_ALWAYS_SOFTWARE variable from UseFallback to ForceSoftware

Eric Engestrom eric.engestrom at imgtec.com
Wed Dec 20 15:53:09 UTC 2017


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/egl/drivers/dri2/platform_android.c     | 2 +-
 src/egl/drivers/dri2/platform_drm.c         | 2 +-
 src/egl/drivers/dri2/platform_surfaceless.c | 2 +-
 src/egl/drivers/dri2/platform_wayland.c     | 2 +-
 src/egl/drivers/dri2/platform_x11.c         | 2 +-
 src/egl/main/egldisplay.h                   | 2 +-
 src/egl/main/egldriver.c                    | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 1b3092b7b3bf43324c9e..34e3ef66bfeb91f9c2fa 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -1180,7 +1180,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
    int ret;
 
    /* Not supported yet */
-   if (disp->Options.UseFallback)
+   if (disp->Options.ForceSoftware)
       return EGL_FALSE;
 
    loader_set_logger(_eglLog);
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index a2d18ef508938c7ec355..6e7403d9ab27ba938ece 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -653,7 +653,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
    const char *err;
 
    /* Not supported yet */
-   if (disp->Options.UseFallback)
+   if (disp->Options.ForceSoftware)
       return EGL_FALSE;
 
    loader_set_logger(_eglLog);
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 977b046016665aa99148..70b302c0ce42f8ec8a5a 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -324,7 +324,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
    dri2_dpy->fd = -1;
    disp->DriverData = (void *) dri2_dpy;
 
-   if (!disp->Options.UseFallback) {
+   if (!disp->Options.ForceSoftware) {
       driver_loaded = surfaceless_probe_device(disp, false);
       if (!driver_loaded)
          _eglLog(_EGL_WARNING,
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 02b32f988858303a5013..05a347abfcec87bfe873 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1999,7 +1999,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
 {
    EGLBoolean initialized = EGL_FALSE;
 
-   if (!disp->Options.UseFallback)
+   if (!disp->Options.ForceSoftware)
       initialized = dri2_initialize_wayland_drm(drv, disp);
 
    if (!initialized)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 8ede590bfab383cff965..78a51ba0e53e8fe8b229 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1459,7 +1459,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
 {
    EGLBoolean initialized = EGL_FALSE;
 
-   if (!disp->Options.UseFallback) {
+   if (!disp->Options.ForceSoftware) {
 #ifdef HAVE_DRI3
       if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
          initialized = dri2_initialize_x11_dri3(drv, disp);
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 0005c81836d45c917326..addf430ffed59937f147 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -160,7 +160,7 @@ struct _egl_display
 
    /* options that affect how the driver initializes the display */
    struct {
-      EGLBoolean UseFallback; /**< Use fallback driver (sw or less features) */
+      EGLBoolean ForceSoftware; /**< Use software path only */
       void *Platform;         /**< Platform-specific options */
    } Options;
 
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index f1973bde274ec768c4cf..c7d5aa18056518c51fc0 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -89,12 +89,12 @@ _eglMatchDriver(_EGLDisplay *dpy)
    assert(!dpy->Initialized);
 
    /* set options */
-   dpy->Options.UseFallback =
+   dpy->Options.ForceSoftware =
       env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
 
    best_drv = _eglMatchAndInitialize(dpy);
    if (!best_drv) {
-      dpy->Options.UseFallback = EGL_TRUE;
+      dpy->Options.ForceSoftware = EGL_TRUE;
       best_drv = _eglMatchAndInitialize(dpy);
    }
 
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list