mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
reader/spirv: Always run the cleanup transforms
The SPIR-V cleanup transforms were only being run if the DecomposeStridedMatrix transform needed to be run - despite the RemoveUnreachableStatements transform needing to be run, always. Change-Id: I5dc28a79200ab67c96fb793980412a5632e26026 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78780 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
f67b6373a6
commit
5416d9ba2a
@@ -50,18 +50,12 @@ Program Parse(const std::vector<uint32_t>& input) {
|
||||
return program;
|
||||
}
|
||||
|
||||
// If the generated program contains matrices with a custom MatrixStride
|
||||
// attribute then we need to decompose these into an array of vectors
|
||||
if (transform::DecomposeStridedMatrix().ShouldRun(&program)) {
|
||||
transform::Manager manager;
|
||||
manager.Add<transform::Unshadow>();
|
||||
manager.Add<transform::SimplifyPointers>();
|
||||
manager.Add<transform::DecomposeStridedMatrix>();
|
||||
manager.Add<transform::RemoveUnreachableStatements>();
|
||||
return manager.Run(&program).program;
|
||||
}
|
||||
|
||||
return program;
|
||||
transform::Manager manager;
|
||||
manager.Add<transform::Unshadow>();
|
||||
manager.Add<transform::SimplifyPointers>();
|
||||
manager.Add<transform::DecomposeStridedMatrix>();
|
||||
manager.Add<transform::RemoveUnreachableStatements>();
|
||||
return manager.Run(&program).program;
|
||||
}
|
||||
|
||||
} // namespace spirv
|
||||
|
||||
Reference in New Issue
Block a user