@@ -493,7 +493,7 @@ def spawn_capture(sh, escape, cmd, args, env):
493493 LIBS += ["vulkan" ]
494494
495495 if env ["d3d12" ]:
496- check_d3d12_installed (env )
496+ check_d3d12_installed (env , env [ "arch" ] + "-msvc" )
497497
498498 env .AppendUnique (CPPDEFINES = ["D3D12_ENABLED" , "RD_ENABLED" ])
499499 LIBS += ["dxgi" , "dxguid" ]
@@ -513,7 +513,10 @@ def spawn_capture(sh, escape, cmd, args, env):
513513 env .Append (LIBPATH = [env ["pix_path" ] + "/bin/" + arch_subdir ])
514514 LIBS += ["WinPixEventRuntime" ]
515515
516- env .Append (LIBPATH = [env ["mesa_libs" ] + "/bin" ])
516+ if os .path .exists (env ["mesa_libs" ] + "-" + env ["arch" ] + "-msvc" ):
517+ env .Append (LIBPATH = [env ["mesa_libs" ] + "-" + env ["arch" ] + "-msvc/bin" ])
518+ else :
519+ env .Append (LIBPATH = [env ["mesa_libs" ] + "/bin" ])
517520 LIBS += ["libNIR.windows." + env ["arch" ] + prebuilt_lib_extra_suffix ]
518521
519522 if env ["opengl3" ]:
@@ -879,7 +882,10 @@ def configure_mingw(env: "SConsEnvironment"):
879882 env .Append (LIBS = ["vulkan" ])
880883
881884 if env ["d3d12" ]:
882- check_d3d12_installed (env )
885+ if env ["use_llvm" ]:
886+ check_d3d12_installed (env , env ["arch" ] + "-llvm" )
887+ else :
888+ check_d3d12_installed (env , env ["arch" ] + "-gcc" )
883889
884890 env .AppendUnique (CPPDEFINES = ["D3D12_ENABLED" , "RD_ENABLED" ])
885891 env .Append (LIBS = ["dxgi" , "dxguid" ])
@@ -894,7 +900,12 @@ def configure_mingw(env: "SConsEnvironment"):
894900 env .Append (LIBPATH = [env ["pix_path" ] + "/bin/" + arch_subdir ])
895901 env .Append (LIBS = ["WinPixEventRuntime" ])
896902
897- env .Append (LIBPATH = [env ["mesa_libs" ] + "/bin" ])
903+ if env ["use_llvm" ] and os .path .exists (env ["mesa_libs" ] + "-" + env ["arch" ] + "-llvm" ):
904+ env .Append (LIBPATH = [env ["mesa_libs" ] + "-" + env ["arch" ] + "-llvm/bin" ])
905+ elif not env ["use_llvm" ] and os .path .exists (env ["mesa_libs" ] + "-" + env ["arch" ] + "-gcc" ):
906+ env .Append (LIBPATH = [env ["mesa_libs" ] + "-" + env ["arch" ] + "-gcc/bin" ])
907+ else :
908+ env .Append (LIBPATH = [env ["mesa_libs" ] + "/bin" ])
898909 env .Append (LIBS = ["libNIR.windows." + env ["arch" ]])
899910 env .Append (LIBS = ["version" ]) # Mesa dependency.
900911
@@ -934,8 +945,8 @@ def configure(env: "SConsEnvironment"):
934945 configure_mingw (env )
935946
936947
937- def check_d3d12_installed (env ):
938- if not os .path .exists (env ["mesa_libs" ]):
948+ def check_d3d12_installed (env , suffix ):
949+ if not os .path .exists (env ["mesa_libs" ]) and not os . path . exists ( env [ "mesa_libs" ] + "-" + suffix ) :
939950 print_error (
940951 "The Direct3D 12 rendering driver requires dependencies to be installed.\n "
941952 "You can install them by running `python misc\\ scripts\\ install_d3d12_sdk_windows.py`.\n "
0 commit comments