diff options
author | Hans-Kristian Arntzen <hans-kristian.arntzen@arm.com> | 2016-05-05 10:33:18 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <hans-kristian.arntzen@arm.com> | 2016-05-05 10:40:58 +0300 |
commit | 4b8ed53974c79a9dcbc55c14889e8a1cf30d1b77 (patch) | |
tree | 6f918be6498f5523e202b28b4be7d75913c63579 /spirv_cpp.hpp | |
parent | 9d4b5c0c595d3a6c1e057df2baaa1aa16a30b787 (diff) |
Add Clang format.
Reformats the entire codebase. Better to do it now than later.
Adds .clang-format and a convenience script format_all.sh which formats
everything automatically.
Diffstat (limited to 'spirv_cpp.hpp')
-rw-r--r-- | spirv_cpp.hpp | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/spirv_cpp.hpp b/spirv_cpp.hpp index 8a462357..133e51c7 100644 --- a/spirv_cpp.hpp +++ b/spirv_cpp.hpp @@ -22,32 +22,35 @@ namespace spirv_cross { - class CompilerCPP : public CompilerGLSL - { - public: - CompilerCPP(std::vector<uint32_t> spirv_) : CompilerGLSL(move(spirv_)) {} - std::string compile() override; - - private: - void emit_header() override; - void emit_c_linkage(); - void emit_function_prototype(SPIRFunction &func, uint64_t return_flags) override; - - void emit_resources(); - void emit_buffer_block(const SPIRVariable &type); - void emit_push_constant_block(const SPIRVariable &var); - void emit_interface_block(const SPIRVariable &type); - void emit_block_chain(SPIRBlock &block); - void emit_uniform(const SPIRVariable &var); - void emit_shared(const SPIRVariable &var); - - std::string argument_decl(const SPIRFunction::Parameter &arg); - - std::vector<std::string> resource_registrations; - std::string impl_type; - std::string resource_type; - uint32_t shared_counter = 0; - }; +class CompilerCPP : public CompilerGLSL +{ +public: + CompilerCPP(std::vector<uint32_t> spirv_) + : CompilerGLSL(move(spirv_)) + { + } + std::string compile() override; + +private: + void emit_header() override; + void emit_c_linkage(); + void emit_function_prototype(SPIRFunction &func, uint64_t return_flags) override; + + void emit_resources(); + void emit_buffer_block(const SPIRVariable &type); + void emit_push_constant_block(const SPIRVariable &var); + void emit_interface_block(const SPIRVariable &type); + void emit_block_chain(SPIRBlock &block); + void emit_uniform(const SPIRVariable &var); + void emit_shared(const SPIRVariable &var); + + std::string argument_decl(const SPIRFunction::Parameter &arg); + + std::vector<std::string> resource_registrations; + std::string impl_type; + std::string resource_type; + uint32_t shared_counter = 0; +}; } #endif |