mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Move code to Windows Vulkan context initialization context
This workaround is not needed for rendering drivers other than Vulkan.
(cherry picked from commit 950c5b57e4)
This commit is contained in:
parent
30f079ecb5
commit
e46b14fd30
2 changed files with 4 additions and 5 deletions
|
|
@ -156,11 +156,6 @@ static void _error_handler(void *p_self, const char *p_func, const char *p_file,
|
|||
void OS_Windows::initialize() {
|
||||
crash_handler.initialize();
|
||||
|
||||
// Workaround for Vulkan not working on setups with AMD integrated graphics + NVIDIA dedicated GPU (GH-57708).
|
||||
// This prevents using AMD integrated graphics with Vulkan entirely, but it allows the engine to start
|
||||
// even on outdated/broken driver setups.
|
||||
OS::get_singleton()->set_environment("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");
|
||||
|
||||
#ifdef WINDOWS_DEBUG_OUTPUT_ENABLED
|
||||
error_handlers.errfunc = _error_handler;
|
||||
error_handlers.userdata = this;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@ Error VulkanContextWindows::window_create(DisplayServer::WindowID p_window_id, D
|
|||
}
|
||||
|
||||
VulkanContextWindows::VulkanContextWindows() {
|
||||
// Workaround for Vulkan not working on setups with AMD integrated graphics + NVIDIA dedicated GPU (GH-57708).
|
||||
// This prevents using AMD integrated graphics with Vulkan entirely, but it allows the engine to start
|
||||
// even on outdated/broken driver setups.
|
||||
OS::get_singleton()->set_environment("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");
|
||||
}
|
||||
|
||||
VulkanContextWindows::~VulkanContextWindows() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue