Add std450 instructions 25-34.
authorDejan Mircevski <deki@google.com>
Tue, 25 Aug 2015 21:41:45 +0000 (17:41 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:52:01 +0000 (12:52 -0400)
source/ext_inst.cpp
test/BinaryToText.cpp
test/TextToBinary.cpp

index 123d257..a788f51 100644 (file)
@@ -29,6 +29,16 @@ static const spv_ext_inst_desc_t glslStd450Entries[] = {
     { GL450Inst(Asinh), {SPV_OPERAND_TYPE_ID}, },
     { GL450Inst(Acosh), {SPV_OPERAND_TYPE_ID}, },
     { GL450Inst(Atanh), {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Atan2), {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Pow), {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Exp), {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Log), {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Exp2), {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Log2), {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Sqrt), {SPV_OPERAND_TYPE_ID}, },
+    { "Inversesqrt", GLSLstd450::GLSLstd450InverseSqrt, {SPV_OPERAND_TYPE_ID}, },
+    { GL450Inst(Determinant), {SPV_OPERAND_TYPE_ID}, },
+    { "Inverse", GLSLstd450::GLSLstd450MatrixInverse, {SPV_OPERAND_TYPE_ID}, },
     // TODO: Add remaining GLSL.std.450 instructions
 };
 
index 120f21a..702b447 100644 (file)
@@ -196,4 +196,8 @@ INSTANTIATE_TEST_CASE_P(
         {"FSign", 6}, {"SSign", 7}, {"Floor", 8}, {"Ceil", 9}, {"Fract", 10},
         {"Radians", 11}, {"Degrees", 12}, {"Sin", 13}, {"Cos", 14}, {"Tan", 15},
         {"Asin", 16}, {"Acos", 17}, {"Atan", 18}, {"Sinh", 19}, {"Cosh", 20},
-        {"Tanh", 21}, {"Asinh", 22}, {"Acosh", 23}, {"Atanh", 24}})));
+        {"Tanh", 21}, {"Asinh", 22}, {"Acosh", 23}, {"Atanh", 24},
+        // TODO(deki): tests for two-argument functions.
+        /*{"Atan2", 25}, {"Pow", 26},*/ {"Exp", 27}, {"Log", 28},
+        {"Exp2", 29}, {"Log2", 30}, {"Sqrt", 31}, {"Inversesqrt", 32},
+        {"Determinant", 33}, {"Inverse", 34}})));
index fcf01dc..6b57b85 100644 (file)
@@ -329,7 +329,11 @@ INSTANTIATE_TEST_CASE_P(
         {"FSign", 6}, {"SSign", 7}, {"Floor", 8}, {"Ceil", 9}, {"Fract", 10},
         {"Radians", 11}, {"Degrees", 12}, {"Sin", 13}, {"Cos", 14}, {"Tan", 15},
         {"Asin", 16}, {"Acos", 17}, {"Atan", 18}, {"Sinh", 19}, {"Cosh", 20},
-        {"Tanh", 21}, {"Asinh", 22}, {"Acosh", 23}, {"Atanh", 24}})));
+        {"Tanh", 21}, {"Asinh", 22}, {"Acosh", 23}, {"Atanh", 24},
+        // TODO(deki): tests for two-argument functions.
+        /*{"Atan2", 25}, {"Pow", 26},*/ {"Exp", 27}, {"Log", 28},
+        {"Exp2", 29}, {"Log2", 30}, {"Sqrt", 31}, {"Inversesqrt", 32},
+        {"Determinant", 33}, {"Inverse", 34}})));
 
 TEST_F(TextToBinaryTest, StringSpace) {
   SetText("OpSourceExtension \"string with spaces\"");