mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-01 20:25:23 +01:00
Add ellipsis overloads for instructions ending in vectors
This commit is contained in:
parent
ee4ce61e62
commit
4b1c1d1e38
3 changed files with 122 additions and 33 deletions
|
|
@ -22,17 +22,17 @@ Id Module::OpExtInst(Id result_type, Id set, u32 instruction, const std::vector<
|
|||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, {operand}); \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand); \
|
||||
}
|
||||
|
||||
#define DEFINE_BINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, {operand_1, operand_2}); \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand_1, operand_2); \
|
||||
}
|
||||
|
||||
#define DEFINE_TRINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2, Id operand_3) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, {operand_1, operand_2, operand_3}); \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand_1, operand_2, operand_3); \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpFAbs, GLSLstd450FAbs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue