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 <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2019-03-11 17:16:52 +00:00 committed by Commit Bot service account
parent 718e1dbb89
commit d030f64550
1 changed files with 6 additions and 6 deletions

View File

@ -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;
}