Run format_all.sh.
This commit is contained in:
Родитель
b2c2e6483b
Коммит
bf5c07532c
|
@ -17,8 +17,8 @@
|
|||
#ifndef SPIRV_CROSS_CFG_HPP
|
||||
#define SPIRV_CROSS_CFG_HPP
|
||||
|
||||
#include <assert.h>
|
||||
#include "spirv_common.hpp"
|
||||
#include <assert.h>
|
||||
|
||||
namespace spirv_cross
|
||||
{
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
#ifndef SPIRV_CROSS_COMMON_HPP
|
||||
#define SPIRV_CROSS_COMMON_HPP
|
||||
|
||||
#include "spirv.hpp"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <locale>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
#include "spirv.hpp"
|
||||
#include <vector>
|
||||
|
||||
namespace spirv_cross
|
||||
{
|
||||
|
|
|
@ -2802,8 +2802,7 @@ const SPIRConstant &Compiler::get_constant(uint32_t id) const
|
|||
return get<SPIRConstant>(id);
|
||||
}
|
||||
|
||||
static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block,
|
||||
const unordered_set<uint32_t> &blocks)
|
||||
static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, const unordered_set<uint32_t> &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<uint32_t, unordered_set<uint32_t>> &variable_to_blocks)
|
||||
void Compiler::analyze_parameter_preservation(
|
||||
SPIRFunction &entry, const CFG &cfg, const unordered_map<uint32_t, unordered_set<uint32_t>> &variable_to_blocks)
|
||||
{
|
||||
for (auto &arg : entry.arguments)
|
||||
{
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
#include <vector>
|
||||
|
||||
#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<uint32_t, std::unordered_set<uint32_t>> &variable_to_blocks);
|
||||
void analyze_parameter_preservation(
|
||||
SPIRFunction &entry, const CFG &cfg,
|
||||
const std::unordered_map<uint32_t, std::unordered_set<uint32_t>> &variable_to_blocks);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче