-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: sagudev <[email protected]>
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const ga = 4; // AbstractInt with a value of 4. | ||
const gb: i32 = 4; // i32 with a value of 4. | ||
const ge = vec3(ga, gb, ga); | ||
|
||
fn const_in_fn(arg: f32) { | ||
let _abba = 5; | ||
const a = 4; // AbstractInt with a value of 4. | ||
const b: i32 = 4; // i32 with a value of 4. | ||
const c: u32 = 4u; // u32 with a value of 4. | ||
const d: f32 = 4.; // f32 with a value of 4. | ||
const e = vec3(a, b, a); // vec3 of AbstractInt with a value of (4, 4, 4). | ||
const f = 2.0; // AbstractFloat with a value of 2. | ||
// TODO: Make it per spec: https://gpuweb.github.io/gpuweb/wgsl/#const-decls | ||
// currently not possible because naga does not support automatic conversions of Abstract types | ||
|
||
//const fa = arg; | ||
} | ||
|
||
// TODO: Test for scopes (shadowing?), globals. |