Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions drivers/d3d12/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Import("env")

env_d3d12_rdd = env.Clone()

thirdparty_obj = []


# DirectX Headers (must take precedence over Windows SDK's).

Expand Down Expand Up @@ -112,6 +110,10 @@ mesa_blacklist_inc_paths = [
mesa_blacklist_inc_paths = [mesa_dir + "/" + v for v in mesa_blacklist_inc_paths]
mesa_private_inc_paths = [v for v in mesa_private_inc_paths if v not in mesa_blacklist_inc_paths]

# This is needed since rendering_device_d3d12.cpp needs to include some Mesa internals.
# Appending instead of prepending to ensure we keep Windows SDKs included first (GH-106376).
env_d3d12_rdd.Append(CPPEXTPATH=mesa_private_inc_paths)

# Added by ourselves.
extra_defines = [
"WINDOWS_NO_FUTEX",
Expand Down Expand Up @@ -154,22 +156,12 @@ else:
env_d3d12_rdd.Append(CCFLAGS=["-Wno-unknown-pragmas"])
env.Append(CCFLAGS=["-Wno-unknown-pragmas"])

# This is needed since rendering_device_d3d12.cpp needs to include some Mesa internals.
env_d3d12_rdd.Prepend(CPPEXTPATH=mesa_private_inc_paths)
# For the same reason as above, the defines must be the same as in the 3rd-party code itself.
env_d3d12_rdd.Append(CPPDEFINES=extra_defines)


# Add all.

env.drivers_sources += thirdparty_obj


# Godot source files.

driver_obj = []
env_d3d12_rdd.add_source_files(driver_obj, "*.cpp")
env.drivers_sources += driver_obj

# Needed to force rebuilding the driver files when the thirdparty code is updated.
env.Depends(driver_obj, thirdparty_obj)