[tint] Avoid redundant SingleEntryPoint transform
Passing empty string to the generate function will avoid having Tint
also try to do the SingleEntryPoint transform a second time.
Bug:356424898
Change-Id: I41652215668863bd6204a1322e1b9a7684b8fbd4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/202894
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Peter McNeeley <petermcneeley@google.com>
diff --git a/src/dawn/native/opengl/ShaderModuleGL.cpp b/src/dawn/native/opengl/ShaderModuleGL.cpp
index 63f7e80..cb2c1d0 100644
--- a/src/dawn/native/opengl/ShaderModuleGL.cpp
+++ b/src/dawn/native/opengl/ShaderModuleGL.cpp
@@ -568,6 +568,11 @@
/* fullSubgroups */ {}));
}
+ // Intentionally assign entry point to empty to avoid a redundant 'SingleEntryPoint'
+ // transform in Tint.
+ // TODO(crbug.com/356424898): In the long run, we want to move SingleEntryPoint to Tint,
+ // but that has interactions with SubstituteOverrides which need to be handled first.
+ remappedEntryPoint = "";
auto result = tint::glsl::writer::Generate(program, r.tintOptions, remappedEntryPoint);
DAWN_INVALID_IF(result != tint::Success, "An error occurred while generating GLSL:\n%s",
result.Failure().reason.Str());