-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wgsl: Fix typo for texel format rgba16float (#779)
Add tests for predeclared types, type-generators, texel formats.
- Loading branch information
Showing
23 changed files
with
1,414 additions
and
3 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
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,5 @@ | ||
alias a=ptr<function,i32>; | ||
alias b=ptr<private,i32>; | ||
alias c=ptr<workgroup,i32>; | ||
alias d=ptr<uniform,i32>; | ||
alias e=ptr<storage,i32>; |
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,62 @@ | ||
[ | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"a"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"ptr"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"function"}, | ||
{"type":"Punctuation","value":","}, | ||
{"type":"NameBuiltin","value":"i32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"b"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"ptr"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"private"}, | ||
{"type":"Punctuation","value":","}, | ||
{"type":"NameBuiltin","value":"i32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"c"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"ptr"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"workgroup"}, | ||
{"type":"Punctuation","value":","}, | ||
{"type":"NameBuiltin","value":"i32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"d"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"ptr"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"uniform"}, | ||
{"type":"Punctuation","value":","}, | ||
{"type":"NameBuiltin","value":"i32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"e"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"ptr"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"storage"}, | ||
{"type":"Punctuation","value":","}, | ||
{"type":"NameBuiltin","value":"i32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"} | ||
] |
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,4 @@ | ||
alias boolean=bool; | ||
alias bvec2=vec2<bool>; | ||
alias bvec3=vec3<bool>; | ||
alias bvec4=vec4<bool>; |
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,39 @@ | ||
[ | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"boolean"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"bool"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"bvec2"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"vec2"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"bool"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"bvec3"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"vec3"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"bool"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"alias"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"Name","value":"bvec4"}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"NameBuiltin","value":"vec4"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"bool"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"} | ||
] |
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,5 @@ | ||
@group(0) @binding(1) var texture_depth_2d; | ||
@group(0) @binding(2) var texture_depth_2d_array; | ||
@group(0) @binding(4) var texture_depth_cube; | ||
@group(0) @binding(5) var texture_depth_cube_array; | ||
@group(0) @binding(5) var texture_depth_multisampled_2d; |
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,77 @@ | ||
[ | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"1"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_depth_2d"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"2"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_depth_2d_array"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"4"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_depth_cube"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"5"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_depth_cube_array"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"5"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_depth_multisampled_2d"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"} | ||
] |
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 @@ | ||
@group(0) @binding(5) var texture_external; |
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,17 @@ | ||
[ | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"5"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_external"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"} | ||
] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// this is a line-ending comment | ||
//* embed a bock comment start, after gap of space | ||
//* embed a bock comment start, after a space | ||
// /* embed a bock comment start, v2 |
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
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 @@ | ||
@group(0) @binding(5) var texture_multisampled_2d<f32>; |
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,20 @@ | ||
[ | ||
{"type":"NameDecorator","value":"@group"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"0"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameDecorator","value":"@binding"}, | ||
{"type":"Punctuation","value":"("}, | ||
{"type":"LiteralNumberInteger","value":"5"}, | ||
{"type":"Punctuation","value":")"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"KeywordDeclaration","value":"var"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"texture_multisampled_2d"}, | ||
{"type":"Operator","value":"\u003c"}, | ||
{"type":"NameBuiltin","value":"f32"}, | ||
{"type":"Operator","value":"\u003e"}, | ||
{"type":"Punctuation","value":";"}, | ||
{"type":"TextWhitespace","value":"\n"} | ||
] |
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,62 @@ | ||
enable f16; | ||
alias int=i32; | ||
alias uint=u32; | ||
alias float=f32; | ||
alias half=f16; | ||
alias ivec2=vec2i; | ||
alias uvec2=vec2u; | ||
alias vec2=vec2f; | ||
alias ivec3=vec3i; | ||
alias uvec3=vec3u; | ||
alias vec3=vec3f; | ||
alias ivec4=vec4i; | ||
alias uvec4=vec4u; | ||
alias ivec2_=vec2<i32>; | ||
alias uvec2_=vec2<u32>; | ||
alias vec2_=vec2<f32>; | ||
alias ivec3_=vec3<i32>; | ||
alias uvec3_=vec3<u32>; | ||
alias vec3_=vec3<f32>; | ||
alias ivec4_=vec4<i32>; | ||
alias uvec4_=vec4<u32>; | ||
alias vec4_=vec4<f32>; | ||
alias hvec2=vec2h; | ||
alias hvec3=vec3h; | ||
alias hvec4=vec4h; | ||
alias hvec4_=vec4<f16>; | ||
alias m22=mat2x2f; | ||
alias m23=mat2x3f; | ||
alias m24=mat2x4f; | ||
alias m32=mat3x2f; | ||
alias m33=mat3x3f; | ||
alias m34=mat3x4f; | ||
alias m42=mat4x2f; | ||
alias m43=mat4x3f; | ||
alias m44=mat4x4f; | ||
alias m22_=mat2x2<f32>; | ||
alias m23_=mat2x3<f32>; | ||
alias m24_=mat2x4<f32>; | ||
alias m32_=mat3x2<f32>; | ||
alias m33_=mat3x3<f32>; | ||
alias m34_=mat3x4<f32>; | ||
alias m42_=mat4x2<f32>; | ||
alias m43_=mat4x3<f32>; | ||
alias m44_=mat4x4<f32>; | ||
alias m22=mat2x2h; | ||
alias m23=mat2x3h; | ||
alias h24=mat2x4h; | ||
alias h32=mat3x2h; | ||
alias h33=mat3x3h; | ||
alias h34=mat3x4h; | ||
alias h42=mat4x2h; | ||
alias h43=mat4x3h; | ||
alias h44=mat4x4h; | ||
alias h22_=mat2x2<f16>; | ||
alias h23_=mat2x3<f16>; | ||
alias h24_=mat2x4<f16>; | ||
alias h32_=mat3x2<f16>; | ||
alias h33_=mat3x3<f16>; | ||
alias h34_=mat3x4<f16>; | ||
alias h42_=mat4x2<f16>; | ||
alias h43_=mat4x3<f16>; | ||
alias h44_=mat4x4<f16>; |
Oops, something went wrong.