commit | 96a96697192cf8bf59979ef8060e0a975c618596 | [log] [tgz] |
---|---|---|
author | James Price <jrprice@google.com> | Wed Jul 05 00:30:56 2023 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 05 00:30:56 2023 +0000 |
tree | 3a270f45a6c40f75fec18d647c4eca4068bacaf8 | |
parent | 9b9a8ab49801cf8811ec88dd652717491a284305 [diff] [blame] |
[tint] Fold trivial lets in SPIR-V reader This significantly reduces the amount of let declarations that are generated when converting SPIR-V to WGSL. The resulting WGSL is much smaller and more readable, and faster to parse and process. A few SPIR-V E2E test inputs were changed as they were generating invalid constant expressions after inlining. Change-Id: I1bebf37f6c877e0e0e905f83709503d32b441699 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/140040 Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.dxc.hlsl b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.dxc.hlsl index 4025850..27509c8 100644 --- a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.dxc.hlsl +++ b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.dxc.hlsl
@@ -6,8 +6,7 @@ void main_1() { int i = 0; - const int x_15 = V.i; - i = x_15; + i = V.i; return; }