From d030f64550d871ca7d8b2364a81054daafe9a799 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Mon, 11 Mar 2019 17:16:52 +0000 Subject: [PATCH] Reorder backend connections so that explicit APIs come first This makes it so that default adapter discovery finds Metal/D3D12/Vulkan first. Change-Id: I3795bcc8a3d47eb3c53881b7fc43e8d56b4b89fd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5481 Reviewed-by: Kai Ninomiya Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng --- src/dawn_native/Instance.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dawn_native/Instance.cpp b/src/dawn_native/Instance.cpp index 6786f7f408..9877264d43 100644 --- a/src/dawn_native/Instance.cpp +++ b/src/dawn_native/Instance.cpp @@ -101,15 +101,15 @@ namespace dawn_native { #if defined(DAWN_ENABLE_BACKEND_METAL) Register(metal::Connect(this), BackendType::Metal); #endif // defined(DAWN_ENABLE_BACKEND_METAL) -#if defined(DAWN_ENABLE_BACKEND_NULL) - Register(null::Connect(this), BackendType::Null); -#endif // defined(DAWN_ENABLE_BACKEND_NULL) -#if defined(DAWN_ENABLE_BACKEND_OPENGL) - Register(opengl::Connect(this), BackendType::OpenGL); -#endif // defined(DAWN_ENABLE_BACKEND_OPENGL) #if defined(DAWN_ENABLE_BACKEND_VULKAN) Register(vulkan::Connect(this), BackendType::Vulkan); #endif // defined(DAWN_ENABLE_BACKEND_VULKAN) +#if defined(DAWN_ENABLE_BACKEND_OPENGL) + Register(opengl::Connect(this), BackendType::OpenGL); +#endif // defined(DAWN_ENABLE_BACKEND_OPENGL) +#if defined(DAWN_ENABLE_BACKEND_NULL) + Register(null::Connect(this), BackendType::Null); +#endif // defined(DAWN_ENABLE_BACKEND_NULL) mBackendsConnected = true; }