mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
shader: Add more tests about 'for' loops
This commit is contained in:
parent
dee8690502
commit
5dc0d4e1a4
20
internal/shader/testdata/for3.expected.vs
vendored
Normal file
20
internal/shader/testdata/for3.expected.vs
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
void F0(out vec2 l0);
|
||||
|
||||
void F0(out vec2 l0) {
|
||||
vec2 l1 = vec2(0);
|
||||
vec2 l3 = vec2(0);
|
||||
l1 = vec2(0.0);
|
||||
for (int l2 = 0; l2 < 100; l2++) {
|
||||
vec2 l5 = vec2(0);
|
||||
l3 = vec2(0.0);
|
||||
l1 = l3;
|
||||
}
|
||||
l3 = vec2(0.0);
|
||||
for (int l4 = 0; l4 < 100; l4++) {
|
||||
vec2 l5 = vec2(0);
|
||||
l5 = vec2(0.0);
|
||||
l3 = l5;
|
||||
}
|
||||
l0 = l1;
|
||||
return;
|
||||
}
|
15
internal/shader/testdata/for3.go
vendored
Normal file
15
internal/shader/testdata/for3.go
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
func Foo() vec2 {
|
||||
v := vec2(0)
|
||||
for i := 0; i < 100; i++ {
|
||||
v2 := vec2(0)
|
||||
v = v2
|
||||
}
|
||||
v3 := vec2(0)
|
||||
for i := 0; i < 100; i++ {
|
||||
v4 := vec2(0)
|
||||
v3 = v4
|
||||
}
|
||||
return v
|
||||
}
|
Loading…
Reference in New Issue
Block a user