mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
[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:
1 parent
5035362ee6
commit
6026e57404
3 files changed
+127
-47
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user