commit | 2bb45389b73c97406317b36f85df5a27f2ea822b | [log] [tgz] |
---|---|---|
author | Ben Clayton <bclayton@google.com> | Fri Jul 02 19:27:42 2021 +0000 |
committer | Ben Clayton <bclayton@google.com> | Fri Jul 02 19:27:42 2021 +0000 |
tree | 5a61c82a5148031c1640ff2a207e5cf3c2cd0cbf | |
parent | efc46c18738d66672872920fadb7f3e3384c1492 [diff] [blame] |
writer/hlsl: Zero initialize with (T) 0 For structures and arrays. This behaves identically to the per-element zero-initialization, but can be significantly less verbose. Change-Id: I380ef86f16c2b3f37a9de2820e707f368955b761 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56764 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/test/expressions/zero_init/struct/array.wgsl.expected.hlsl b/test/expressions/zero_init/struct/array.wgsl.expected.hlsl index 6bb77c6..c514b14 100644 --- a/test/expressions/zero_init/struct/array.wgsl.expected.hlsl +++ b/test/expressions/zero_init/struct/array.wgsl.expected.hlsl
@@ -11,5 +11,5 @@ }; void f() { - S v = {{{0.0f, 0.0f, 0.0f, 0.0f}}}; + S v = (S)0; }