diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc index 55b5098a50..91fb6dc5ee 100644 --- a/src/writer/glsl/generator_impl.cc +++ b/src/writer/glsl/generator_impl.cc @@ -1174,7 +1174,6 @@ std::string GeneratorImpl::generate_builtin_name( case sem::IntrinsicType::kAny: case sem::IntrinsicType::kAsin: case sem::IntrinsicType::kAtan: - case sem::IntrinsicType::kAtan2: case sem::IntrinsicType::kCeil: case sem::IntrinsicType::kClamp: case sem::IntrinsicType::kCos: @@ -1209,6 +1208,8 @@ std::string GeneratorImpl::generate_builtin_name( case sem::IntrinsicType::kTranspose: case sem::IntrinsicType::kTrunc: return intrinsic->str(); + case sem::IntrinsicType::kAtan2: + return "atan"; case sem::IntrinsicType::kCountOneBits: return "countbits"; case sem::IntrinsicType::kDpdx: diff --git a/src/writer/glsl/generator_impl_import_test.cc b/src/writer/glsl/generator_impl_import_test.cc index 6e6ee73a2f..9f4dddf9db 100644 --- a/src/writer/glsl/generator_impl_import_test.cc +++ b/src/writer/glsl/generator_impl_import_test.cc @@ -145,7 +145,7 @@ TEST_P(GlslImportData_DualParam_ScalarTest, Float) { } INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import, GlslImportData_DualParam_ScalarTest, - testing::Values(GlslImportData{"atan2", "atan2"}, + testing::Values(GlslImportData{"atan2", "atan"}, GlslImportData{"distance", "distance"}, GlslImportData{"max", "max"}, GlslImportData{"min", "min"}, @@ -169,7 +169,7 @@ TEST_P(GlslImportData_DualParam_VectorTest, Float) { } INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import, GlslImportData_DualParam_VectorTest, - testing::Values(GlslImportData{"atan2", "atan2"}, + testing::Values(GlslImportData{"atan2", "atan"}, GlslImportData{"cross", "cross"}, GlslImportData{"distance", "distance"}, GlslImportData{"max", "max"}, diff --git a/src/writer/glsl/generator_impl_intrinsic_test.cc b/src/writer/glsl/generator_impl_intrinsic_test.cc index fc8183be9c..35333de19a 100644 --- a/src/writer/glsl/generator_impl_intrinsic_test.cc +++ b/src/writer/glsl/generator_impl_intrinsic_test.cc @@ -192,7 +192,7 @@ INSTANTIATE_TEST_SUITE_P( IntrinsicData{IntrinsicType::kAny, ParamType::kBool, "any"}, IntrinsicData{IntrinsicType::kAsin, ParamType::kF32, "asin"}, IntrinsicData{IntrinsicType::kAtan, ParamType::kF32, "atan"}, - IntrinsicData{IntrinsicType::kAtan2, ParamType::kF32, "atan2"}, + IntrinsicData{IntrinsicType::kAtan2, ParamType::kF32, "atan"}, IntrinsicData{IntrinsicType::kCeil, ParamType::kF32, "ceil"}, IntrinsicData{IntrinsicType::kClamp, ParamType::kF32, "clamp"}, IntrinsicData{IntrinsicType::kClamp, ParamType::kU32, "clamp"},