internal/shader: add test files

Updates #2011
This commit is contained in:
Hajime Hoshi 2022-03-10 01:02:48 +09:00
parent de05ede27e
commit d3b72d4ef9
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,12 @@
void F0(out float l0);
void F1(out int l0);
void F0(out float l0) {
l0 = 1.0;
return;
}
void F1(out int l0) {
l0 = 2;
return;
}

13
internal/shader/testdata/issue2011.go vendored Normal file
View File

@ -0,0 +1,13 @@
package main
const F = float(1)
func Foo() float {
return F
}
const I = int(2.0)
func Bar() int {
return I
}