11 #include "flutter/fml/logging.h"
12 #include "flutter/fml/macros.h"
13 #include "spirv_glsl.hpp"
21 : CompilerGLSL(
std::move(spirv_)) {}
24 : CompilerGLSL(ir_, word_count) {}
27 : spirv_cross::CompilerGLSL(ir_) {}
30 : spirv_cross::CompilerGLSL(
std::move(ir_)) {}
35 std::string output_name_;
37 void emit_header()
override;
39 void emit_uniform(
const spirv_cross::SPIRVariable& var)
override;
41 void fixup_user_functions();
43 void detect_unsupported_resources();
44 bool emit_constant_resources();
45 bool emit_struct_resources();
46 bool emit_uniform_resources();
47 bool emit_output_resources();
48 bool emit_global_variable_resources();
49 bool emit_undefined_values();
50 void emit_resources();
52 void emit_interface_block(
const spirv_cross::SPIRVariable& var);
54 void emit_function_prototype(
55 spirv_cross::SPIRFunction& func,
56 const spirv_cross::Bitset& return_flags)
override;
58 std::string image_type_glsl(
const spirv_cross::SPIRType& type,
59 uint32_t
id = 0)
override;
61 std::string builtin_to_glsl(spv::BuiltIn builtin,
62 spv::StorageClass storage)
override;
64 std::string to_texture_op(
65 const spirv_cross::Instruction& i,
68 spirv_cross::SmallVector<uint32_t>& inherited_expressions)
override;
70 std::string to_function_name(
71 const spirv_cross::CompilerGLSL::TextureFunctionNameArguments& args)
74 std::string to_function_args(
75 const spirv_cross::CompilerGLSL::TextureFunctionArguments& args,
76 bool* p_forward)
override;