mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Instance: Only discover default adapters once.
BUG=dawn:109 Change-Id: I9e54550dc8d3cdea289b3ad529a69a4cf3d5a35b Reviewed-on: https://dawn-review.googlesource.com/c/5040 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b92fa10557
commit
9b8d2b0bbf
@@ -54,6 +54,10 @@ namespace dawn_native {
|
||||
void InstanceBase::DiscoverDefaultAdapters() {
|
||||
EnsureBackendConnections();
|
||||
|
||||
if (mDiscoveredDefaultAdapters) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Query and merge all default adapters for all backends
|
||||
for (std::unique_ptr<BackendConnection>& backend : mBackends) {
|
||||
std::vector<std::unique_ptr<AdapterBase>> backendAdapters =
|
||||
@@ -65,6 +69,8 @@ namespace dawn_native {
|
||||
mAdapters.push_back(std::move(adapter));
|
||||
}
|
||||
}
|
||||
|
||||
mDiscoveredDefaultAdapters = true;
|
||||
}
|
||||
|
||||
// This is just a wrapper around the real logic that uses Error.h error handling.
|
||||
|
||||
Reference in New Issue
Block a user