shader: Add more tests using a for-loop

This commit is contained in:
Hajime Hoshi 2020-08-09 23:33:56 +09:00
parent 5d2606b6a5
commit e534fe8246
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -10,5 +10,7 @@ func Foo() int {
x := Ident(i)
sum += x
}
y := 0
sum += y
return sum
}