From 5b8762223d784946311ed77a5afbe5c3e3b5cc2f Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Mon, 7 Jan 2019 10:01:28 +0100 Subject: [PATCH] Run format_all.sh. --- spirv_cross.cpp | 8 +++----- spirv_cross.hpp | 3 +-- spirv_glsl.cpp | 5 ++--- spirv_glsl.hpp | 3 +-- spirv_msl.cpp | 5 +++-- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/spirv_cross.cpp b/spirv_cross.cpp index 0d09d6220..56933f180 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -901,8 +901,8 @@ void Compiler::flatten_interface_block(uint32_t id) var.storage = storage; } -void Compiler::update_name_cache(unordered_set &cache_primary, - const unordered_set &cache_secondary, string &name) +void Compiler::update_name_cache(unordered_set &cache_primary, const unordered_set &cache_secondary, + string &name) { if (name.empty()) return; @@ -918,9 +918,7 @@ void Compiler::update_name_cache(unordered_set &cache_primary, return false; }; - const auto insert_name = [&](const string &n) { - cache_primary.insert(n); - }; + const auto insert_name = [&](const string &n) { cache_primary.insert(n); }; if (!find_name(name)) { diff --git a/spirv_cross.hpp b/spirv_cross.hpp index bf3b47720..2829ef088 100644 --- a/spirv_cross.hpp +++ b/spirv_cross.hpp @@ -653,8 +653,7 @@ class Compiler // but the set is not updated when we have found a new name. // Used primarily when adding block interface names. void update_name_cache(std::unordered_set &cache_primary, - const std::unordered_set &cache_secondary, - std::string &name); + const std::unordered_set &cache_secondary, std::string &name); bool function_is_pure(const SPIRFunction &func); bool block_is_pure(const SPIRBlock &block); diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index cde658c98..86289cd60 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -1546,8 +1546,7 @@ void CompilerGLSL::emit_buffer_block_native(const SPIRVariable &var) // Shaders never use the block by interface name, so we don't // have to track this other than updating name caches. // If we have a collision for any reason, just fallback immediately. - if (ir.meta[type.self].decoration.alias.empty() || - block_namespace.find(buffer_name) != end(block_namespace) || + if (ir.meta[type.self].decoration.alias.empty() || block_namespace.find(buffer_name) != end(block_namespace) || resource_names.find(buffer_name) != end(resource_names)) { buffer_name = get_block_fallback_name(var.self); @@ -4258,7 +4257,7 @@ string CompilerGLSL::to_function_name(uint32_t tex, const SPIRType &imgtype, boo if (!expression_is_constant_null(lod)) { SPIRV_CROSS_THROW( - "textureLod on sampler2DArrayShadow is not constant 0.0. This cannot be expressed in GLSL."); + "textureLod on sampler2DArrayShadow is not constant 0.0. This cannot be expressed in GLSL."); } workaround_lod_array_shadow_as_grad = true; } diff --git a/spirv_glsl.hpp b/spirv_glsl.hpp index 0aaf9b8d0..150588bcb 100644 --- a/spirv_glsl.hpp +++ b/spirv_glsl.hpp @@ -577,8 +577,7 @@ class CompilerGLSL : public Compiler // but the set is not updated when we have found a new name. // Used primarily when adding block interface names. void add_variable(std::unordered_set &variables_primary, - const std::unordered_set &variables_secondary, - std::string &name); + const std::unordered_set &variables_secondary, std::string &name); void check_function_call_constraints(const uint32_t *args, uint32_t length); void handle_invalid_expression(uint32_t id); diff --git a/spirv_msl.cpp b/spirv_msl.cpp index 9a8adb1c1..bd252725b 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -3339,7 +3339,8 @@ string CompilerMSL::to_function_args(uint32_t img, const SPIRType &imgtype, bool } else { - SPIRV_CROSS_THROW("Using non-constant 0.0 gradient() qualifier for sample_compare. This is not supported in MSL macOS."); + SPIRV_CROSS_THROW("Using non-constant 0.0 gradient() qualifier for sample_compare. This is not " + "supported in MSL macOS."); } } @@ -3354,7 +3355,7 @@ string CompilerMSL::to_function_args(uint32_t img, const SPIRType &imgtype, bool else { SPIRV_CROSS_THROW( - "Using non-constant 0.0 bias() qualifier for sample_compare. This is not supported in MSL macOS."); + "Using non-constant 0.0 bias() qualifier for sample_compare. This is not supported in MSL macOS."); } } }