Commit e2fc92ca by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix swiftshader device selection

A recent SwS roll changed the deviceName of swiftshader to include the backend (LLVM for example). That made ANGLE no longer recognize SwiftShader. This change looks for the known SwS device name as a prefix of the deviceName retrieved from the device, rather than a complete match. Bug: angleproject:3876 Change-Id: If6dacb1e5685493d5334cad2015439f0f6b71124 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1980275Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 07f0f019
......@@ -483,7 +483,8 @@ ICDFilterFunc GetFilterForICD(vk::ICD preferredICD)
return [](const VkPhysicalDeviceProperties &deviceProperties) {
return ((deviceProperties.vendorID == VENDOR_ID_GOOGLE) &&
(deviceProperties.deviceID == kSwiftShaderDeviceID) &&
(strcmp(deviceProperties.deviceName, kSwiftShaderDeviceName) == 0));
(strncmp(deviceProperties.deviceName, kSwiftShaderDeviceName,
strlen(kSwiftShaderDeviceName)) == 0));
};
default:
return [](const VkPhysicalDeviceProperties &deviceProperties) { return true; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment