[wgsl] Add more complete function calling support (#144)

* Add function calling support to wgsl frontend

* Fix external namespace with multiple namespaces

* changes after code review

* Don't re-tokenize std_namespace every time
This commit is contained in:
Lachlan Sneff authored and GitHub committed 2020-08-21 00:13:25 -04:00
1 parent 5035362ee6
commit 6026e57404
3 files changed
+127 -47

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import "GLSL.std.450" as std::glsl;
fn test_function(test: f32) -> f32 {
return test;
}
fn main_vert() -> void {
var foo: f32 = std::glsl::distance(0.0, 1.0);
var test: f32 = test_function(1.0);
}
entry_point vertex as "main" = main_vert;