Don't try to load libvulkan on Mac

Only SwiftShader would be available on Mac.

Bug: chromium:1297154
Change-Id: I943a39dfdde4215ba0ea880bf08294f37f08ee42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/80720
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2022-02-16 17:32:20 +00:00 committed by Dawn LUCI CQ
parent ac85af4a00
commit 15bc24eeb8
1 changed files with 6 additions and 0 deletions

View File

@ -407,6 +407,12 @@ namespace dawn::native::vulkan {
InstanceBase* instance = GetInstance();
for (ICD icd : kICDs) {
#if defined(DAWN_PLATFORM_MACOS)
// On Mac, we don't expect non-Swiftshader Vulkan to be available.
if (icd == ICD::None) {
continue;
}
#endif // defined(DAWN_PLATFORM_MACOS)
if (options->forceSwiftShader && icd != ICD::SwiftShader) {
continue;
}