Add GLSL Fract support.
This CL adds Fract into the type determiner. Bug: tint:5 Change-Id: I616d3259ca903b82339f49317f27966265c3f1d5 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19946 Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
f1c7f0c779
commit
7b55da5f80
|
@ -577,7 +577,8 @@ ast::type::Type* TypeDeterminer::GetImportData(
|
|||
}
|
||||
|
||||
if (name == "round" || name == "roundeven" || name == "trunc" ||
|
||||
name == "fabs" || name == "fsign" || name == "floor" || name == "ceil") {
|
||||
name == "fabs" || name == "fsign" || name == "floor" || name == "ceil" ||
|
||||
name == "fract") {
|
||||
if (params.size() != 1) {
|
||||
error_ = "incorrect number of parameters for " + name +
|
||||
". Expected 1 got " + std::to_string(params.size());
|
||||
|
@ -603,6 +604,8 @@ ast::type::Type* TypeDeterminer::GetImportData(
|
|||
*id = GLSLstd450Floor;
|
||||
} else if (name == "ceil") {
|
||||
*id = GLSLstd450Ceil;
|
||||
} else if (name == "fract") {
|
||||
*id = GLSLstd450Fract;
|
||||
}
|
||||
|
||||
return params[0]->result_type();
|
||||
|
|
|
@ -1594,7 +1594,8 @@ INSTANTIATE_TEST_SUITE_P(TypeDeterminerTest,
|
|||
GLSLData{"fabs", GLSLstd450FAbs},
|
||||
GLSLData{"fsign", GLSLstd450FSign},
|
||||
GLSLData{"floor", GLSLstd450Floor},
|
||||
GLSLData{"ceil", GLSLstd450Ceil}));
|
||||
GLSLData{"ceil", GLSLstd450Ceil},
|
||||
GLSLData{"fract", GLSLstd450Fract}));
|
||||
|
||||
} // namespace
|
||||
} // namespace tint
|
||||
|
|
Loading…
Reference in New Issue