From bf5c07532c9344d200c04ba28a754189308eaa52 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sat, 25 Mar 2017 16:28:44 +0100 Subject: [PATCH] Run format_all.sh. --- spirv_cfg.hpp | 2 +- spirv_common.hpp | 4 ++-- spirv_cross.cpp | 7 +++---- spirv_cross.hpp | 6 ++++-- spirv_hlsl.cpp | 16 ++++++++-------- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/spirv_cfg.hpp b/spirv_cfg.hpp index 8b6a1a7..7e21440 100644 --- a/spirv_cfg.hpp +++ b/spirv_cfg.hpp @@ -17,8 +17,8 @@ #ifndef SPIRV_CROSS_CFG_HPP #define SPIRV_CROSS_CFG_HPP -#include #include "spirv_common.hpp" +#include namespace spirv_cross { diff --git a/spirv_common.hpp b/spirv_common.hpp index a92ff60..24f4f62 100644 --- a/spirv_common.hpp +++ b/spirv_common.hpp @@ -17,14 +17,14 @@ #ifndef SPIRV_CROSS_COMMON_HPP #define SPIRV_CROSS_COMMON_HPP +#include "spirv.hpp" #include #include #include #include #include -#include #include -#include "spirv.hpp" +#include namespace spirv_cross { diff --git a/spirv_cross.cpp b/spirv_cross.cpp index d7d9827..4057af4 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -2802,8 +2802,7 @@ const SPIRConstant &Compiler::get_constant(uint32_t id) const return get(id); } -static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, - const unordered_set &blocks) +static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, const unordered_set &blocks) { // This block accesses the variable. if (blocks.find(block) != end(blocks)) @@ -2821,8 +2820,8 @@ static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, return false; } -void Compiler::analyze_parameter_preservation(SPIRFunction &entry, const CFG &cfg, - const unordered_map> &variable_to_blocks) +void Compiler::analyze_parameter_preservation( + SPIRFunction &entry, const CFG &cfg, const unordered_map> &variable_to_blocks) { for (auto &arg : entry.arguments) { diff --git a/spirv_cross.hpp b/spirv_cross.hpp index e6c8be5..f70177f 100644 --- a/spirv_cross.hpp +++ b/spirv_cross.hpp @@ -28,10 +28,10 @@ #include #include "spirv_common.hpp" -#include "spirv_cfg.hpp" namespace spirv_cross { +class CFG; struct Resource { // Resources are identified with their SPIR-V ID. @@ -616,7 +616,9 @@ protected: // Traverses all reachable opcodes and sets active_builtins to a bitmask of all builtin variables which are accessed in the shader. void update_active_builtins(); - void analyze_parameter_preservation(SPIRFunction &entry, const CFG &cfg, const std::unordered_map> &variable_to_blocks); + void analyze_parameter_preservation( + SPIRFunction &entry, const CFG &cfg, + const std::unordered_map> &variable_to_blocks); }; } diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp index 72ec4d1..067636e 100644 --- a/spirv_hlsl.cpp +++ b/spirv_hlsl.cpp @@ -1404,7 +1404,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "=="); else - BOP_CAST(== , SPIRType::Int); + BOP_CAST(==, SPIRType::Int); break; } @@ -1417,7 +1417,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "=="); else - BOP(== ); + BOP(==); break; } @@ -1429,7 +1429,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "!="); else - BOP_CAST(!= , SPIRType::Int); + BOP_CAST(!=, SPIRType::Int); break; } @@ -1442,7 +1442,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "!="); else - BOP(!= ); + BOP(!=); break; } @@ -1482,7 +1482,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">="); else - BOP_CAST(>= , type); + BOP_CAST(>=, type); break; } @@ -1494,7 +1494,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">="); else - BOP(>= ); + BOP(>=); break; } @@ -1534,7 +1534,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<="); else - BOP_CAST(<= , type); + BOP_CAST(<=, type); break; } @@ -1546,7 +1546,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<="); else - BOP(<= ); + BOP(<=); break; }