Add std450 instructions 25-34.

This commit is contained in:
Dejan Mircevski 2015-08-25 17:41:45 -04:00 committed by David Neto
parent 902e5a8a52
commit a5c171544b
3 changed files with 20 additions and 2 deletions

View 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
};

View 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}})));

View 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\"");