mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-27 09:46:55 +01:00
Add Op* prefix to instructions that have to be emited
This commit is contained in:
parent
ba3a3a74d7
commit
a08aeec982
15 changed files with 149 additions and 144 deletions
|
|
@ -10,31 +10,31 @@
|
|||
|
||||
namespace Sirit {
|
||||
|
||||
Ref Module::ConstantTrue(Ref result_type) {
|
||||
Ref Module::OpConstantTrue(Ref result_type) {
|
||||
return AddDeclaration(new Op(spv::Op::OpConstantTrue, bound, result_type));
|
||||
}
|
||||
|
||||
Ref Module::ConstantFalse(Ref result_type) {
|
||||
Ref Module::OpConstantFalse(Ref result_type) {
|
||||
return AddDeclaration(new Op(spv::Op::OpConstantFalse, bound, result_type));
|
||||
}
|
||||
|
||||
Ref Module::Constant(Ref result_type, const Literal& literal) {
|
||||
Ref Module::OpConstant(Ref result_type, const Literal& literal) {
|
||||
auto op{new Op(spv::Op::OpConstant, bound, result_type)};
|
||||
op->Add(literal);
|
||||
return AddDeclaration(op);
|
||||
}
|
||||
|
||||
Ref Module::ConstantComposite(Ref result_type,
|
||||
const std::vector<Ref>& constituents) {
|
||||
Ref Module::OpConstantComposite(Ref result_type,
|
||||
const std::vector<Ref>& constituents) {
|
||||
auto op{new Op(spv::Op::OpConstantComposite, bound, result_type)};
|
||||
op->Add(constituents);
|
||||
return AddDeclaration(op);
|
||||
}
|
||||
|
||||
Ref Module::ConstantSampler(Ref result_type,
|
||||
spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized,
|
||||
spv::SamplerFilterMode filter_mode) {
|
||||
Ref Module::OpConstantSampler(Ref result_type,
|
||||
spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized,
|
||||
spv::SamplerFilterMode filter_mode) {
|
||||
AddCapability(spv::Capability::LiteralSampler);
|
||||
AddCapability(spv::Capability::Kernel);
|
||||
auto op{new Op(spv::Op::OpConstantSampler, bound, result_type)};
|
||||
|
|
@ -44,7 +44,7 @@ Ref Module::ConstantSampler(Ref result_type,
|
|||
return AddDeclaration(op);
|
||||
}
|
||||
|
||||
Ref Module::ConstantNull(Ref result_type) {
|
||||
Ref Module::OpConstantNull(Ref result_type) {
|
||||
return AddDeclaration(new Op(spv::Op::OpConstantNull, bound, result_type));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue