diff --git a/src/type_determiner.cc b/src/type_determiner.cc index af0998e37b..9be841c6b6 100644 --- a/src/type_determiner.cc +++ b/src/type_determiner.cc @@ -686,7 +686,9 @@ ast::type::Type* TypeDeterminer::GetImportData( // Length returns a scalar of the same type as the parameter. return result_type->is_float_scalar() ? result_type : result_type->AsVector()->type(); - } else if (name == "atan2") { + } else if (name == "atan2" || name == "pow" || name == "fmin" || + name == "fmax" || name == "step" || name == "reflect" || + name == "nmin" || name == "nmax") { if (params.size() != 2) { error_ = "incorrect number of parameters for " + name + ". Expected 2 got " + std::to_string(params.size()); @@ -705,6 +707,20 @@ ast::type::Type* TypeDeterminer::GetImportData( if (name == "atan2") { *id = GLSLstd450Atan2; + } else if (name == "pow") { + *id = GLSLstd450Pow; + } else if (name == "fmin") { + *id = GLSLstd450FMin; + } else if (name == "fmax") { + *id = GLSLstd450FMax; + } else if (name == "step") { + *id = GLSLstd450Step; + } else if (name == "reflect") { + *id = GLSLstd450Reflect; + } else if (name == "nmin") { + *id = GLSLstd450NMin; + } else if (name == "nmax") { + *id = GLSLstd450NMax; } return params[0]->result_type(); diff --git a/src/type_determiner_test.cc b/src/type_determiner_test.cc index 0a2427d504..4190218f2d 100644 --- a/src/type_determiner_test.cc +++ b/src/type_determiner_test.cc @@ -1901,7 +1901,14 @@ TEST_P(ImportData_TwoParamTest, Error_TooManyParams) { INSTANTIATE_TEST_SUITE_P(TypeDeterminerTest, ImportData_TwoParamTest, - testing::Values(GLSLData{"atan2", GLSLstd450Atan2})); + testing::Values(GLSLData{"atan2", GLSLstd450Atan2}, + GLSLData{"pow", GLSLstd450Pow}, + GLSLData{"fmin", GLSLstd450FMin}, + GLSLData{"fmax", GLSLstd450FMax}, + GLSLData{"step", GLSLstd450Step}, + GLSLData{"reflect", GLSLstd450Reflect}, + GLSLData{"nmin", GLSLstd450NMin}, + GLSLData{"nmax", GLSLstd450NMax})); } // namespace } // namespace tint