Ensure the Vulkan fuzzer uses SwiftShader

Some bug reports have come in using lavapipe which is not a conformant
Vulkan implementation that we care about fuzzing.

Bug: chromium:1330453, chromium:1330389
Change-Id: I219103c30ca30702c8f3ccd6eebe87b90a10b6d2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92121
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Austin Eng 2022-05-31 17:28:49 +00:00 committed by Dawn LUCI CQ
parent f3cf19fdb2
commit b1f9f9fd8e
1 changed files with 2 additions and 2 deletions

View File

@ -15,6 +15,7 @@
#include <vector> #include <vector>
#include "DawnWireServerFuzzer.h" #include "DawnWireServerFuzzer.h"
#include "dawn/common/GPUInfo.h"
#include "dawn/native/DawnNative.h" #include "dawn/native/DawnNative.h"
#include "testing/libfuzzer/libfuzzer_exports.h" #include "testing/libfuzzer/libfuzzer_exports.h"
@ -29,8 +30,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
wgpu::AdapterProperties properties; wgpu::AdapterProperties properties;
adapter.GetProperties(&properties); adapter.GetProperties(&properties);
return properties.backendType == wgpu::BackendType::Vulkan && return gpu_info::IsGoogleSwiftshader(properties.vendorID, properties.deviceID);
properties.adapterType == wgpu::AdapterType::CPU;
}, },
true /* supportsErrorInjection */); true /* supportsErrorInjection */);
} }