diff --git a/.pick_status.json b/.pick_status.json index ed546ec1217..0acceafe5e1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3262,7 +3262,7 @@ "description": "wgl: Disable automatic use of layered drivers with LIBGL_ALWAYS_SOFTWARE", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "8955980f17f902d24c50962502a20285dcd11642" }, diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c index 6c36c0dfd8c..119612ba9c5 100644 --- a/src/gallium/targets/libgl-gdi/libgl_gdi.c +++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c @@ -37,6 +37,7 @@ #include #include "util/u_debug.h" +#include "util/debug.h" #include "stw_winsys.h" #include "stw_device.h" #include "gdi/gdi_sw_winsys.h" @@ -124,6 +125,7 @@ static struct pipe_screen * 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) @@ -132,7 +134,7 @@ gdi_screen_create(HDC hDC) const char *const drivers[] = { debug_get_option("GALLIUM_DRIVER", ""), #ifdef GALLIUM_D3D12 - "d3d12", + sw_only ? "" : "d3d12", #endif #if defined(GALLIUM_LLVMPIPE) "llvmpipe",