Merge pull request #113213 from akien-mga/windows-d3d12-default
Windows: Make Direct3D 12 the default RD driver for new projects
This commit is contained in:
@ -3313,6 +3313,7 @@
|
|||||||
Two options are supported:
|
Two options are supported:
|
||||||
- [code]vulkan[/code] (default), Vulkan from native drivers. If [member rendering/rendering_device/fallback_to_vulkan] is enabled, this is used as a fallback if Direct3D 12 is not supported.
|
- [code]vulkan[/code] (default), Vulkan from native drivers. If [member rendering/rendering_device/fallback_to_vulkan] is enabled, this is used as a fallback if Direct3D 12 is not supported.
|
||||||
- [code]d3d12[/code], Direct3D 12 from native drivers. If [member rendering/rendering_device/fallback_to_d3d12] is enabled, this is used as a fallback if Vulkan is not supported.
|
- [code]d3d12[/code], Direct3D 12 from native drivers. If [member rendering/rendering_device/fallback_to_d3d12] is enabled, this is used as a fallback if Vulkan is not supported.
|
||||||
|
[b]Note:[/b] Starting with Godot 4.6, new projects are configured by default to use [code]d3d12[/code] on Windows. Projects created before Godot 4.6 keep [code]vulkan[/code] for compatibility reasons, but it is recommended to switch them manually to [code]d3d12[/code].
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/rendering_device/fallback_to_d3d12" type="bool" setter="" getter="" default="true">
|
<member name="rendering/rendering_device/fallback_to_d3d12" type="bool" setter="" getter="" default="true">
|
||||||
If [code]true[/code], the Forward+ renderer will fall back to Direct3D 12 if Vulkan is not supported. The fallback is always attempted regardless of this setting if Vulkan driver support was disabled at compile time.
|
If [code]true[/code], the Forward+ renderer will fall back to Direct3D 12 if Vulkan is not supported. The fallback is always attempted regardless of this setting if Vulkan driver support was disabled at compile time.
|
||||||
|
|||||||
@ -7884,6 +7884,7 @@ void EditorNode::notify_settings_overrides_changed() {
|
|||||||
HashMap<String, Variant> EditorNode::get_initial_settings() {
|
HashMap<String, Variant> EditorNode::get_initial_settings() {
|
||||||
HashMap<String, Variant> settings;
|
HashMap<String, Variant> settings;
|
||||||
settings["physics/3d/physics_engine"] = "Jolt Physics";
|
settings["physics/3d/physics_engine"] = "Jolt Physics";
|
||||||
|
settings["rendering/rendering_device/driver.windows"] = "d3d12";
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -233,6 +233,7 @@ def get_flags():
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
|
"d3d12": True,
|
||||||
"supported": ["d3d12", "dcomp", "library", "mono", "xaudio2"],
|
"supported": ["d3d12", "dcomp", "library", "mono", "xaudio2"],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -923,7 +924,8 @@ def check_d3d12_installed(env, suffix):
|
|||||||
print_error(
|
print_error(
|
||||||
"The Direct3D 12 rendering driver requires dependencies to be installed.\n"
|
"The Direct3D 12 rendering driver requires dependencies to be installed.\n"
|
||||||
"You can install them by running `python misc\\scripts\\install_d3d12_sdk_windows.py`.\n"
|
"You can install them by running `python misc\\scripts\\install_d3d12_sdk_windows.py`.\n"
|
||||||
"See the documentation for more information:\n\t"
|
"See the documentation for more information:\n"
|
||||||
"https://docs.godotengine.org/en/latest/engine_details/development/compiling/compiling_for_windows.html"
|
"\thttps://docs.godotengine.org/en/latest/engine_details/development/compiling/compiling_for_windows.html\n"
|
||||||
|
"Alternatively, disable this driver by compiling with `d3d12=no` explicitly."
|
||||||
)
|
)
|
||||||
sys.exit(255)
|
sys.exit(255)
|
||||||
|
|||||||
Reference in New Issue
Block a user