Fixes: 8955980f ("gallium/targets/libgl-gdi: prefer d3d12 driver")
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8865>
#include <windows.h>
#include "util/u_debug.h"
+#include "util/debug.h"
#include "stw_winsys.h"
#include "stw_device.h"
#include "gdi/gdi_sw_winsys.h"
gdi_screen_create(HDC hDC)
{
struct sw_winsys *winsys;
+ UNUSED bool sw_only = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
winsys = gdi_create_sw_winsys();
if (!winsys)
const char *const drivers[] = {
debug_get_option("GALLIUM_DRIVER", ""),
#ifdef GALLIUM_D3D12
- "d3d12",
+ sw_only ? "" : "d3d12",
#endif
#if defined(GALLIUM_LLVMPIPE)
"llvmpipe",