mirror of
https://github.com/shadps4-emu/sirit.git
synced 2024-11-23 03:10:02 +00:00
Add OpFunctionParameter
This commit is contained in:
parent
0ef6e807ab
commit
84fab90024
@ -242,6 +242,9 @@ public:
|
||||
return OpFunctionCall(result_type, function, std::span<const Id>({arguments...}));
|
||||
}
|
||||
|
||||
/// Declare a formal parameter of the current function.
|
||||
Id OpFunctionParameter(Id result_type);
|
||||
|
||||
// Flow
|
||||
|
||||
/**
|
||||
|
@ -26,4 +26,9 @@ Id Module::OpFunctionCall(Id result_type, Id function, std::span<const Id> argum
|
||||
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…
Reference in New Issue
Block a user