Reland "Use Swiftshader by default when fuzzing"

This is a reland of d08a14b709

It gates dawn_use_swiftshader on dawn_enable_vulkan because the
Vulkan backend isn't supported on Mac. We may support Swiftshader
Vulkan on Mac in the future, but that will first require changes
to how we initialize the Vulkan backend.

Original change's description:
> Use Swiftshader by default when fuzzing
>
> Note: This still requires Chromium to have set dawn_swiftshader_dir
> to take effect.
>
> Bug: dawn:295
> Change-Id: I0c953196630dd2694f68d290e6f3f1e427c20a2f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14821
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:295
Change-Id: Ia125005b35951021702104a99a78712bcd47dd1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14941
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2020-01-08 22:59:47 +00:00 committed by Commit Bot service account
parent 9b2712456f
commit c3609d224a
1 changed files with 9 additions and 7 deletions

View File

@ -51,13 +51,6 @@ declare_args() {
# compiler, since it is a sub-class of if. # compiler, since it is a sub-class of if.
dawn_enable_cross_reflection = false dawn_enable_cross_reflection = false
# Enables usage of swiftshader on the Vulkan backend.
# Note that this will only work in standalone and in projects that set the
# dawn_swiftshader_dir variable in build_overrides/dawn.gni
# Because of how the Vulkan loader works, setting this make Dawn only able
# to find the Swiftshader ICD and not the others.
dawn_use_swiftshader = false
# Enables error injection for faking failures to native API calls # Enables error injection for faking failures to native API calls
dawn_enable_error_injection = dawn_enable_error_injection =
is_debug || (build_with_chromium && use_fuzzing_engine) is_debug || (build_with_chromium && use_fuzzing_engine)
@ -67,6 +60,15 @@ declare_args() {
# Put them in two separate declare_args() when setting the value of one # Put them in two separate declare_args() when setting the value of one
# argument based on another. # argument based on another.
declare_args() { declare_args() {
# Enables usage of swiftshader on the Vulkan backend.
# Note that this will only work in standalone and in projects that set the
# dawn_swiftshader_dir variable in build_overrides/dawn.gni
# Because of how the Vulkan loader works, setting this make Dawn only able
# to find the Swiftshader ICD and not the others.
# Enabled by default when fuzzing.
dawn_use_swiftshader =
dawn_enable_vulkan && build_with_chromium && use_fuzzing_engine
# Uses our built version of Vulkan validation layers # Uses our built version of Vulkan validation layers
dawn_enable_vulkan_validation_layers = dawn_enable_vulkan_validation_layers =
dawn_enable_vulkan && ((is_linux && !is_chromeos) || is_win) dawn_enable_vulkan && ((is_linux && !is_chromeos) || is_win)