Add fuzzing for transform::VertexPulling

Includes a significant refactoring of helper functions in
tint_common_fuzzer.cc/.h

BUG=tint:722

Change-Id: I1fdab0113bae02c4a0bf8da0d1b7729f05a2fc5b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49902
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ryan Harrison
2021-05-06 15:43:33 +00:00
committed by Commit Bot service account
parent 4f34e7897b
commit a0174e613f
11 changed files with 215 additions and 112 deletions

View File

@@ -28,6 +28,7 @@ TINT_INSTANTIATE_TYPEINFO(tint::transform::VertexPulling::Config);
namespace tint {
namespace transform {
namespace {
struct State {

View File

@@ -56,12 +56,13 @@ enum class VertexFormat {
kI32,
kVec2I32,
kVec3I32,
kVec4I32
kVec4I32,
kLastEntry = kVec4I32
};
/// Describes if a vertex attributes increments with vertex index or instance
/// index
enum class InputStepMode { kVertex, kInstance };
enum class InputStepMode { kVertex, kInstance, kLastEntry = kInstance };
/// Describes a vertex attribute within a buffer
struct VertexAttributeDescriptor {