1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

wgsl: Fix typo for texel format rgba16float (#779)

Add tests for predeclared types, type-generators, texel formats.
This commit is contained in:
David Neto 2023-03-28 16:18:56 -04:00 committed by GitHub
parent 8588e37b62
commit dcc587e978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 1414 additions and 3 deletions

View File

@ -29,7 +29,7 @@
<rule pattern="(var|let|const|override)\b"><token type="KeywordDeclaration"/></rule>
<rule pattern="(alias|break|case|const_assert|continue|continuing|default|diagnostic|discard|else|enable|false|fn|for|if|loop|requires|return|struct|switch|true|while)\b"><token type="Keyword"/></rule>
<rule pattern="(NULL|Self|abstract|active|alignas|alignof|as|asm|asm_fragment|async|attribute|auto|await|become|binding_array|cast|catch|class|co_await|co_return|co_yield|coherent|column_major|common|compile|compile_fragment|concept|const_cast|consteval|constexpr|constinit|crate|debugger|decltype|delete|demote|demote_to_helper|do|dynamic_cast|enum|explicit|export|extends|extern|external|fallthrough|filter|final|finally|friend|from|fxgroup|get|goto|groupshared|highp|impl|implements|import|inline|instanceof|interface|layout|lowp|macro|macro_rules|match|mediump|meta|mod|module|move|mut|mutable|namespace|new|nil|noexcept|noinline|nointerpolation|noperspective|null|nullptr|of|operator|package|packoffset|partition|pass|patch|pixelfragment|precise|precision|premerge|priv|protected|pub|public|readonly|ref|regardless|register|reinterpret_cast|require|resource|restrict|self|set|shared|sizeof|smooth|snorm|static|static_assert|static_cast|std|subroutine|super|target|template|this|thread_local|throw|trait|try|type|typedef|typeid|typename|typeof|union|unless|unorm|unsafe|unsized|use|using|varying|virtual|volatile|wgsl|where|with|writeonly|yield)\b"><token type="KeywordReserved"/></rule>
<rule pattern="(read|write|read_write|function|private|workgroup|uniform|storage|perspective|linear|flat|center|centroid|sample|vertex_index|instance_index|position|front_facing|frag_depth|local_invocation_id|local_invocation_index|global_invocation_id|workgroup_id|num_workgroups|sample_index|sample_mask|rgba8unorm|rgba8snorm|rgba8uint|rgba8sint|rgba16uint|rgba16sint|rgba16flot|r32uint|r32sint|r32float|rg32uint|rg32sint|rg32float|rgba32uint|rgba32sint|rgba32float|bgra8unorm)\b"><token type="NameBuiltin"/></rule>
<rule pattern="(read|write|read_write|function|private|workgroup|uniform|storage|perspective|linear|flat|center|centroid|sample|vertex_index|instance_index|position|front_facing|frag_depth|local_invocation_id|local_invocation_index|global_invocation_id|workgroup_id|num_workgroups|sample_index|sample_mask|rgba8unorm|rgba8snorm|rgba8uint|rgba8sint|rgba16uint|rgba16sint|rgba16float|r32uint|r32sint|r32float|rg32uint|rg32sint|rg32float|rgba32uint|rgba32sint|rgba32float|bgra8unorm)\b"><token type="NameBuiltin"/></rule>
<rule pattern="(bool|f16|f32|i32|sampler|sampler_comparison|texture_depth_2d|texture_depth_2d_array|texture_depth_cube|texture_depth_cube_array|texture_depth_multisampled_2d|texture_external|texture_external|u32)\b"><token type="NameBuiltin"/></rule>
<rule pattern="(array|atomic|mat2x2|mat2x3|mat2x4|mat3x2|mat3x3|mat3x4|mat4x2|mat4x3|mat4x4|ptr|texture_1d|texture_2d|texture_2d_array|texture_3d|texture_cube|texture_cube_array|texture_multisampled_2d|texture_storage_1d|texture_storage_2d|texture_storage_2d_array|texture_storage_3d|vec2|vec3|vec4)\b"><token type="NameBuiltin"/></rule>
<rule pattern="(vec2i|vec3i|vec4i|vec2u|vec3u|vec4u|vec2f|vec3f|vec4f|vec2h|vec3h|vec4h)\b"><token type="NameBuiltin"/></rule>

View File

@ -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>;

View File

@ -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"}
]

View File

@ -0,0 +1,4 @@
alias boolean=bool;
alias bvec2=vec2<bool>;
alias bvec3=vec3<bool>;
alias bvec4=vec4<bool>;

View File

@ -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"}
]

View File

@ -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;

View File

@ -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"}
]

View File

@ -0,0 +1 @@
@group(0) @binding(5) var texture_external;

View File

@ -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"}
]

View File

@ -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

View File

@ -2,5 +2,5 @@
{"type":"TextWhitespace","value":" "},
{"type":"CommentSingle","value":"// this is a line-ending comment\n"},
{"type":"TextWhitespace","value":" "},
{"type":"CommentSingle","value":"//* embed a bock comment start, after gap of space\n// /* embed a bock comment start, v2\n"}
{"type":"CommentSingle","value":"//* embed a bock comment start, after a space\n// /* embed a bock comment start, v2\n"}
]

View File

@ -0,0 +1 @@
@group(0) @binding(5) var texture_multisampled_2d<f32>;

View File

@ -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"}
]

View File

@ -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>;

View File

