mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 12:48:57 +02:00
Move dead submodules in-tree
Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
c0cceff365
commit
6c655321e6
4081 changed files with 1185566 additions and 45 deletions
48
externals/sirit/src/instructions/constant.cpp
vendored
Normal file
48
externals/sirit/src/instructions/constant.cpp
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* This file is part of the sirit project.
|
||||
* Copyright (c) 2019 sirit
|
||||
* This software may be used and distributed according to the terms of the
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::ConstantTrue(Id result_type) {
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantTrue, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantFalse(Id result_type) {
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantFalse, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::Constant(Id result_type, const Literal& literal) {
|
||||
declarations->Reserve(3 + 2);
|
||||
return *declarations << OpId{spv::Op::OpConstant, result_type} << literal << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantComposite(Id result_type, std::span<const Id> constituents) {
|
||||
declarations->Reserve(3 + constituents.size());
|
||||
return *declarations << OpId{spv::Op::OpConstantComposite, result_type} << constituents
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantSampler(Id result_type, spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized, spv::SamplerFilterMode filter_mode) {
|
||||
declarations->Reserve(6);
|
||||
return *declarations << OpId{spv::Op::OpConstantSampler, result_type} << addressing_mode
|
||||
<< normalized << filter_mode << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantNull(Id result_type) {
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantNull, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
Loading…
Add table
Add a link
Reference in a new issue