diff options
author | Andrew Woloszyn <awoloszyn@google.com> | 2015-08-21 13:39:34 -0400 |
---|---|---|
committer | Dejan Mircevski <deki@google.com> | 2015-08-24 15:04:49 -0400 |
commit | 1d2a87ed1b711944e50da798ad481beb486e7296 (patch) | |
tree | d4d597ce141f2ea6c1fa01e208b8c87e4539f642 /source/ext_inst.cpp | |
parent | fb76d81aa01411be27be71767b13dae076d31974 (diff) | |
download | spirv-tools-1d2a87ed1b711944e50da798ad481beb486e7296.tar.gz |
Added the initial set of glsl450 instructions.
Also rewrote the extended-instruction tests so that they would actually
make sure that the instruction actually appears in the output.
Diffstat (limited to 'source/ext_inst.cpp')
-rw-r--r-- | source/ext_inst.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/source/ext_inst.cpp b/source/ext_inst.cpp index 76506f16..123d2575 100644 --- a/source/ext_inst.cpp +++ b/source/ext_inst.cpp @@ -2,10 +2,33 @@ #include <string.h> +#define GL450Inst(name) #name, GLSLstd450::GLSLstd450##name + static const spv_ext_inst_desc_t glslStd450Entries[] = { - { - "round", GLSLstd450::GLSLstd450Round, {SPV_OPERAND_TYPE_ID}, - }, + { GL450Inst(Round), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(RoundEven), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Trunc), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(FAbs), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(SAbs), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(FSign), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(SSign), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Floor), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Ceil), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Fract), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Radians), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Degrees), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Sin), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Cos), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Tan), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Asin), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Acos), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Atan), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Sinh), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Cosh), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Tanh), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Asinh), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Acosh), {SPV_OPERAND_TYPE_ID}, }, + { GL450Inst(Atanh), {SPV_OPERAND_TYPE_ID}, }, // TODO: Add remaining GLSL.std.450 instructions }; |