diag: Add System enumerator to all diagnostics
Describes what Tint system raised the diagnostic.
Use this information in the fuzzers to distinguish between expected and unexpected failure cases in the Transform fuzzer tests.
Fixed: chromium:1206407
Fixed: chromium:1207154
Change-Id: I3b807acafe384a2fc363d2a4165a29693450b3cf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55254
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/src/transform/external_texture_transform.cc b/src/transform/external_texture_transform.cc
index 81e4fab..4d48ff7 100644
--- a/src/transform/external_texture_transform.cc
+++ b/src/transform/external_texture_transform.cc
@@ -58,7 +58,7 @@
->Is<sem::ExternalTexture>()) {
if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad &&
call_expr->params().size() != 2) {
- TINT_ICE(ctx.dst->Diagnostics())
+ TINT_ICE(Transform, ctx.dst->Diagnostics())
<< "expected textureLoad call with a texture_external to "
"have 2 parameters, found "
<< call_expr->params().size() << " parameters";
@@ -67,7 +67,7 @@
if (intrinsic->Type() ==
sem::IntrinsicType::kTextureSampleLevel &&
call_expr->params().size() != 3) {
- TINT_ICE(ctx.dst->Diagnostics())
+ TINT_ICE(Transform, ctx.dst->Diagnostics())
<< "expected textureSampleLevel call with a "
"texture_external to have 3 parameters, found "
<< call_expr->params().size() << " parameters";