mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-17 11:27:57 +00: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
34
externals/sirit/src/instructions/function.cpp
vendored
Normal file
34
externals/sirit/src/instructions/function.cpp
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* 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 "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpFunction(Id result_type, spv::FunctionControlMask function_control, Id function_type) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpFunction, result_type} << function_control << function_type
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpFunctionEnd() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpFunctionEnd << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpFunctionCall(Id result_type, Id function, std::span<const Id> arguments) {
|
||||
code->Reserve(4 + arguments.size());
|
||||
return *code << OpId{spv::Op::OpFunctionCall, result_type} << function << arguments << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpFunctionParameter(Id result_type) {
|
||||
code->Reserve(3);
|
||||
return *code << OpId{spv::Op::OpFunctionParameter, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
Loading…
Add table
Add a link
Reference in a new issue