mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-27 09:46:55 +01:00
Change clang-format settings
This commit is contained in:
parent
38838c9a9d
commit
73595f4588
27 changed files with 356 additions and 320 deletions
|
|
@ -4,20 +4,18 @@
|
|||
* Lesser General Public License version 3 or any later version.
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::ConstantTrue(Id result_type) {
|
||||
return AddDeclaration(
|
||||
std::make_unique<Op>(spv::Op::OpConstantTrue, bound, result_type));
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantTrue, bound, result_type));
|
||||
}
|
||||
|
||||
Id Module::ConstantFalse(Id result_type) {
|
||||
return AddDeclaration(
|
||||
std::make_unique<Op>(spv::Op::OpConstantFalse, bound, result_type));
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantFalse, bound, result_type));
|
||||
}
|
||||
|
||||
Id Module::Constant(Id result_type, const Literal& literal) {
|
||||
|
|
@ -26,22 +24,17 @@ Id Module::Constant(Id result_type, const Literal& literal) {
|
|||
return AddDeclaration(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::ConstantComposite(Id result_type,
|
||||
const std::vector<Id>& constituents) {
|
||||
auto op{
|
||||
std::make_unique<Op>(spv::Op::OpConstantComposite, bound, result_type)};
|
||||
Id Module::ConstantComposite(Id result_type, const std::vector<Id>& constituents) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpConstantComposite, bound, result_type)};
|
||||
op->Add(constituents);
|
||||
return AddDeclaration(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::ConstantSampler(Id result_type,
|
||||
spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized,
|
||||
spv::SamplerFilterMode filter_mode) {
|
||||
Id Module::ConstantSampler(Id result_type, spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized, spv::SamplerFilterMode filter_mode) {
|
||||
AddCapability(spv::Capability::LiteralSampler);
|
||||
AddCapability(spv::Capability::Kernel);
|
||||
auto op{
|
||||
std::make_unique<Op>(spv::Op::OpConstantSampler, bound, result_type)};
|
||||
auto op{std::make_unique<Op>(spv::Op::OpConstantSampler, bound, result_type)};
|
||||
op->Add(static_cast<u32>(addressing_mode));
|
||||
op->Add(normalized ? 1 : 0);
|
||||
op->Add(static_cast<u32>(filter_mode));
|
||||
|
|
@ -49,8 +42,7 @@ Id Module::ConstantSampler(Id result_type,
|
|||
}
|
||||
|
||||
Id Module::ConstantNull(Id result_type) {
|
||||
return AddDeclaration(
|
||||
std::make_unique<Op>(spv::Op::OpConstantNull, bound, result_type));
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantNull, bound, result_type));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue