From e534fe8246273a6b213fc712c5d0d4a95b29a99c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 9 Aug 2020 23:33:56 +0900 Subject: [PATCH] shader: Add more tests using a for-loop --- internal/shader/testdata/for4.expected.vs | 3 +++ internal/shader/testdata/for4.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/internal/shader/testdata/for4.expected.vs b/internal/shader/testdata/for4.expected.vs index 1dfb5aee1..0d489c79b 100644 --- a/internal/shader/testdata/for4.expected.vs +++ b/internal/shader/testdata/for4.expected.vs @@ -8,6 +8,7 @@ void F0(in int l0, out int l1) { void F1(out int l0) { int l1 = 0; + int l3 = 0; l1 = 0; for (int l2 = 0; l2 < 10; l2++) { int l3 = 0; @@ -16,6 +17,8 @@ void F1(out int l0) { l4 = l3; l1 = (l1) + (l4); } + l3 = 0; + l1 = (l1) + (l3); l0 = l1; return; } diff --git a/internal/shader/testdata/for4.go b/internal/shader/testdata/for4.go index e5ae24670..cf2f6c2ad 100644 --- a/internal/shader/testdata/for4.go +++ b/internal/shader/testdata/for4.go @@ -10,5 +10,7 @@ func Foo() int { x := Ident(i) sum += x } + y := 0 + sum += y return sum }