1 // Copyright (c) 2019 Google LLC
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
15 #ifndef SOURCE_FORCE_RENDER_RED_H_
16 #define SOURCE_FORCE_RENDER_RED_H_
20 #include "source/fuzz/protobufs/spirvfuzz_protobufs.h"
21 #include "spirv-tools/libspirv.hpp"
26 // Requires |binary_in| to be a valid SPIR-V module with Shader capability,
27 // containing an entry point with the Fragment execution model, and a single
28 // output variable of type vec4.
30 // Turns the body of this entry point into effectively:
32 // output_variable = vec4(1.0, 0.0, 0.0, 1.0);
37 // If suitable facts about values of uniforms are available, the 'false' will
38 // instead become: 'u > v', where 'u' and 'v' are pieces of uniform data for
39 // which it is known that 'u < v' holds.
41 const spv_target_env
& target_env
, spv_validator_options validator_options
,
42 const std::vector
<uint32_t>& binary_in
,
43 const spvtools::fuzz::protobufs::FactSequence
& initial_facts
,
44 const MessageConsumer
& message_consumer
, std::vector
<uint32_t>* binary_out
);
47 } // namespace spvtools
49 #endif // SOURCE_FORCE_RENDER_RED_H_