5#ifndef FLUTTER_IMPELLER_COMPILER_SPIRV_SKSL_H_
6#define FLUTTER_IMPELLER_COMPILER_SPIRV_SKSL_H_
13#include "flutter/fml/logging.h"
14#include "spirv_glsl.hpp"
22 : CompilerGLSL(
std::move(spirv_)) {}
25 : CompilerGLSL(ir_, word_count) {}
28 : spirv_cross::CompilerGLSL(ir_) {}
31 : spirv_cross::CompilerGLSL(
std::move(ir_)) {}
36 std::string output_name_;
38 void emit_header()
override;
40 void emit_uniform(
const spirv_cross::SPIRVariable& var)
override;
42 void fixup_user_functions();
44 void detect_unsupported_resources();
45 bool emit_constant_resources();
46 bool emit_struct_resources();
47 bool emit_uniform_resources();
48 bool emit_output_resources();
49 bool emit_global_variable_resources();
50 bool emit_undefined_values();
51 void emit_resources();
53 void emit_interface_block(
const spirv_cross::SPIRVariable& var);
55 void emit_function_prototype(
56 spirv_cross::SPIRFunction& func,
57 const spirv_cross::Bitset& return_flags)
override;
59 std::string image_type_glsl(
const spirv_cross::SPIRType&
type,
61 bool member =
false)
override;
63 std::string builtin_to_glsl(spv::BuiltIn builtin,
64 spv::StorageClass storage)
override;
66 std::string to_texture_op(
67 const spirv_cross::Instruction&
i,
70 spirv_cross::SmallVector<uint32_t>& inherited_expressions)
override;
72 std::string to_function_name(
73 const spirv_cross::CompilerGLSL::TextureFunctionNameArguments&
args)
76 std::string to_function_args(
77 const spirv_cross::CompilerGLSL::TextureFunctionArguments&
args,
78 bool* p_forward)
override;
CompilerSkSL(const uint32_t *ir_, size_t word_count)
std::string compile() override
CompilerSkSL(const spirv_cross::ParsedIR &ir_)
CompilerSkSL(spirv_cross::ParsedIR &&ir_)
CompilerSkSL(std::vector< uint32_t > spirv_)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args