mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-04 12:16:10 +00:00
Add GLSL Ceil support.
This CL adds Ceil support to the type determiner Bug: tint:5 Change-Id: Iba785dbea412cc94f9b0faa3e6d38f02453d5215 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19945 Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
d0f0edf8b6
commit
f1c7f0c779
@ -577,7 +577,7 @@ ast::type::Type* TypeDeterminer::GetImportData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (name == "round" || name == "roundeven" || name == "trunc" ||
|
if (name == "round" || name == "roundeven" || name == "trunc" ||
|
||||||
name == "fabs" || name == "fsign" || name == "floor") {
|
name == "fabs" || name == "fsign" || name == "floor" || name == "ceil") {
|
||||||
if (params.size() != 1) {
|
if (params.size() != 1) {
|
||||||
error_ = "incorrect number of parameters for " + name +
|
error_ = "incorrect number of parameters for " + name +
|
||||||
". Expected 1 got " + std::to_string(params.size());
|
". Expected 1 got " + std::to_string(params.size());
|
||||||
@ -601,6 +601,8 @@ ast::type::Type* TypeDeterminer::GetImportData(
|
|||||||
*id = GLSLstd450FSign;
|
*id = GLSLstd450FSign;
|
||||||
} else if (name == "floor") {
|
} else if (name == "floor") {
|
||||||
*id = GLSLstd450Floor;
|
*id = GLSLstd450Floor;
|
||||||
|
} else if (name == "ceil") {
|
||||||
|
*id = GLSLstd450Ceil;
|
||||||
}
|
}
|
||||||
|
|
||||||
return params[0]->result_type();
|
return params[0]->result_type();
|
||||||
|
@ -1593,7 +1593,8 @@ INSTANTIATE_TEST_SUITE_P(TypeDeterminerTest,
|
|||||||
GLSLData{"trunc", GLSLstd450Trunc},
|
GLSLData{"trunc", GLSLstd450Trunc},
|
||||||
GLSLData{"fabs", GLSLstd450FAbs},
|
GLSLData{"fabs", GLSLstd450FAbs},
|
||||||
GLSLData{"fsign", GLSLstd450FSign},
|
GLSLData{"fsign", GLSLstd450FSign},
|
||||||
GLSLData{"floor", GLSLstd450Floor}));
|
GLSLData{"floor", GLSLstd450Floor},
|
||||||
|
GLSLData{"ceil", GLSLstd450Ceil}));
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace tint
|
} // namespace tint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user