Files
wgpu/test-data/function.wgsl
Lachlan Sneff 6026e57404 [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
2020-08-21 00:13:25 -04:00

12 lines
253 B
WebGPU Shading Language

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;