@ -0,0 +1,518 @@
[
{"type":"Keyword","value":"enable"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"f16"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"int"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"i32"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"uint"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"u32"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"float"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"f32"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"half"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"f16"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec2"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"uvec2"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"vec2"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec3"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"uvec3"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"vec3"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec4"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4i"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"uvec4"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4u"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec2_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2"},
{"type":"Operator","value":"\u003c"},
{"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":"uvec2_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"u32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"vec2_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec3_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3"},
{"type":"Operator","value":"\u003c"},
{"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":"uvec3_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"u32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"vec3_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"ivec4_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4"},
{"type":"Operator","value":"\u003c"},
{"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":"uvec4_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"u32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"vec4_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hvec2"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec2h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hvec3"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec3h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hvec4"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"hvec4_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"vec4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m22"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x2f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m23"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x3f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m24"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x4f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m32"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x2f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m33"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x3f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m34"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x4f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m42"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x2f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m43"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x3f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m44"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x4f"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m22_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m23_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m24_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m32_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m33_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m34_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m42_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m43_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m44_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m22"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x2h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"m23"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x3h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h24"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x4h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h32"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x2h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h33"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x3h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h34"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x4h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h42"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x2h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h43"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x3h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h44"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x4h"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h22_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h23_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h24_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat2x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h32_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h33_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h34_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat3x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h42_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x2"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h43_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x3"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"h44_"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"mat4x4"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f16"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]

View File

@ -0,0 +1,6 @@
@group(0) @binding(0) var texture_1d<f32>;
@group(0) @binding(1) var texture_2d<f32>;
@group(0) @binding(2) var texture_2d_array<f32>;
@group(0) @binding(3) var texture_3d<f32>;
@group(0) @binding(4) var texture_cube<f32>;
@group(0) @binding(5) var texture_cube_array<f32>;

View File

@ -0,0 +1,110 @@
[
{"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":"0"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_1d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"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":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"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_2d_array"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"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":"3"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_3d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"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_cube"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"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_cube_array"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]

View File

@ -0,0 +1,4 @@
@group(0) @binding(0) var texture_storage_1d<rgba8unorm,write>;
@group(0) @binding(1) var texture_storage_2d<rgba8unorm,write>;
@group(0) @binding(2) var texture_storage_2d_array<rgba8unorm,write>;
@group(0) @binding(3) var texture_storage_3d<rgba8unorm,write>;

View File

@ -0,0 +1,82 @@
[
{"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":"0"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_1d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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_storage_2d_array"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"3"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_3d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]

View File

@ -0,0 +1,17 @@
@group(0) @binding(0) var texture_storage_2d<rgba8unorm,write>;
@group(0) @binding(1) var texture_storage_2d<rgba8snorm,write>;
@group(0) @binding(2) var texture_storage_2d<rgba8uint,write>;
@group(0) @binding(3) var texture_storage_2d<rgba8sint,write>;
@group(0) @binding(4) var texture_storage_2d<rgba16uint,write>;
@group(0) @binding(5) var texture_storage_2d<rgba16sint,write>;
@group(0) @binding(6) var texture_storage_2d<rgba16float,write>;
@group(0) @binding(7) var texture_storage_2d<r32uint,write>;
@group(0) @binding(8) var texture_storage_2d<r32sint,write>;
@group(0) @binding(9) var texture_storage_2d<r32float,write>;
@group(1) @binding(0) var texture_storage_2d<rg32uint,write>;
@group(1) @binding(1) var texture_storage_2d<rg32sint,write>;
@group(1) @binding(2) var texture_storage_2d<rg32float,write>;
@group(1) @binding(3) var texture_storage_2d<rgba32uint,write>;
@group(1) @binding(4) var texture_storage_2d<rgba32sint,write>;
@group(1) @binding(5) var texture_storage_2d<rgba32float,write>;
@group(1) @binding(6) var texture_storage_2d<bgra8unorm,write>;

View File

@ -0,0 +1,342 @@
[
{"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":"0"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8snorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8uint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"3"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba8sint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba16uint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba16sint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"6"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba16float"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"7"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"r32uint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"8"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"r32sint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"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":"9"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"r32float"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@binding"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"0"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rg32uint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rg32sint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rg32float"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@binding"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"3"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba32uint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba32sint"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"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_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"rgba32float"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"},
{"type":"NameDecorator","value":"@group"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@binding"},
{"type":"Punctuation","value":"("},
{"type":"LiteralNumberInteger","value":"6"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"var"},
{"type":"TextWhitespace","value":" "},
{"type":"NameBuiltin","value":"texture_storage_2d"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"bgra8unorm"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"write"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]

View File

@ -0,0 +1,4 @@
// Test predeclared type generators, other than vector, matrix, and texture.
alias a=array<f32>;
alias b=atomic<i32>;
alias c=ptr<function,i32>;

View File

@ -0,0 +1,35 @@
[
{"type":"CommentSingle","value":"// Test predeclared type generators, other than vector, matrix, and texture.\n"},
{"type":"Keyword","value":"alias"},
{"type":"TextWhitespace","value":" "},
{"type":"Name","value":"a"},
{"type":"Operator","value":"="},
{"type":"NameBuiltin","value":"array"},
{"type":"Operator","value":"\u003c"},
{"type":"NameBuiltin","value":"f32"},
{"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":"atomic"},
{"type":"Operator","value":"\u003c"},
{"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":"function"},
{"type":"Punctuation","value":","},
{"type":"NameBuiltin","value":"i32"},
{"type":"Operator","value":"\u003e"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n"}
]