[fuzz] Rework how fuzzer sidecar data works The existing implementation is based around capturing all of the comment data from the shader input and effectively doing a reinterpret cast to the specific transformation options struct. Given that many of these structs have dynamically sized containers (vectors, maps, etc), it is very unlikely that this will produce a valid state, because it requires the value from the number of elements bytes to correctly match the number elements that fit in the number of remaining bytes. It also has other significant limitations with regards to data over/under runs, etc. This is being replaced with a custom structured decoding/encoding implementation inspired by FuzzedDataProvider from libFuzzer, https://llvm.googlesource.com/libfuzzer/+/refs/heads/main/FuzzedDataProvider.h that uses the comment data as an entropy source. This change also lets us remove bytes::Decode, which in turn allows for dropping a bunch of other machinery in utils/bytes. Fixes: 559142627 Change-Id: Icfedc1babaafdd5dc60263216521a3a2701c2ff7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/341015 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.