spirv_fuzzer_options.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright (c) 2019 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #ifndef SOURCE_SPIRV_FUZZER_OPTIONS_H_
  15. #define SOURCE_SPIRV_FUZZER_OPTIONS_H_
  16. #include "spirv-tools/libspirv.h"
  17. #include <string>
  18. #include <utility>
  19. // Manages command line options passed to the SPIR-V Fuzzer. New struct
  20. // members may be added for any new option.
  21. struct spv_fuzzer_options_t {
  22. spv_fuzzer_options_t();
  23. // See spvFuzzerOptionsSetRandomSeed.
  24. bool has_random_seed;
  25. uint32_t random_seed;
  26. // See spvFuzzerOptionsSetReplayRange.
  27. int32_t replay_range;
  28. // See spvFuzzerOptionsEnableReplayValidation.
  29. bool replay_validation_enabled;
  30. // See spvFuzzerOptionsSetShrinkerStepLimit.
  31. uint32_t shrinker_step_limit;
  32. // See spvFuzzerOptionsValidateAfterEveryPass.
  33. bool fuzzer_pass_validation_enabled;
  34. // See spvFuzzerOptionsEnableAllPasses.
  35. bool all_passes_enabled;
  36. };
  37. #endif // SOURCE_SPIRV_FUZZER_OPTIONS_H_