You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Windows] Make D3D12 loading dynamic to support pre Windows 10 versions.
This commit is contained in:
@@ -421,6 +421,10 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
else:
|
||||
print("Missing environment variable: WindowsSdkDir")
|
||||
|
||||
if int(env["target_win_version"], 16) < 0x0601:
|
||||
print("`target_win_version` should be 0x0601 or higher (Windows 7).")
|
||||
sys.exit(255)
|
||||
|
||||
env.AppendUnique(
|
||||
CPPDEFINES=[
|
||||
"WINDOWS_ENABLED",
|
||||
@@ -485,7 +489,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
sys.exit(255)
|
||||
|
||||
env.AppendUnique(CPPDEFINES=["D3D12_ENABLED", "RD_ENABLED"])
|
||||
LIBS += ["d3d12", "dxgi", "dxguid"]
|
||||
LIBS += ["dxgi", "dxguid"]
|
||||
LIBS += ["version"] # Mesa dependency.
|
||||
|
||||
# Needed for avoiding C1128.
|
||||
@@ -650,6 +654,10 @@ def configure_mingw(env: "SConsEnvironment"):
|
||||
|
||||
## Compile flags
|
||||
|
||||
if int(env["target_win_version"], 16) < 0x0601:
|
||||
print("`target_win_version` should be 0x0601 or higher (Windows 7).")
|
||||
sys.exit(255)
|
||||
|
||||
if not env["use_llvm"]:
|
||||
env.Append(CCFLAGS=["-mwindows"])
|
||||
|
||||
@@ -710,7 +718,7 @@ def configure_mingw(env: "SConsEnvironment"):
|
||||
sys.exit(255)
|
||||
|
||||
env.AppendUnique(CPPDEFINES=["D3D12_ENABLED", "RD_ENABLED"])
|
||||
env.Append(LIBS=["d3d12", "dxgi", "dxguid"])
|
||||
env.Append(LIBS=["dxgi", "dxguid"])
|
||||
|
||||
# PIX
|
||||
if not env["arch"] in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]):
|
||||
|
||||
Reference in New Issue
Block a user