mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
fuzzing: Add error injection macros to the Vulkan backend
This will enable fuzzing the Vulkan backend with randomly injected errors to help ensure the backend properly handles all errors. It also redefines VkResult in the dawn_native::vulkan namespace such that a VkResult cannot be used unless it is explicitly wrapped. Bug: dawn:295 Change-Id: I3ab2f98702a67a61afe06315658a9ab76ed4ccc3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14520 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
2c8a17ecc7
commit
6ea362cae0
@@ -12,6 +12,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build_overrides/build.gni")
|
||||
|
||||
if (build_with_chromium) {
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
# Enable Dawn's ASSERTs even in release builds
|
||||
dawn_always_assert = false
|
||||
@@ -51,6 +57,10 @@ declare_args() {
|
||||
# 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
|
||||
dawn_enable_error_injection =
|
||||
is_debug || (build_with_chromium && use_fuzzing_engine)
|
||||
}
|
||||
|
||||
# GN does not allow reading a variable defined in the same declare_args().
|
||||
|
||||
Reference in New Issue
Block a user