--- 45912fb908f7a1d2efbce0f1dbe81e5bc975fbe1/src/gallium/auxiliary/target-helpers/sw_helper.h~ 2017-01-07 00:44:29.000000000 +0000 +++ 45912fb908f7a1d2efbce0f1dbe81e5bc975fbe1/src/gallium/auxiliary/target-helpers/sw_helper.h 2017-04-15 21:00:23.516114142 +0000 @@ -34,6 +34,10 @@ { struct pipe_screen *screen = NULL; +#if defined(GALLIUM_SWR) + if (screen == NULL && strcmp(driver, "swr") == 0) + screen = swr_create_screen(winsys); +#endif #if defined(GALLIUM_LLVMPIPE) if (screen == NULL && strcmp(driver, "llvmpipe") == 0) screen = llvmpipe_create_screen(winsys); @@ -52,10 +56,6 @@ screen = softpipe_create_screen(winsys); #endif -#if defined(GALLIUM_SWR) - if (screen == NULL && strcmp(driver, "swr") == 0) - screen = swr_create_screen(winsys); -#endif return screen; } @@ -67,12 +67,12 @@ const char *default_driver; const char *driver; -#if defined(GALLIUM_LLVMPIPE) - default_driver = "llvmpipe"; +#if defined(GALLIUM_SWR) + default_driver = "swr"; #elif defined(GALLIUM_SOFTPIPE) default_driver = "softpipe"; -#elif defined(GALLIUM_SWR) - default_driver = "swr"; +#elif defined(GALLIUM_LLVMPIPE) + default_driver = "llvmpipe"; #else default_driver = ""; #endif --- 45912fb908f7a1d2efbce0f1dbe81e5bc975fbe1/src/gallium/auxiliary/target-helpers/inline_sw_helper.h~ 2017-01-07 00:44:29.000000000 +0000 +++ 45912fb908f7a1d2efbce0f1dbe81e5bc975fbe1/src/gallium/auxiliary/target-helpers/inline_sw_helper.h 2017-04-15 21:01:36.415359350 +0000 @@ -32,6 +32,10 @@ { struct pipe_screen *screen = NULL; +#if defined(GALLIUM_SWR) + if (screen == NULL && strcmp(driver, "swr") == 0) + screen = swr_create_screen(winsys); +#endif #if defined(GALLIUM_LLVMPIPE) if (screen == NULL && strcmp(driver, "llvmpipe") == 0) screen = llvmpipe_create_screen(winsys); @@ -50,10 +54,6 @@ screen = softpipe_create_screen(winsys); #endif -#if defined(GALLIUM_SWR) - if (screen == NULL && strcmp(driver, "swr") == 0) - screen = swr_create_screen(winsys); -#endif return screen; } @@ -65,12 +65,12 @@ const char *default_driver; const char *driver; -#if defined(GALLIUM_LLVMPIPE) - default_driver = "llvmpipe"; +#if defined(GALLIUM_SWR) + default_driver = "swr"; #elif defined(GALLIUM_SOFTPIPE) default_driver = "softpipe"; -#elif defined(GALLIUM_SWR) - default_driver = "swr"; +#elif defined(GALLIUM_LLVMPIPE) + default_driver = "llvmpipe"; #else default_driver = ""; #endif