From f4329f57e57f80cdbf5298cbe803a8e87ea7d837 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 4 Feb 2021 16:22:50 +0000 Subject: [PATCH] spirv-reader: GLSLStd450RoundEven maps to round This is from the resolution to https://github.com/gpuweb/gpuweb/issues/1381 Bug: tint:3 Change-Id: If4158d8ff3bffce0e82d2230e5df5650193e7541 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40180 Auto-Submit: David Neto Commit-Queue: dan sinclair Reviewed-by: dan sinclair --- src/reader/spirv/function.cc | 2 +- src/reader/spirv/function_glsl_std_450_test.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc index 89e6c65c11..2a55512dff 100644 --- a/src/reader/spirv/function.cc +++ b/src/reader/spirv/function.cc @@ -407,6 +407,7 @@ std::string GetGlslStd450FuncName(uint32_t ext_opcode) { case GLSLstd450Reflect: return "reflect"; case GLSLstd450Round: + case GLSLstd450RoundEven: return "round"; case GLSLstd450Sin: return "sin"; @@ -428,7 +429,6 @@ std::string GetGlslStd450FuncName(uint32_t ext_opcode) { default: // TODO(dneto) - The following are not implemented. // They are grouped semantically, as in GLSL.std.450.h. - case GLSLstd450RoundEven: case GLSLstd450SSign: case GLSLstd450Radians: diff --git a/src/reader/spirv/function_glsl_std_450_test.cc b/src/reader/spirv/function_glsl_std_450_test.cc index 650d399e9c..b876e9a8fb 100644 --- a/src/reader/spirv/function_glsl_std_450_test.cc +++ b/src/reader/spirv/function_glsl_std_450_test.cc @@ -688,6 +688,7 @@ INSTANTIATE_TEST_SUITE_P(Samples, {"Log2", "log2"}, {"Normalize", "normalize"}, {"Round", "round"}, + {"RoundEven", "round"}, {"Sin", "sin"}, {"Sinh", "sinh"}, {"Sqrt", "sqrt"},