Esempio n. 1
0
EGLBoolean
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
{
   EGLBoolean initialized = EGL_FALSE;

   if (!disp->Options.ForceSoftware) {
#ifdef HAVE_DRI3
      if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
         initialized = dri2_initialize_x11_dri3(drv, disp);
#endif

      if (!initialized)
         initialized = dri2_initialize_x11_dri2(drv, disp);
   }

   if (!initialized)
      initialized = dri2_initialize_x11_swrast(drv, disp);

   return initialized;
}
Esempio n. 2
0
EGLBoolean
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
{
   EGLBoolean initialized = EGL_TRUE;

   int x11_dri2_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);

   if (x11_dri2_accel) {
#ifdef HAVE_DRI3
      if (getenv("LIBGL_DRI3_DISABLE") != NULL ||
          !dri2_initialize_x11_dri3(drv, disp)) {
#endif
         if (!dri2_initialize_x11_dri2(drv, disp)) {
            initialized = dri2_initialize_x11_swrast(drv, disp);
         }
#ifdef HAVE_DRI3
      }
#endif
   } else {
      initialized = dri2_initialize_x11_swrast(drv, disp);
   }

   return initialized;
}