Add refract intrinsic

See: https://github.com/gpuweb/gpuweb/pull/1901

Bug: tint:950
Change-Id: I6f00ab753a2ddf2374352ddf636e1abfebe86ba7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56777
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-07-05 16:47:37 +00:00
committed by Tint LUCI CQ
parent 892aaf377f
commit b0455217fa
23 changed files with 1984 additions and 1391 deletions

View File

@@ -193,6 +193,9 @@ IntrinsicType ParseIntrinsicType(const std::string& name) {
if (name == "reflect") {
return IntrinsicType::kReflect;
}
if (name == "refract") {
return IntrinsicType::kRefract;
}
if (name == "reverseBits") {
return IntrinsicType::kReverseBits;
}
@@ -436,6 +439,8 @@ const char* str(IntrinsicType i) {
return "pow";
case IntrinsicType::kReflect:
return "reflect";
case IntrinsicType::kRefract:
return "refract";
case IntrinsicType::kReverseBits:
return "reverseBits";
case IntrinsicType::kRound:

View File

@@ -88,6 +88,7 @@ enum class IntrinsicType {
kPack4x8unorm,
kPow,
kReflect,
kRefract,
kReverseBits,
kRound,
kSelect,