Skip to content

Commit

Permalink
Run format_all.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKristian-Work committed Jan 7, 2019
1 parent 649ce3c commit 5b87622
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
8 changes: 3 additions & 5 deletions spirv_cross.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,8 @@ void Compiler::flatten_interface_block(uint32_t id)
var.storage = storage;
}

void Compiler::update_name_cache(unordered_set<string> &cache_primary,
const unordered_set<string> &cache_secondary, string &name)
void Compiler::update_name_cache(unordered_set<string> &cache_primary, const unordered_set<string> &cache_secondary,
string &name)
{
if (name.empty())
return;
Expand All @@ -918,9 +918,7 @@ void Compiler::update_name_cache(unordered_set<string> &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))
{
Expand Down
3 changes: 1 addition & 2 deletions spirv_cross.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> &cache_primary,
const std::unordered_set<std::string> &cache_secondary,
std::string &name);
const std::unordered_set<std::string> &cache_secondary, std::string &name);

bool function_is_pure(const SPIRFunction &func);
bool block_is_pure(const SPIRBlock &block);
Expand Down
5 changes: 2 additions & 3 deletions spirv_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions spirv_glsl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> &variables_primary,
const std::unordered_set<std::string> &variables_secondary,
std::string &name);
const std::unordered_set<std::string> &variables_secondary, std::string &name);

void check_function_call_constraints(const uint32_t *args, uint32_t length);
void handle_invalid_expression(uint32_t id);
Expand Down
5 changes: 3 additions & 2 deletions spirv_msl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
}

Expand All @@ -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.");
}
}
}
Expand Down

0 comments on commit 5b87622

Please sign in to comment.