5 #ifndef FLUTTER_IMPELLER_RENDERER_SHADER_STAGE_COMPATIBILITY_CHECKER_H_
6 #define FLUTTER_IMPELLER_RENDERER_SHADER_STAGE_COMPATIBILITY_CHECKER_H_
38 template <
typename VertexShaderT,
typename FragmentShaderT>
43 return *str1 == *str2 &&
50 constexpr
size_t num_outputs = VertexShaderT::kAllShaderStageOutputs.size();
51 constexpr
size_t num_inputs = FragmentShaderT::kAllShaderStageInputs.size();
53 if (num_inputs > num_outputs) {
57 for (
size_t i = 0; i < num_inputs; ++i) {
59 FragmentShaderT::kAllShaderStageInputs[i];
60 for (
size_t j = 0; j < num_outputs; ++j) {
62 VertexShaderT::kAllShaderStageOutputs[j];
65 input_slot->
set != output_slot->
set ||
67 input_slot->
type != output_slot->
type ||
Checks, at C++ compile-time, if the two pipeline stages are compatible.
static constexpr bool Check()
static constexpr bool CompileTimeStrEqual(const char *str1, const char *str2)