@@ -1651,6 +1651,22 @@ constexpr NumberMatcher kReadWriteMatcher {
16511651 }
16521652};
16531653
1654+ /// EnumMatcher for 'match readable'
1655+ constexpr NumberMatcher kReadableMatcher {
1656+ /* match */ [](MatchState&, Number number) -> Number {
1657+ switch (static_cast<Access>(number.Value())) {
1658+ case Access::kRead:
1659+ case Access::kReadWrite:
1660+ return number;
1661+ default:
1662+ return Number::invalid;
1663+ }
1664+ },
1665+ /* string */ [](MatchState*) -> std::string {
1666+ return "read or read_write";
1667+ }
1668+ };
1669+
16541670/// EnumMatcher for 'match writable'
16551671constexpr NumberMatcher kWritableMatcher {
16561672/* match */ [](MatchState&, Number number) -> Number {
@@ -1815,11 +1831,12 @@ constexpr NumberMatcher kNumberMatchers[] = {
18151831 /* [5] */ kU32TexelFormatMatcher,
18161832 /* [6] */ kWriteMatcher,
18171833 /* [7] */ kReadWriteMatcher,
1818- /* [8] */ kWritableMatcher,
1819- /* [9] */ kFunctionPrivateWorkgroupMatcher,
1820- /* [10] */ kWorkgroupOrStorageMatcher,
1821- /* [11] */ kStorageMatcher,
1822- /* [12] */ kWorkgroupMatcher,
1834+ /* [8] */ kReadableMatcher,
1835+ /* [9] */ kWritableMatcher,
1836+ /* [10] */ kFunctionPrivateWorkgroupMatcher,
1837+ /* [11] */ kWorkgroupOrStorageMatcher,
1838+ /* [12] */ kStorageMatcher,
1839+ /* [13] */ kWorkgroupMatcher,
18231840};
18241841
18251842constexpr TypeMatcherIndex kTypeMatcherIndices[] = {
@@ -2003,26 +2020,26 @@ static_assert(TypeMatcherIndex::CanIndex(kTypeMatcherIndices),
20032020 "TypeMatcherIndex is not large enough to index kTypeMatcherIndices");
20042021
20052022constexpr NumberMatcherIndex kNumberMatcherIndices[] = {
2006- /* [0] */ NumberMatcherIndex(11 ),
2023+ /* [0] */ NumberMatcherIndex(12 ),
20072024 /* [1] */ NumberMatcherIndex(0),
20082025 /* [2] */ NumberMatcherIndex(0),
20092026 /* [3] */ NumberMatcherIndex(1),
20102027 /* [4] */ NumberMatcherIndex(0),
20112028 /* [5] */ NumberMatcherIndex(7),
2012- /* [6] */ NumberMatcherIndex(12 ),
2029+ /* [6] */ NumberMatcherIndex(13 ),
20132030 /* [7] */ NumberMatcherIndex(7),
20142031 /* [8] */ NumberMatcherIndex(3),
2015- /* [9] */ NumberMatcherIndex(8 ),
2032+ /* [9] */ NumberMatcherIndex(9 ),
20162033 /* [10] */ NumberMatcherIndex(4),
2017- /* [11] */ NumberMatcherIndex(8 ),
2034+ /* [11] */ NumberMatcherIndex(9 ),
20182035 /* [12] */ NumberMatcherIndex(5),
2019- /* [13] */ NumberMatcherIndex(8 ),
2036+ /* [13] */ NumberMatcherIndex(9 ),
20202037 /* [14] */ NumberMatcherIndex(3),
2021- /* [15] */ NumberMatcherIndex(7 ),
2038+ /* [15] */ NumberMatcherIndex(8 ),
20222039 /* [16] */ NumberMatcherIndex(4),
2023- /* [17] */ NumberMatcherIndex(7 ),
2040+ /* [17] */ NumberMatcherIndex(8 ),
20242041 /* [18] */ NumberMatcherIndex(5),
2025- /* [19] */ NumberMatcherIndex(7 ),
2042+ /* [19] */ NumberMatcherIndex(8 ),
20262043 /* [20] */ NumberMatcherIndex(1),
20272044 /* [21] */ NumberMatcherIndex(2),
20282045 /* [22] */ NumberMatcherIndex(0),
@@ -4722,17 +4739,12 @@ constexpr TemplateNumberInfo kTemplateNumbers[] = {
47224739 {
47234740 /* [7] */
47244741 /* name */ "A",
4725- /* matcher_index */ NumberMatcherIndex(8),
4726- },
4727- {
4728- /* [8] */
4729- /* name */ "A",
47304742 /* matcher_index */ NumberMatcherIndex(/* invalid */),
47314743 },
47324744 {
4733- /* [9 ] */
4745+ /* [8 ] */
47344746 /* name */ "S",
4735- /* matcher_index */ NumberMatcherIndex(10 ),
4747+ /* matcher_index */ NumberMatcherIndex(11 ),
47364748 },
47374749};
47384750
@@ -10474,7 +10486,7 @@ constexpr OverloadInfo kOverloads[] = {
1047410486 /* num_template_types */ 1,
1047510487 /* num_template_numbers */ 1,
1047610488 /* template_types */ TemplateTypeIndex(25),
10477- /* template_numbers */ TemplateNumberIndex(8 ),
10489+ /* template_numbers */ TemplateNumberIndex(7 ),
1047810490 /* parameters */ ParameterIndex(366),
1047910491 /* return_type_matcher_indices */ TypeMatcherIndicesIndex(35),
1048010492 /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
@@ -10773,7 +10785,7 @@ constexpr OverloadInfo kOverloads[] = {
1077310785 /* num_template_types */ 1,
1077410786 /* num_template_numbers */ 1,
1077510787 /* template_types */ TemplateTypeIndex(26),
10776- /* template_numbers */ TemplateNumberIndex(9 ),
10788+ /* template_numbers */ TemplateNumberIndex(8 ),
1077710789 /* parameters */ ParameterIndex(0),
1077810790 /* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
1077910791 /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
@@ -10786,7 +10798,7 @@ constexpr OverloadInfo kOverloads[] = {
1078610798 /* num_template_types */ 1,
1078710799 /* num_template_numbers */ 1,
1078810800 /* template_types */ TemplateTypeIndex(26),
10789- /* template_numbers */ TemplateNumberIndex(9 ),
10801+ /* template_numbers */ TemplateNumberIndex(8 ),
1079010802 /* parameters */ ParameterIndex(0),
1079110803 /* return_type_matcher_indices */ TypeMatcherIndicesIndex(/* invalid */),
1079210804 /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
@@ -10799,7 +10811,7 @@ constexpr OverloadInfo kOverloads[] = {
1079910811 /* num_template_types */ 1,
1080010812 /* num_template_numbers */ 1,
1080110813 /* template_types */ TemplateTypeIndex(26),
10802- /* template_numbers */ TemplateNumberIndex(9 ),
10814+ /* template_numbers */ TemplateNumberIndex(8 ),
1080310815 /* parameters */ ParameterIndex(0),
1080410816 /* return_type_matcher_indices */ TypeMatcherIndicesIndex(2),
1080510817 /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
@@ -10812,7 +10824,7 @@ constexpr OverloadInfo kOverloads[] = {
1081210824 /* num_template_types */ 1,
1081310825 /* num_template_numbers */ 1,
1081410826 /* template_types */ TemplateTypeIndex(26),
10815- /* template_numbers */ TemplateNumberIndex(9 ),
10827+ /* template_numbers */ TemplateNumberIndex(8 ),
1081610828 /* parameters */ ParameterIndex(0),
1081710829 /* return_type_matcher_indices */ TypeMatcherIndicesIndex(80),
1081810830 /* return_number_matcher_indices */ NumberMatcherIndicesIndex(/* invalid */),
@@ -11506,10 +11518,10 @@ constexpr IntrinsicInfo kBuiltins[] = {
1150611518 /* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32> */
1150711519 /* fn textureDimensions<L : iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32> */
1150811520 /* fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32> */
11509- /* fn textureDimensions<F : texel_format, A : writable >(texture: texture_storage_1d<F, A>) -> u32 */
11510- /* fn textureDimensions<F : texel_format, A : writable >(texture: texture_storage_2d<F, A>) -> vec2<u32> */
11511- /* fn textureDimensions<F : texel_format, A : writable >(texture: texture_storage_2d_array<F, A>) -> vec2<u32> */
11512- /* fn textureDimensions<F : texel_format, A : writable >(texture: texture_storage_3d<F, A>) -> vec3<u32> */
11521+ /* fn textureDimensions<F : texel_format, A : access >(texture: texture_storage_1d<F, A>) -> u32 */
11522+ /* fn textureDimensions<F : texel_format, A : access >(texture: texture_storage_2d<F, A>) -> vec2<u32> */
11523+ /* fn textureDimensions<F : texel_format, A : access >(texture: texture_storage_2d_array<F, A>) -> vec2<u32> */
11524+ /* fn textureDimensions<F : texel_format, A : access >(texture: texture_storage_3d<F, A>) -> vec3<u32> */
1151311525 /* fn textureDimensions(texture: texture_external) -> vec2<u32> */
1151411526 /* num overloads */ 27,
1151511527 /* overloads */ OverloadIndex(0),
@@ -11548,7 +11560,7 @@ constexpr IntrinsicInfo kBuiltins[] = {
1154811560 /* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> u32 */
1154911561 /* fn textureNumLayers(texture: texture_depth_2d_array) -> u32 */
1155011562 /* fn textureNumLayers(texture: texture_depth_cube_array) -> u32 */
11551- /* fn textureNumLayers<F : texel_format, A : writable >(texture: texture_storage_2d_array<F, A>) -> u32 */
11563+ /* fn textureNumLayers<F : texel_format, A : access >(texture: texture_storage_2d_array<F, A>) -> u32 */
1155211564 /* num overloads */ 5,
1155311565 /* overloads */ OverloadIndex(246),
1155411566 },
@@ -11696,18 +11708,18 @@ constexpr IntrinsicInfo kBuiltins[] = {
1169611708 /* fn textureLoad<C : iu32, A : iu32, L : iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32 */
1169711709 /* fn textureLoad<C : iu32, S : iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32 */
1169811710 /* fn textureLoad<C : iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32> */
11699- /* fn textureLoad<C : iu32>(texture: texture_storage_1d<f32_texel_format, read_write >, coords: C) -> vec4<f32> */
11700- /* fn textureLoad<C : iu32>(texture: texture_storage_1d<i32_texel_format, read_write >, coords: C) -> vec4<i32> */
11701- /* fn textureLoad<C : iu32>(texture: texture_storage_1d<u32_texel_format, read_write >, coords: C) -> vec4<u32> */
11702- /* fn textureLoad<C : iu32>(texture: texture_storage_2d<f32_texel_format, read_write >, coords: vec2<C>) -> vec4<f32> */
11703- /* fn textureLoad<C : iu32>(texture: texture_storage_2d<i32_texel_format, read_write >, coords: vec2<C>) -> vec4<i32> */
11704- /* fn textureLoad<C : iu32>(texture: texture_storage_2d<u32_texel_format, read_write >, coords: vec2<C>) -> vec4<u32> */
11705- /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, read_write >, coords: vec2<C>, array_index: A) -> vec4<f32> */
11706- /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<i32_texel_format, read_write >, coords: vec2<C>, array_index: A) -> vec4<i32> */
11707- /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<u32_texel_format, read_write >, coords: vec2<C>, array_index: A) -> vec4<u32> */
11708- /* fn textureLoad<C : iu32>(texture: texture_storage_3d<f32_texel_format, read_write >, coords: vec3<C>) -> vec4<f32> */
11709- /* fn textureLoad<C : iu32>(texture: texture_storage_3d<i32_texel_format, read_write >, coords: vec3<C>) -> vec4<i32> */
11710- /* fn textureLoad<C : iu32>(texture: texture_storage_3d<u32_texel_format, read_write >, coords: vec3<C>) -> vec4<u32> */
11711+ /* fn textureLoad<C : iu32>(texture: texture_storage_1d<f32_texel_format, readable >, coords: C) -> vec4<f32> */
11712+ /* fn textureLoad<C : iu32>(texture: texture_storage_1d<i32_texel_format, readable >, coords: C) -> vec4<i32> */
11713+ /* fn textureLoad<C : iu32>(texture: texture_storage_1d<u32_texel_format, readable >, coords: C) -> vec4<u32> */
11714+ /* fn textureLoad<C : iu32>(texture: texture_storage_2d<f32_texel_format, readable >, coords: vec2<C>) -> vec4<f32> */
11715+ /* fn textureLoad<C : iu32>(texture: texture_storage_2d<i32_texel_format, readable >, coords: vec2<C>) -> vec4<i32> */
11716+ /* fn textureLoad<C : iu32>(texture: texture_storage_2d<u32_texel_format, readable >, coords: vec2<C>) -> vec4<u32> */
11717+ /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, readable >, coords: vec2<C>, array_index: A) -> vec4<f32> */
11718+ /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<i32_texel_format, readable >, coords: vec2<C>, array_index: A) -> vec4<i32> */
11719+ /* fn textureLoad<C : iu32, A : iu32>(texture: texture_storage_2d_array<u32_texel_format, readable >, coords: vec2<C>, array_index: A) -> vec4<u32> */
11720+ /* fn textureLoad<C : iu32>(texture: texture_storage_3d<f32_texel_format, readable >, coords: vec3<C>) -> vec4<f32> */
11721+ /* fn textureLoad<C : iu32>(texture: texture_storage_3d<i32_texel_format, readable >, coords: vec3<C>) -> vec4<i32> */
11722+ /* fn textureLoad<C : iu32>(texture: texture_storage_3d<u32_texel_format, readable >, coords: vec3<C>) -> vec4<u32> */
1171111723 /* num overloads */ 21,
1171211724 /* overloads */ OverloadIndex(27),
1171311725 },
0 commit comments