From 5830eca337ebe0956a71d6b99d36cf539c2614b9 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 3 Nov 2018 21:32:37 -0300 Subject: [PATCH] Remove Op* prefix for constants --- include/sirit/sirit.h | 16 ++++++++-------- src/insts/constant.cpp | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index 8fdd217..b2509f2 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -132,24 +132,24 @@ class Module { // Constant /// Returns a true scalar constant. - Id OpConstantTrue(Id result_type); + Id ConstantTrue(Id result_type); /// Returns a false scalar constant. - Id OpConstantFalse(Id result_type); + Id ConstantFalse(Id result_type); /// Returns a numeric scalar constant. - Id OpConstant(Id result_type, const Literal& literal); + Id Constant(Id result_type, const Literal& literal); /// Returns a numeric scalar constant. - Id OpConstantComposite(Id result_type, const std::vector& constituents); + Id ConstantComposite(Id result_type, const std::vector& constituents); /// Returns a sampler constant. - Id OpConstantSampler(Id result_type, - spv::SamplerAddressingMode addressing_mode, - bool normalized, spv::SamplerFilterMode filter_mode); + Id ConstantSampler(Id result_type, + spv::SamplerAddressingMode addressing_mode, + bool normalized, spv::SamplerFilterMode filter_mode); /// Returns a null constant value. - Id OpConstantNull(Id result_type); + Id ConstantNull(Id result_type); // Function diff --git a/src/insts/constant.cpp b/src/insts/constant.cpp index 507b3f4..83df8f3 100644 --- a/src/insts/constant.cpp +++ b/src/insts/constant.cpp @@ -10,34 +10,34 @@ namespace Sirit { -Id Module::OpConstantTrue(Id result_type) { +Id Module::ConstantTrue(Id result_type) { return AddDeclaration( std::make_unique(spv::Op::OpConstantTrue, bound, result_type)); } -Id Module::OpConstantFalse(Id result_type) { +Id Module::ConstantFalse(Id result_type) { return AddDeclaration( std::make_unique(spv::Op::OpConstantFalse, bound, result_type)); } -Id Module::OpConstant(Id result_type, const Literal& literal) { +Id Module::Constant(Id result_type, const Literal& literal) { auto op{std::make_unique(spv::Op::OpConstant, bound, result_type)}; op->Add(literal); return AddDeclaration(std::move(op)); } -Id Module::OpConstantComposite(Id result_type, - const std::vector& constituents) { +Id Module::ConstantComposite(Id result_type, + const std::vector& constituents) { auto op{ std::make_unique(spv::Op::OpConstantComposite, bound, result_type)}; op->Add(constituents); return AddDeclaration(std::move(op)); } -Id Module::OpConstantSampler(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{ @@ -48,7 +48,7 @@ Id Module::OpConstantSampler(Id result_type, return AddDeclaration(std::move(op)); } -Id Module::OpConstantNull(Id result_type) { +Id Module::ConstantNull(Id result_type) { return AddDeclaration( std::make_unique(spv::Op::OpConstantNull, bound, result_type)); }