mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-30 08:55:39 +00:00
Roll third_party/shaderc/ 4baa46a5d..68b6857ac (2 commits)
4baa46a5d1..68b6857ac0
$ git log 4baa46a5d..68b6857ac --date=short --no-merges --format='%ad %ae %s'
2019-09-18 rharrison Code hygiene work for spvc (#808)
2019-09-10 stevenperron Have update_build_version.py new parameter (#805)
Change-Id: I06e0f62a1443741e8ac09a84ff63ddd100f6a656
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11341
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
// Copyright 2018 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
#include <vector>
|
|
|
|
#include "spvc/spvc.hpp"
|
|
|
|
namespace DawnSPIRVCrossFuzzer {
|
|
|
|
using Task = std::function<int(const std::vector<uint32_t>&)>;
|
|
using TaskWithOptions =
|
|
std::function<int(const std::vector<uint32_t>&, shaderc_spvc::CompileOptions)>;
|
|
|
|
// Used to wrap code that may fire a SIGABRT. Do not allocate anything local within |exec|, as
|
|
// it is not guaranteed to return.
|
|
void ExecuteWithSignalTrap(std::function<void()> exec);
|
|
|
|
// Used to fuzz by mutating the input data, but with fixed options to the compiler
|
|
int Run(const uint8_t* data, size_t size, Task task);
|
|
} // namespace DawnSPIRVCrossFuzzer
|