single_entry_point: Retain applied transforms

This transform does not use the top-level ctx.Clone() method, so we
need to manually copy the applied transforms over to the destination
program.

This fixes the GLSL backend, where this transform was dropping the
applied transforms and breaking a required transform dependency later
in the chain.

Change-Id: I3db688fe35dfbe67468b9941f739cb2ecf3a843b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/72220
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
James Price 2021-12-09 09:18:44 +00:00 committed by Tint LUCI CQ
parent a8c202b8e7
commit 0fe30b52a5
1 changed files with 5 additions and 0 deletions

View File

@ -105,6 +105,11 @@ void SingleEntryPoint::Run(CloneContext& ctx, const DataMap& inputs, DataMap&) {
// Clone the entry point.
ctx.dst->AST().AddFunction(ctx.Clone(entry_point));
// Retain the list of applied transforms.
// We need to do this manually since we are not going to use the top-level
// ctx.Clone() function.
ctx.dst->SetTransformApplied(ctx.src->TransformsApplied());
}
SingleEntryPoint::Config::Config(std::string entry_point)