Import Tint changes from Dawn
Changes:
- 5c5f47afbf4deb6bc6e9f2e38b0206edc4ee2c12 Fixup shadow variable. by dan sinclair <dsinclair@chromium.org>
- 3f24fdc4476023b30a3a00793391a70bac0379db tint/fuzzers: Don't run the inspector on invalid programs by Ben Clayton <bclayton@google.com>
- a3175f28f6d80e826eebe399b6b53430df6de6f2 tint: const eval of firstTrailingBit by Antonio Maiorano <amaiorano@google.com>
- 1abe52dc1cd5e66d8cf7fee351b4df6ddf3a5259 tint: const eval of firstLeadingBit by Antonio Maiorano <amaiorano@google.com>
- 76c21c070bc4889437b5538ddb143aba2e759034 tint: const eval of countOneBits by Antonio Maiorano <amaiorano@google.com>
- 6dbb463f1deff71c0bff1eccaf44a240aab8ace1 tint/writers: Polyfill integer clamp() by Ben Clayton <bclayton@google.com>
- be83128031408a5f77f4ec26faa22db4f9d450e2 tint/transform: Don't hoist textures / samplers by Ben Clayton <bclayton@google.com>
- 22c4850b0689a3ec4e1ebcde3c0b9e3ee69f92cc tint/resolver: Allow array sizes to be unnamed override-e... by Ben Clayton <bclayton@google.com>
- cc85ed6dd1502fe16723378e9e6de317576030e6 tint: Function calls do not affect control flow uniformity by James Price <jrprice@google.com>
- 3e1bc0a6da82003ef5d15f88c4d3c776a333d23c tint: Use MergeReturn transform in SPIR-V backend by James Price <jrprice@google.com>
- 8e8e38d1299866688c75074eaf86e93a9e6bc3dd tint/cmd: Expose multiplaner_external_texture transform by Ben Clayton <bclayton@google.com>
- 116a5e050a1830566195e33170824e1eaaefa13c tint: regenerate intrinsic_table.inl by Ben Clayton <bclayton@google.com>
- 5de8b436faa84436e2df92b464d84c6672762de5 tint: Add MergeReturn transform by James Price <jrprice@google.com>
- 8a523d7d8ec5d56822ccf9219cb939cf7bd2881b Add const-eval for `any`. by dan sinclair <dsinclair@chromium.org>
- 7494e10f912c3856bc15078749ce800f4bd4e1e7 tint: const eval of countTrailingZeros by Antonio Maiorano <amaiorano@google.com>
- 2be5167e3e099668081110ae9d5bd22b116cd414 tint: const eval of countLeadingZeros by Antonio Maiorano <amaiorano@google.com>
- 46de10299fafa2c6b4c00c2c6968095d4f761f77 tint/transform/builtin_polyfill: Don't polyfill @const bu... by Ben Clayton <bclayton@google.com>
- 2048d4f6efa4598bc38e64a2574ee65a50563312 tint: fix identity initializer of vec from vec of abstrac... by Antonio Maiorano <amaiorano@google.com>
- c395660ee6c6a11aba274e0444d084ede5e40e1b Add const-eval for `sign`. by dan sinclair <dsinclair@chromium.org>
- fd1b5a893d822c79d1038e688f6e0113c1d3d631 Set specific test value for asin test cases. by dan sinclair <dsinclair@chromium.org>
- e366dcf747ebe69e54dc42ae99b13f6043375ec4 tint: show template param when printing initializer overl... by Antonio Maiorano <amaiorano@google.com>
- 71111f8e0d855cf94cc8cc2df6071795ae48b659 Fixup dispatch call for step and saturate. by dan sinclair <dsinclair@chromium.org>
- eee8d88210633b7d69973ecb2a1517656db5d259 Start adding IR. by dan sinclair <dsinclair@chromium.org>
- 14b5fb6f1742a8a0ece928a56019e0fd153eb46e tint: add pretty printers for gdb and lldb by Antonio Maiorano <amaiorano@google.com>
- 91ed6f7289a4a5f070538facc6e3445ad16b2810 Add const-eval for `saturate`. by dan sinclair <dsinclair@chromium.org>
- c98ad87368ded7b161259d401f0ce8597eaf0f4e Add const-eval for `step`. by dan sinclair <dsinclair@chromium.org>
- 59d9c89ff71caba6b5efca873e2f96d642713cff Add const-eval for `asin` and `asinh`. by dan sinclair <dsinclair@chromium.org>
- a92f4259d51ddbc16aef725c82dd23bc2411fe6f tint/writer/msl: Move packed_vector hacks to transform by Ben Clayton <bclayton@google.com>
- 81ecd739b0933f182fa68d57c360307f693617bb Protect sem::MemberAccessorExpression constructor. by dan sinclair <dsinclair@chromium.org>
- 2e376a9bb072e5b0bc6590cdc0f2e121f5101a7b tint/intrinsics: Allow mixing of signed / unsigned intege... by Ben Clayton <bclayton@google.com>
- 13f089095f53fd22a302fd5e69794f8bb5b17d5f tint/intrinsics: Texture queries now return unsigned inte... by Ben Clayton <bclayton@google.com>
- 0143ec57ba832325db2af86a5c499659032ed3ea Reland "tint::transform::VertexPulling: require SingleEnt... by Corentin Wallez <cwallez@chromium.org>
- 45844e3df4a435236d281d120d0b01e480057457 Revert "tint::transform::VertexPulling: require SingleEnt... by Dan Sinclair <dsinclair@chromium.org>
- b3b027d3cddb821a00112aa9cb50fde5c633c337 Update lexer to not include `-` in numbers. by dan sinclair <dsinclair@chromium.org>
- 63463c2f775fadb56daad93e0e92fe9153a426fd tint::transform::VertexPulling: require SingleEntryPoint by Corentin Wallez <cwallez@chromium.org>
- 4faf3581b87541c8bdb93c0ae8baaba74ef6c4cf Tint/builder/spirv: Fix atomicCompareExchangeWeak wrong r... by Zhaoming Jiang <zhaoming.jiang@intel.com>
- 0640c8107304ea0e776df1a09fd3efcf58b2dd2a tint: make uniformity analysis failures warnings again by Antonio Maiorano <amaiorano@google.com>
- ee42e05101af0c6529ce743b5329d1ab3f9a7f4d tint: enable unit test now that const eval of shift left ... by Antonio Maiorano <amaiorano@google.com>
- 25fdff1ff8195780fbc9ad418873fb89f4479224 Unrevert "tint: rhs of left shift is always u32 or vector... by Antonio Maiorano <amaiorano@google.com>
- e0f78f924c7aaffccdee450bfd59d0af6d0a595f tint: always pass in earliest evaluation stage to intrins... by Antonio Maiorano <amaiorano@google.com>
- 4c8401f33ca13cae92b24af28f4001fd9c7031f8 Add const-eval for `atanh`. by dan sinclair <dsinclair@chromium.org>
- 5af4d88753bcc0bb0f4a2326321626922fbfe762 tint/resolver: Validate @size only on creation-fixed foot... by Ben Clayton <bclayton@google.com>
- bd5bd247f0d1c8410c8b622bfbdc68730c7fea7b tint/resolver: Limit scope depth / if-chains. by Ben Clayton <bclayton@google.com>
- 0423c3ccd09b45fb03b4d77b97f51d695f429f6e Use ConcatIntoIf in const-eval builtin tests. by dan sinclair <dsinclair@chromium.org>
- f17497cb6dd181327ef220fdcebd36ba069d1d65 tint/sem: Add tests for IsConstructable by Ben Clayton <bclayton@google.com>
- 95dd428c750d1af73c0b53fa7d12d227a5c134a1 tint/intrinsics.def: Add @test_value() annotation by Ben Clayton <bclayton@google.com>
- 80b2312493d3a141796b7a770e51a55c2f26747a tint/sem: Add Type::Flags() by Ben Clayton <bclayton@google.com>
- 434edc2a12dcaaad031a27db5de883fd8297f599 tint/resolver: Allow shadowing of builtins by Ben Clayton <bclayton@google.com>
- da5424b617cc82946f99005307d7da0e2cf2bfa6 tint: Allow signed / unsigned texture builtin params by Ben Clayton <bclayton@google.com>
- 20500b8e3a1cd60750176d0e09eb761169bf7542 Add const-eval for `atan`. by dan sinclair <dsinclair@chromium.org>
- 087c355e0896268bd0e9e7d99eed465539ed8e9c Revert "tint: rhs of left shift is always u32 or vector o... by Antonio Maiorano <amaiorano@google.com>
- a3325fa94d446f14963985235e08124e950d08b6 Traverse function return attributes. by dan sinclair <dsinclair@chromium.org>
- cc9ae5cae3558a92e07cf307738d420e600a0757 tint: rhs of left shift is always u32 or vector of u32 by Antonio Maiorano <amaiorano@google.com>
- 3a1b799585acbadc8c5836caca9c7175535c3119 Review feeback from 106420 by dan sinclair <dsinclair@chromium.org>
- a7014a969e7de467e14bb0ba9686279deccccc16 Rename primary_expression. by dan sinclair <dsinclair@chromium.org>
GitOrigin-RevId: 5c5f47afbf4deb6bc6e9f2e38b0206edc4ee2c12
Change-Id: Ic719e2f8dc80e591e1452ca2901f78c054a6f5d1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/108025
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index 6560b6f..92dfe06 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -511,12 +511,16 @@
"transform/localize_struct_array_assignment.h",
"transform/manager.cc",
"transform/manager.h",
+ "transform/merge_return.cc",
+ "transform/merge_return.h",
"transform/module_scope_var_to_entry_point_param.cc",
"transform/module_scope_var_to_entry_point_param.h",
"transform/multiplanar_external_texture.cc",
"transform/multiplanar_external_texture.h",
"transform/num_workgroups_from_uniform.cc",
"transform/num_workgroups_from_uniform.h",
+ "transform/packed_vec3.cc",
+ "transform/packed_vec3.h",
"transform/pad_structs.cc",
"transform/pad_structs.h",
"transform/promote_initializers_to_let.cc",
@@ -1222,9 +1226,11 @@
"transform/first_index_offset_test.cc",
"transform/for_loop_to_loop_test.cc",
"transform/localize_struct_array_assignment_test.cc",
+ "transform/merge_return_test.cc",
"transform/module_scope_var_to_entry_point_param_test.cc",
"transform/multiplanar_external_texture_test.cc",
"transform/num_workgroups_from_uniform_test.cc",
+ "transform/packed_vec3_test.cc",
"transform/pad_structs_test.cc",
"transform/promote_initializers_to_let_test.cc",
"transform/promote_side_effects_to_decl_test.cc",
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index af4384c..d4c13ca 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -248,6 +248,26 @@
inspector/resource_binding.h
inspector/scalar.cc
inspector/scalar.h
+ ir/block.cc
+ ir/block.h
+ ir/builder.cc
+ ir/builder.h
+ ir/builder_impl.cc
+ ir/builder_impl.h
+ ir/flow_node.cc
+ ir/flow_node.h
+ ir/function.cc
+ ir/function.h
+ ir/if.cc
+ ir/if.h
+ ir/loop.cc
+ ir/loop.h
+ ir/module.cc
+ ir/module.h
+ ir/switch.cc
+ ir/switch.h
+ ir/terminator.cc
+ ir/terminator.h
number.cc
number.h
program_builder.cc
@@ -424,12 +444,16 @@
transform/localize_struct_array_assignment.h
transform/manager.cc
transform/manager.h
+ transform/merge_return.cc
+ transform/merge_return.h
transform/module_scope_var_to_entry_point_param.cc
transform/module_scope_var_to_entry_point_param.h
transform/multiplanar_external_texture.cc
transform/multiplanar_external_texture.h
transform/num_workgroups_from_uniform.cc
transform/num_workgroups_from_uniform.h
+ transform/packed_vec3.cc
+ transform/packed_vec3.h
transform/pad_structs.cc
transform/pad_structs.h
transform/promote_initializers_to_let.cc
@@ -787,6 +811,8 @@
diagnostic/diagnostic_test.cc
diagnostic/formatter_test.cc
diagnostic/printer_test.cc
+ ir/builder_impl_test.cc
+ ir/test_helper.h
number_test.cc
program_builder_test.cc
program_test.cc
@@ -1138,9 +1164,11 @@
transform/for_loop_to_loop_test.cc
transform/expand_compound_assignment.cc
transform/localize_struct_array_assignment_test.cc
+ transform/merge_return.cc
transform/module_scope_var_to_entry_point_param_test.cc
transform/multiplanar_external_texture_test.cc
transform/num_workgroups_from_uniform_test.cc
+ transform/packed_vec3_test.cc
transform/pad_structs_test.cc
transform/promote_initializers_to_let_test.cc
transform/promote_side_effects_to_decl_test.cc
diff --git a/src/tint/ast/break_if_statement.h b/src/tint/ast/break_if_statement.h
index fe83d92..1437797 100644
--- a/src/tint/ast/break_if_statement.h
+++ b/src/tint/ast/break_if_statement.h
@@ -22,7 +22,7 @@
namespace tint::ast {
-/// A break if statement
+/// A break-if statement
class BreakIfStatement final : public Castable<BreakIfStatement, Statement> {
public:
/// Constructor
diff --git a/src/tint/ast/builtin_texture_helper_test.cc b/src/tint/ast/builtin_texture_helper_test.cc
index 37d4d65..d2ea48d 100644
--- a/src/tint/ast/builtin_texture_helper_test.cc
+++ b/src/tint/ast/builtin_texture_helper_test.cc
@@ -183,7 +183,7 @@
return {
{
ValidTextureOverload::kDimensions1d,
- "textureDimensions(t : texture_1d<f32>) -> i32",
+ "textureDimensions(t : texture_1d<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k1d,
@@ -193,7 +193,7 @@
},
{
ValidTextureOverload::kDimensions2d,
- "textureDimensions(t : texture_2d<f32>) -> vec2<i32>",
+ "textureDimensions(t : texture_2d<f32>) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -204,7 +204,7 @@
{
ValidTextureOverload::kDimensions2dLevel,
"textureDimensions(t : texture_2d<f32>,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -214,7 +214,7 @@
},
{
ValidTextureOverload::kDimensions2dArray,
- "textureDimensions(t : texture_2d_array<f32>) -> vec2<i32>",
+ "textureDimensions(t : texture_2d_array<f32>) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -225,7 +225,7 @@
{
ValidTextureOverload::kDimensions2dArrayLevel,
"textureDimensions(t : texture_2d_array<f32>,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -235,7 +235,7 @@
},
{
ValidTextureOverload::kDimensions3d,
- "textureDimensions(t : texture_3d<f32>) -> vec3<i32>",
+ "textureDimensions(t : texture_3d<f32>) -> vec3<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k3d,
@@ -246,7 +246,7 @@
{
ValidTextureOverload::kDimensions3dLevel,
"textureDimensions(t : texture_3d<f32>,\n"
- " level : i32) -> vec3<i32>",
+ " level : i32) -> vec3<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k3d,
@@ -256,7 +256,7 @@
},
{
ValidTextureOverload::kDimensionsCube,
- "textureDimensions(t : texture_cube<f32>) -> vec2<i32>",
+ "textureDimensions(t : texture_cube<f32>) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -267,7 +267,7 @@
{
ValidTextureOverload::kDimensionsCubeLevel,
"textureDimensions(t : texture_cube<f32>,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -277,7 +277,7 @@
},
{
ValidTextureOverload::kDimensionsCubeArray,
- "textureDimensions(t : texture_cube_array<f32>) -> vec2<i32>",
+ "textureDimensions(t : texture_cube_array<f32>) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -288,7 +288,7 @@
{
ValidTextureOverload::kDimensionsCubeArrayLevel,
"textureDimensions(t : texture_cube_array<f32>,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -298,7 +298,7 @@
},
{
ValidTextureOverload::kDimensionsMultisampled2d,
- "textureDimensions(t : texture_multisampled_2d<f32>)-> vec2<i32>",
+ "textureDimensions(t : texture_multisampled_2d<f32>)-> vec2<u32>",
TextureKind::kMultisampled,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -308,7 +308,7 @@
},
{
ValidTextureOverload::kDimensionsDepth2d,
- "textureDimensions(t : texture_depth_2d) -> vec2<i32>",
+ "textureDimensions(t : texture_depth_2d) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -319,7 +319,7 @@
{
ValidTextureOverload::kDimensionsDepth2dLevel,
"textureDimensions(t : texture_depth_2d,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -329,7 +329,7 @@
},
{
ValidTextureOverload::kDimensionsDepth2dArray,
- "textureDimensions(t : texture_depth_2d_array) -> vec2<i32>",
+ "textureDimensions(t : texture_depth_2d_array) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -340,7 +340,7 @@
{
ValidTextureOverload::kDimensionsDepth2dArrayLevel,
"textureDimensions(t : texture_depth_2d_array,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -350,7 +350,7 @@
},
{
ValidTextureOverload::kDimensionsDepthCube,
- "textureDimensions(t : texture_depth_cube) -> vec2<i32>",
+ "textureDimensions(t : texture_depth_cube) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -361,7 +361,7 @@
{
ValidTextureOverload::kDimensionsDepthCubeLevel,
"textureDimensions(t : texture_depth_cube,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -371,7 +371,7 @@
},
{
ValidTextureOverload::kDimensionsDepthCubeArray,
- "textureDimensions(t : texture_depth_cube_array) -> vec2<i32>",
+ "textureDimensions(t : texture_depth_cube_array) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -382,7 +382,7 @@
{
ValidTextureOverload::kDimensionsDepthCubeArrayLevel,
"textureDimensions(t : texture_depth_cube_array,\n"
- " level : i32) -> vec2<i32>",
+ " level : i32) -> vec2<u32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -392,7 +392,7 @@
},
{
ValidTextureOverload::kDimensionsDepthMultisampled2d,
- "textureDimensions(t : texture_depth_multisampled_2d) -> vec2<i32>",
+ "textureDimensions(t : texture_depth_multisampled_2d) -> vec2<u32>",
TextureKind::kDepthMultisampled,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -402,7 +402,7 @@
},
{
ValidTextureOverload::kDimensionsStorageWO1d,
- "textureDimensions(t : texture_storage_1d<rgba32float>) -> i32",
+ "textureDimensions(t : texture_storage_1d<rgba32float>) -> u32",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
ast::TextureDimension::k1d,
@@ -412,8 +412,7 @@
},
{
ValidTextureOverload::kDimensionsStorageWO2d,
- "textureDimensions(t : texture_storage_2d<rgba32float>) -> "
- "vec2<i32>",
+ "textureDimensions(t : texture_storage_2d<rgba32float>) -> vec2<u32>",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
ast::TextureDimension::k2d,
@@ -423,8 +422,7 @@
},
{
ValidTextureOverload::kDimensionsStorageWO2dArray,
- "textureDimensions(t : texture_storage_2d_array<rgba32float>) -> "
- "vec2<i32>",
+ "textureDimensions(t : texture_storage_2d_array<rgba32float>) -> vec2<u32>",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
ast::TextureDimension::k2dArray,
@@ -434,8 +432,7 @@
},
{
ValidTextureOverload::kDimensionsStorageWO3d,
- "textureDimensions(t : texture_storage_3d<rgba32float>) -> "
- "vec3<i32>",
+ "textureDimensions(t : texture_storage_3d<rgba32float>) -> vec3<u32>",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
ast::TextureDimension::k3d,
@@ -464,7 +461,7 @@
},
{
ValidTextureOverload::kGather2dOffsetF32,
- "textureGather(component : i32,\n"
+ "textureGather(component : u32,\n"
" t : texture_2d<T>,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
@@ -475,7 +472,7 @@
TextureDataType::kF32,
"textureGather",
[](ProgramBuilder* b) {
- return b->ExprList(0_i, // component
+ return b->ExprList(0_u, // component
"texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
@@ -504,11 +501,11 @@
},
{
ValidTextureOverload::kGather2dArrayOffsetF32,
- "textureGather(component : i32,\n"
+ "textureGather(component : u32,\n"
" t : texture_2d_array<T>,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" offset : vec2<i32>) -> vec4<T>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
@@ -516,11 +513,11 @@
TextureDataType::kF32,
"textureGather",
[](ProgramBuilder* b) {
- return b->ExprList(0_i, // component
+ return b->ExprList(0_u, // component
"texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i, // array_index
+ 3_u, // array_index
b->vec2<i32>(4_i, 5_i)); // offset
},
},
@@ -544,22 +541,22 @@
},
{
ValidTextureOverload::kGatherCubeArrayF32,
- "textureGather(component : i32,\n"
+ "textureGather(component : u32,\n"
" t : texture_cube_array<T>,\n"
" s : sampler,\n"
" coords : vec3<f32>,\n"
- " array_index : i32) -> vec4<T>",
+ " array_index : u32) -> vec4<T>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
TextureDataType::kF32,
"textureGather",
[](ProgramBuilder* b) {
- return b->ExprList(0_i, // component
+ return b->ExprList(0_u, // component
"texture", // t
"sampler", // s
b->vec3<f32>(1_f, 2_f, 3_f), // coords
- 4_i); // array_index
+ 4_u); // array_index
},
},
{
@@ -601,7 +598,7 @@
"textureGather(t : texture_depth_2d_array,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32) -> vec4<f32>",
+ " array_index : u32) -> vec4<f32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -611,7 +608,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i); // array_index
+ 3_u); // array_index
},
},
{
@@ -655,7 +652,7 @@
"textureGather(t : texture_depth_cube_array,\n"
" s : sampler,\n"
" coords : vec3<f32>,\n"
- " array_index : i32) -> vec4<f32>",
+ " array_index : u32) -> vec4<f32>",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -665,7 +662,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1_f, 2_f, 3_f), // coords
- 4_i); // array_index
+ 4_u); // array_index
},
},
{
@@ -771,7 +768,7 @@
"textureGatherCompare(t : texture_depth_cube_array,\n"
" s : sampler_comparison,\n"
" coords : vec3<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" depth_ref : f32) -> vec4<f32>",
TextureKind::kDepth,
ast::SamplerKind::kComparisonSampler,
@@ -782,13 +779,13 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1_f, 2_f, 3_f), // coords
- 4_i, // array_index
+ 4_u, // array_index
5_f); // depth_ref
},
},
{
ValidTextureOverload::kNumLayers2dArray,
- "textureNumLayers(t : texture_2d_array<f32>) -> i32",
+ "textureNumLayers(t : texture_2d_array<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -798,7 +795,7 @@
},
{
ValidTextureOverload::kNumLayersCubeArray,
- "textureNumLayers(t : texture_cube_array<f32>) -> i32",
+ "textureNumLayers(t : texture_cube_array<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -808,7 +805,7 @@
},
{
ValidTextureOverload::kNumLayersDepth2dArray,
- "textureNumLayers(t : texture_depth_2d_array) -> i32",
+ "textureNumLayers(t : texture_depth_2d_array) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -818,7 +815,7 @@
},
{
ValidTextureOverload::kNumLayersDepthCubeArray,
- "textureNumLayers(t : texture_depth_cube_array) -> i32",
+ "textureNumLayers(t : texture_depth_cube_array) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -828,7 +825,7 @@
},
{
ValidTextureOverload::kNumLayersStorageWO2dArray,
- "textureNumLayers(t : texture_storage_2d_array<rgba32float>) -> i32",
+ "textureNumLayers(t : texture_storage_2d_array<rgba32float>) -> u32",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
ast::TextureDimension::k2dArray,
@@ -838,7 +835,7 @@
},
{
ValidTextureOverload::kNumLevels2d,
- "textureNumLevels(t : texture_2d<f32>) -> i32",
+ "textureNumLevels(t : texture_2d<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -848,7 +845,7 @@
},
{
ValidTextureOverload::kNumLevels2dArray,
- "textureNumLevels(t : texture_2d_array<f32>) -> i32",
+ "textureNumLevels(t : texture_2d_array<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -858,7 +855,7 @@
},
{
ValidTextureOverload::kNumLevels3d,
- "textureNumLevels(t : texture_3d<f32>) -> i32",
+ "textureNumLevels(t : texture_3d<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::k3d,
@@ -868,7 +865,7 @@
},
{
ValidTextureOverload::kNumLevelsCube,
- "textureNumLevels(t : texture_cube<f32>) -> i32",
+ "textureNumLevels(t : texture_cube<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -878,7 +875,7 @@
},
{
ValidTextureOverload::kNumLevelsCubeArray,
- "textureNumLevels(t : texture_cube_array<f32>) -> i32",
+ "textureNumLevels(t : texture_cube_array<f32>) -> u32",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -888,7 +885,7 @@
},
{
ValidTextureOverload::kNumLevelsDepth2d,
- "textureNumLevels(t : texture_depth_2d) -> i32",
+ "textureNumLevels(t : texture_depth_2d) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -898,7 +895,7 @@
},
{
ValidTextureOverload::kNumLevelsDepth2dArray,
- "textureNumLevels(t : texture_depth_2d_array) -> i32",
+ "textureNumLevels(t : texture_depth_2d_array) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -908,7 +905,7 @@
},
{
ValidTextureOverload::kNumLevelsDepthCube,
- "textureNumLevels(t : texture_depth_cube) -> i32",
+ "textureNumLevels(t : texture_depth_cube) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCube,
@@ -918,7 +915,7 @@
},
{
ValidTextureOverload::kNumLevelsDepthCubeArray,
- "textureNumLevels(t : texture_depth_cube_array) -> i32",
+ "textureNumLevels(t : texture_depth_cube_array) -> u32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -928,7 +925,7 @@
},
{
ValidTextureOverload::kNumSamplesMultisampled2d,
- "textureNumSamples(t : texture_multisampled_2d<f32>) -> i32",
+ "textureNumSamples(t : texture_multisampled_2d<f32>) -> u32",
TextureKind::kMultisampled,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -937,6 +934,16 @@
[](ProgramBuilder* b) { return b->ExprList("texture"); },
},
{
+ ValidTextureOverload::kNumSamplesDepthMultisampled2d,
+ "textureNumSamples(t : texture_depth_multisampled_2d<f32>) -> u32",
+ TextureKind::kMultisampled,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::k2d,
+ TextureDataType::kF32,
+ "textureNumSamples",
+ [](ProgramBuilder* b) { return b->ExprList("texture"); },
+ },
+ {
ValidTextureOverload::kSample1dF32,
"textureSample(t : texture_1d<f32>,\n"
" s : sampler,\n"
@@ -1009,7 +1016,7 @@
"textureSample(t : texture_2d_array<f32>,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32\n"
+ " array_index : u32\n"
" offset : vec2<i32>) -> vec4<f32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
@@ -1020,7 +1027,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i, // array_index
+ 3_u, // array_index
b->vec2<i32>(4_i, 5_i)); // offset
},
},
@@ -1185,7 +1192,7 @@
"textureSample(t : texture_depth_cube_array,\n"
" s : sampler,\n"
" coords : vec3<f32>,\n"
- " array_index : i32) -> f32",
+ " array_index : u32) -> f32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::kCubeArray,
@@ -1195,7 +1202,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1_f, 2_f, 3_f), // coords
- 4_i); // array_index
+ 4_u); // array_index
},
},
{
@@ -1241,7 +1248,7 @@
"textureSampleBias(t : texture_2d_array<f32>,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" bias : f32) -> vec4<f32>",
TextureKind::kRegular,
ast::SamplerKind::kSampler,
@@ -1252,7 +1259,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 4_i, // array_index
+ 4_u, // array_index
3_f); // bias
},
},
@@ -1515,7 +1522,7 @@
"textureSampleLevel(t : texture_depth_2d,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " level : i32) -> f32",
+ " level : u32) -> f32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2d,
@@ -1525,7 +1532,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i); // level
+ 3_u); // level
},
},
{
@@ -1553,8 +1560,8 @@
"textureSampleLevel(t : texture_depth_2d_array,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
- " level : i32) -> f32",
+ " array_index : u32,\n"
+ " level : u32) -> f32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
ast::TextureDimension::k2dArray,
@@ -1564,8 +1571,8 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i, // array_index
- 4_i); // level
+ 3_u, // array_index
+ 4_u); // level
},
},
{
@@ -1573,8 +1580,8 @@
"textureSampleLevel(t : texture_depth_2d_array,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
- " level : i32,\n"
+ " array_index : u32,\n"
+ " level : u32,\n"
" offset : vec2<i32>) -> f32",
TextureKind::kDepth,
ast::SamplerKind::kSampler,
@@ -1585,8 +1592,8 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i, // array_index
- 4_i, // level
+ 3_u, // array_index
+ 4_u, // level
b->vec2<i32>(5_i, 6_i)); // offset
},
},
@@ -1697,7 +1704,7 @@
"textureSampleGrad(t : texture_2d_array<f32>,\n"
" s : sampler,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" ddx : vec2<f32>,\n"
" ddy : vec2<f32>,\n"
" offset : vec2<i32>) -> vec4<f32>",
@@ -1710,7 +1717,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i, // array_index
+ 3_u, // array_index
b->vec2<f32>(4_f, 5_f), // ddx
b->vec2<f32>(6_f, 7_f), // ddy
b->vec2<i32>(6_i, 7_i)); // offset
@@ -1783,7 +1790,7 @@
"textureSampleGrad(t : texture_cube_array<f32>,\n"
" s : sampler,\n"
" coords : vec3<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" ddx : vec3<f32>,\n"
" ddy : vec3<f32>) -> vec4<f32>",
TextureKind::kRegular,
@@ -1795,7 +1802,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1_f, 2_f, 3_f), // coords
- 4_i, // array_index
+ 4_u, // array_index
b->vec3<f32>(5_f, 6_f, 7_f), // ddx
b->vec3<f32>(8_f, 9_f, 10_f)); // ddy
},
@@ -1863,7 +1870,7 @@
"textureSampleCompare(t : texture_depth_2d_array,\n"
" s : sampler_comparison,\n"
" coords : vec2<f32>,\n"
- " array_index : i32,\n"
+ " array_index : u32,\n"
" depth_ref : f32,\n"
" offset : vec2<i32>) -> f32",
TextureKind::kDepth,
@@ -1875,7 +1882,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 4_i, // array_index
+ 4_u, // array_index
3_f, // depth_ref
b->vec2<i32>(5_i, 6_i)); // offset
},
@@ -1919,18 +1926,136 @@
},
},
{
+ ValidTextureOverload::kSampleCompareLevelDepth2dF32,
+ "textureSampleCompareLevel(t : texture_depth_2d,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec2<f32>,\n"
+ " depth_ref : f32) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::k2d,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec2<f32>(1_f, 2_f), // coords
+ 3_f); // depth_ref
+ },
+ },
+ {
+ ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32,
+ "textureSampleCompareLevel(t : texture_depth_2d,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec2<f32>,\n"
+ " depth_ref : f32,\n"
+ " offset : vec2<i32>) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::k2d,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec2<f32>(1_f, 2_f), // coords
+ 3_f, // depth_ref
+ b->vec2<i32>(4_i, 5_i)); // offset
+ },
+ },
+ {
+ ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32,
+ "textureSampleCompareLevel(t : texture_depth_2d_array,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec2<f32>,\n"
+ " array_index : i32,\n"
+ " depth_ref : f32) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::k2dArray,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec2<f32>(1_f, 2_f), // coords
+ 3_i, // array_index
+ 4_f); // depth_ref
+ },
+ },
+ {
+ ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32,
+ "textureSampleCompareLevel(t : texture_depth_2d_array,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec2<f32>,\n"
+ " array_index : i32,\n"
+ " depth_ref : f32,\n"
+ " offset : vec2<i32>) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::k2dArray,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec2<f32>(1_f, 2_f), // coords
+ 3_i, // array_index
+ 4_f, // depth_ref
+ b->vec2<i32>(5_i, 6_i)); // offset
+ },
+ },
+ {
+ ValidTextureOverload::kSampleCompareLevelDepthCubeF32,
+ "textureSampleCompareLevel(t : texture_depth_cube,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec3<f32>,\n"
+ " depth_ref : f32) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::kCube,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec3<f32>(1_f, 2_f, 3_f), // coords
+ 4_f); // depth_ref
+ },
+ },
+ {
+ ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32,
+ "textureSampleCompareLevel(t : texture_depth_cube_array,\n"
+ " s : sampler_comparison,\n"
+ " coords : vec3<f32>,\n"
+ " array_index : i32,\n"
+ " depth_ref : f32) -> f32",
+ TextureKind::kDepth,
+ ast::SamplerKind::kComparisonSampler,
+ ast::TextureDimension::kCubeArray,
+ TextureDataType::kF32,
+ "textureSampleCompareLevel",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ "sampler", // s
+ b->vec3<f32>(1_f, 2_f, 3_f), // coords
+ 4_i, // array_index
+ 5_f); // depth_ref
+ },
+ },
+ {
ValidTextureOverload::kLoad1dLevelF32,
"textureLoad(t : texture_1d<f32>,\n"
- " coords : i32,\n"
- " level : i32) -> vec4<f32>",
+ " coords : u32,\n"
+ " level : u32) -> vec4<f32>",
TextureKind::kRegular,
ast::TextureDimension::k1d,
TextureDataType::kF32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- 1_i, // coords
- 3_i); // level
+ 1_u, // coords
+ 3_u); // level
},
},
{
@@ -1966,16 +2091,16 @@
{
ValidTextureOverload::kLoad2dLevelF32,
"textureLoad(t : texture_2d<f32>,\n"
- " coords : vec2<i32>,\n"
- " level : i32) -> vec4<f32>",
+ " coords : vec2<u32>,\n"
+ " level : u32) -> vec4<f32>",
TextureKind::kRegular,
ast::TextureDimension::k2d,
TextureDataType::kF32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i); // level
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u); // level
},
},
{
@@ -1996,16 +2121,16 @@
{
ValidTextureOverload::kLoad2dLevelI32,
"textureLoad(t : texture_2d<i32>,\n"
- " coords : vec2<i32>,\n"
- " level : i32) -> vec4<i32>",
+ " coords : vec2<u32>,\n"
+ " level : u32) -> vec4<i32>",
TextureKind::kRegular,
ast::TextureDimension::k2d,
TextureDataType::kI32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i); // level
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u); // level
},
},
{
@@ -2045,18 +2170,18 @@
{
ValidTextureOverload::kLoad2dArrayLevelI32,
"textureLoad(t : texture_2d_array<i32>,\n"
- " coords : vec2<i32>,\n"
- " array_index : i32,\n"
- " level : i32) -> vec4<i32>",
+ " coords : vec2<u32>,\n"
+ " array_index : u32,\n"
+ " level : u32) -> vec4<i32>",
TextureKind::kRegular,
ast::TextureDimension::k2dArray,
TextureDataType::kI32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i, // array_index
- 4_i); // level
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u, // array_index
+ 4_u); // level
},
},
{
@@ -2092,16 +2217,16 @@
{
ValidTextureOverload::kLoad3dLevelI32,
"textureLoad(t : texture_3d<i32>,\n"
- " coords : vec3<i32>,\n"
- " level : i32) -> vec4<i32>",
+ " coords : vec3<u32>,\n"
+ " level : u32) -> vec4<i32>",
TextureKind::kRegular,
ast::TextureDimension::k3d,
TextureDataType::kI32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec3<i32>(1_i, 2_i, 3_i), // coords
- 4_i); // level
+ b->vec3<u32>(1_u, 2_u, 3_u), // coords
+ 4_u); // level
},
},
{
@@ -2137,16 +2262,16 @@
{
ValidTextureOverload::kLoadMultisampled2dI32,
"textureLoad(t : texture_multisampled_2d<i32>,\n"
- " coords : vec2<i32>,\n"
- " sample_index : i32) -> vec4<i32>",
+ " coords : vec2<u32>,\n"
+ " sample_index : u32) -> vec4<i32>",
TextureKind::kMultisampled,
ast::TextureDimension::k2d,
TextureDataType::kI32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i); // sample_index
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u); // sample_index
},
},
{
@@ -2167,18 +2292,33 @@
{
ValidTextureOverload::kLoadDepth2dArrayLevelF32,
"textureLoad(t : texture_depth_2d_array,\n"
- " coords : vec2<i32>,\n"
- " array_index : i32,\n"
- " level : i32) -> f32",
+ " coords : vec2<u32>,\n"
+ " array_index : u32,\n"
+ " level : u32) -> f32",
TextureKind::kDepth,
ast::TextureDimension::k2dArray,
TextureDataType::kF32,
"textureLoad",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i, // array_index
- 4_i); // level
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u, // array_index
+ 4_u); // level
+ },
+ },
+ {
+ ValidTextureOverload::kLoadDepthMultisampled2dF32,
+ "textureLoad(t : texture_depth_multisampled_2d,\n"
+ " coords : vec2<u32>,\n"
+ " sample_index : u32) -> f32",
+ TextureKind::kDepthMultisampled,
+ ast::TextureDimension::k2d,
+ TextureDataType::kF32,
+ "textureLoad",
+ [](ProgramBuilder* b) {
+ return b->ExprList("texture", // t
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u); // sample_index
},
},
{
@@ -2216,8 +2356,8 @@
{
ValidTextureOverload::kStoreWO2dArrayRgba32float,
"textureStore(t : texture_storage_2d_array<rgba32float>,\n"
- " coords : vec2<i32>,\n"
- " array_index : i32,\n"
+ " coords : vec2<u32>,\n"
+ " array_index : u32,\n"
" value : vec4<T>)",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
@@ -2226,15 +2366,15 @@
"textureStore",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec2<i32>(1_i, 2_i), // coords
- 3_i, // array_index
+ b->vec2<u32>(1_u, 2_u), // coords
+ 3_u, // array_index
b->vec4<f32>(4_f, 5_f, 6_f, 7_f)); // value
},
},
{
ValidTextureOverload::kStoreWO3dRgba32float,
"textureStore(t : texture_storage_3d<rgba32float>,\n"
- " coords : vec3<i32>,\n"
+ " coords : vec3<u32>,\n"
" value : vec4<T>)",
ast::Access::kWrite,
ast::TexelFormat::kRgba32Float,
@@ -2243,7 +2383,7 @@
"textureStore",
[](ProgramBuilder* b) {
return b->ExprList("texture", // t
- b->vec3<i32>(1_i, 2_i, 3_i), // coords
+ b->vec3<u32>(1_u, 2_u, 3_u), // coords
b->vec4<f32>(4_f, 5_f, 6_f, 7_f)); // value
},
},
diff --git a/src/tint/cmd/main.cc b/src/tint/cmd/main.cc
index 7927869..f27e643 100644
--- a/src/tint/cmd/main.cc
+++ b/src/tint/cmd/main.cc
@@ -1069,6 +1069,55 @@
m.Add<tint::transform::SubstituteOverride>();
return true;
}},
+ {"multiplaner_external_texture",
+ [](tint::inspector::Inspector& inspector, tint::transform::Manager& m,
+ tint::transform::DataMap& i) {
+ using MET = tint::transform::MultiplanarExternalTexture;
+
+ // Generate the MultiplanarExternalTexture::NewBindingPoints by finding two free
+ // binding points. We may wish to expose these binding points via a command line flag
+ // in the future.
+
+ // Set of all the group-0 bindings in use.
+ std::unordered_set<uint32_t> group0_bindings_in_use;
+ auto allocate_binding = [&] {
+ for (uint32_t idx = 0;; idx++) {
+ auto binding = tint::transform::BindingPoint{0u, idx};
+ if (group0_bindings_in_use.emplace(idx).second) {
+ return binding;
+ }
+ }
+ };
+ // Populate group0_bindings_in_use with the existing bindings across all entry points.
+ for (auto ep : inspector.GetEntryPoints()) {
+ for (auto binding : inspector.GetResourceBindings(ep.name)) {
+ if (binding.bind_group == 0) {
+ group0_bindings_in_use.emplace(binding.binding);
+ }
+ }
+ }
+ // Allocate new binding points for the external texture's planes and parameters.
+ MET::BindingsMap met_bindings;
+ for (auto ep : inspector.GetEntryPoints()) {
+ for (auto ext_tex : inspector.GetExternalTextureResourceBindings(ep.name)) {
+ auto binding = tint::transform::BindingPoint{
+ ext_tex.bind_group,
+ ext_tex.binding,
+ };
+ if (met_bindings.count(binding)) {
+ continue;
+ }
+ met_bindings.emplace(binding, MET::BindingPoints{
+ /* plane_1 */ allocate_binding(),
+ /* params */ allocate_binding(),
+ });
+ }
+ }
+
+ i.Add<MET::NewBindingPoints>(std::move(met_bindings));
+ m.Add<MET>();
+ return true;
+ }},
};
auto transform_names = [&] {
std::stringstream names;
diff --git a/src/tint/diagnostic/diagnostic.h b/src/tint/diagnostic/diagnostic.h
index de57c99..3ea8a0d 100644
--- a/src/tint/diagnostic/diagnostic.h
+++ b/src/tint/diagnostic/diagnostic.h
@@ -38,6 +38,7 @@
AST,
Clone,
Inspector,
+ IR,
Program,
ProgramBuilder,
Reader,
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_unary_operator_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_unary_operator_test.cc
index 08d94e8..8e00197 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_unary_operator_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/change_unary_operator_test.cc
@@ -203,7 +203,7 @@
ASSERT_TRUE(result.success) << result.error;
std::string expected_shader = R"(fn main() {
- let b : vec3<i32> = vec3<i32>(1, 3, -1);
+ let b : vec3<i32> = vec3<i32>(1, 3, -(1));
var comp_b : vec3<i32> = -(b);
}
)";
@@ -246,7 +246,7 @@
ASSERT_TRUE(result.success) << result.error;
std::string expected_shader = R"(fn main() {
- var a = -5;
+ var a = -(5);
var neg_a = ~(a);
}
)";
@@ -288,7 +288,7 @@
ASSERT_TRUE(result.success) << result.error;
std::string expected_shader = R"(fn main() {
- var b : vec3<i32> = vec3<i32>(1, 3, -1);
+ var b : vec3<i32> = vec3<i32>(1, 3, -(1));
let neg_b : vec3<i32> = ~(b);
}
)";
diff --git a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
index 4da9bf7..c73c1b3 100644
--- a/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
+++ b/src/tint/fuzzers/tint_ast_fuzzer/mutations/wrap_unary_operator_test.cc
@@ -260,7 +260,7 @@
ASSERT_TRUE(result.success) << result.error;
std::string expected_shader = R"(fn main() {
- var a : vec4<f32> = -(vec4<f32>(-1.0, -1.0, -1.0, -1.0));
+ var a : vec4<f32> = -(vec4<f32>(-(1.0), -(1.0), -(1.0), -(1.0)));
}
)";
ASSERT_EQ(expected_shader, result.wgsl);
@@ -345,7 +345,7 @@
ASSERT_TRUE(result.success) << result.error;
std::string expected_shader = R"(fn main() {
- var a : vec4<i32> = ~(vec4<i32>(1, 0, -1, 0));
+ var a : vec4<i32> = ~(vec4<i32>(1, 0, -(1), 0));
}
)";
ASSERT_EQ(expected_shader, result.wgsl);
diff --git a/src/tint/fuzzers/tint_common_fuzzer.cc b/src/tint/fuzzers/tint_common_fuzzer.cc
index 9e12a12..1c24f35 100644
--- a/src/tint/fuzzers/tint_common_fuzzer.cc
+++ b/src/tint/fuzzers/tint_common_fuzzer.cc
@@ -303,6 +303,11 @@
inspector::Inspector inspector(program);
diagnostics_ = program->Diagnostics();
+ if (!program->IsValid()) {
+ // It's not safe to use the inspector on invalid programs.
+ return;
+ }
+
auto entry_points = inspector.GetEntryPoints();
CHECK_INSPECTOR(program, inspector);
diff --git a/src/tint/fuzzers/transform_builder.h b/src/tint/fuzzers/transform_builder.h
index d2c0f61..5867526 100644
--- a/src/tint/fuzzers/transform_builder.h
+++ b/src/tint/fuzzers/transform_builder.h
@@ -178,7 +178,6 @@
/// @param tb - TransformBuilder to add transform to
static void impl(TransformBuilder* tb) {
transform::VertexPulling::Config cfg;
- cfg.entry_point_name = tb->builder()->build<std::string>();
cfg.vertex_state = tb->builder()->vector<transform::VertexBufferLayoutDescriptor>(
GenerateVertexBufferLayoutDescriptor);
cfg.pulling_group = tb->builder()->build<uint32_t>();
diff --git a/src/tint/inspector/inspector_test.cc b/src/tint/inspector/inspector_test.cc
index 1daec37..6f3aa93 100644
--- a/src/tint/inspector/inspector_test.cc
+++ b/src/tint/inspector/inspector_test.cc
@@ -1618,7 +1618,7 @@
auto* st_type = MakeStorageTextureTypes(ast::TextureDimension::k2d, ast::TexelFormat::kR32Uint);
AddStorageTexture("st_var", st_type, 4, 0);
- MakeStorageTextureBodyFunction("st_func", "st_var", ty.vec2<i32>(), utils::Empty);
+ MakeStorageTextureBodyFunction("st_func", "st_var", ty.vec2<u32>(), utils::Empty);
MakeCallerBodyFunction("ep_func",
utils::Vector{
@@ -2789,14 +2789,14 @@
const ast::Type* dim_type = nullptr;
switch (dim) {
case ast::TextureDimension::k1d:
- dim_type = ty.i32();
+ dim_type = ty.u32();
break;
case ast::TextureDimension::k2d:
case ast::TextureDimension::k2dArray:
- dim_type = ty.vec2<i32>();
+ dim_type = ty.vec2<u32>();
break;
case ast::TextureDimension::k3d:
- dim_type = ty.vec3<i32>();
+ dim_type = ty.vec3<u32>();
break;
default:
break;
diff --git a/src/tint/intrinsics.def b/src/tint/intrinsics.def
index ae18606..9a6bae2 100644
--- a/src/tint/intrinsics.def
+++ b/src/tint/intrinsics.def
@@ -412,19 +412,19 @@
fn acosh<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
fn all(bool) -> bool
fn all<N: num>(vec<N, bool>) -> bool
-fn any(bool) -> bool
-fn any<N: num>(vec<N, bool>) -> bool
+@const fn any(bool) -> bool
+@const fn any<N: num>(vec<N, bool>) -> bool
fn arrayLength<T, A: access>(ptr<storage, array<T>, A>) -> u32
-fn asin<T: f32_f16>(T) -> T
-fn asin<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
-fn asinh<T: f32_f16>(T) -> T
-fn asinh<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
-fn atan<T: f32_f16>(T) -> T
-fn atan<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
+@const fn asin<T: fa_f32_f16>(@test_value(0.479425538604) T) -> T
+@const fn asin<N: num, T: fa_f32_f16>(@test_value(0.479425538604) vec<N, T>) -> vec<N, T>
+@const fn asinh<T: fa_f32_f16>(T) -> T
+@const fn asinh<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
+@const fn atan<T: fa_f32_f16>(T) -> T
+@const fn atan<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
@const fn atan2<T: fa_f32_f16>(T, T) -> T
@const fn atan2<T: fa_f32_f16, N: num>(vec<N, T>, vec<N, T>) -> vec<N, T>
-fn atanh<T: f32_f16>(T) -> T
-fn atanh<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
+@const fn atanh<T: fa_f32_f16>(@test_value(0.5) T) -> T
+@const fn atanh<N: num, T: fa_f32_f16>(@test_value(0.5) vec<N, T>) -> vec<N, T>
fn ceil<T: f32_f16>(T) -> T
fn ceil<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
@const fn clamp<T: fia_fiu32_f16>(T, T, T) -> T
@@ -433,12 +433,12 @@
fn cos<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
fn cosh<T: f32_f16>(T) -> T
fn cosh<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
-fn countLeadingZeros<T: iu32>(T) -> T
-fn countLeadingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
-fn countOneBits<T: iu32>(T) -> T
-fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
-fn countTrailingZeros<T: iu32>(T) -> T
-fn countTrailingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+@const fn countLeadingZeros<T: iu32>(T) -> T
+@const fn countLeadingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+@const fn countOneBits<T: iu32>(T) -> T
+@const fn countOneBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+@const fn countTrailingZeros<T: iu32>(T) -> T
+@const fn countTrailingZeros<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
fn cross<T: f32_f16>(vec3<T>, vec3<T>) -> vec3<T>
fn degrees<T: f32_f16>(T) -> T
fn degrees<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
@@ -467,10 +467,10 @@
fn extractBits<T: iu32>(T, u32, u32) -> T
fn extractBits<N: num, T: iu32>(vec<N, T>, u32, u32) -> vec<N, T>
fn faceForward<N: num, T: f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
-fn firstLeadingBit<T: iu32>(T) -> T
-fn firstLeadingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
-fn firstTrailingBit<T: iu32>(T) -> T
-fn firstTrailingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+@const fn firstLeadingBit<T: iu32>(T) -> T
+@const fn firstLeadingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
+@const fn firstTrailingBit<T: iu32>(T) -> T
+@const fn firstTrailingBit<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
fn floor<T: f32_f16>(T) -> T
fn floor<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
fn fma<T: f32_f16>(T, T, T) -> T
@@ -522,13 +522,13 @@
fn reverseBits<N: num, T: iu32>(vec<N, T>) -> vec<N, T>
fn round<T: f32_f16>(T) -> T
fn round<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
-fn saturate<T: f32_f16>(T) -> T
-fn saturate<T: f32_f16, N: num>(vec<N, T>) -> vec<N, T>
+@const fn saturate<T: fa_f32_f16>(@test_value(2) T) -> T
+@const fn saturate<T: fa_f32_f16, N: num>(@test_value(2) vec<N, T>) -> vec<N, T>
@const("select_bool") fn select<T: scalar>(T, T, bool) -> T
@const("select_bool") fn select<T: scalar, N: num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T>
@const("select_boolvec") fn select<N: num, T: scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T>
-fn sign<T: f32_f16>(T) -> T
-fn sign<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
+@const fn sign<T: fa_f32_f16>(T) -> T
+@const fn sign<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
fn sin<T: f32_f16>(T) -> T
fn sin<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
fn sinh<T: f32_f16>(T) -> T
@@ -537,8 +537,8 @@
fn smoothstep<N: num, T: f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T>
fn sqrt<T: f32_f16>(T) -> T
fn sqrt<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
-fn step<T: f32_f16>(T, T) -> T
-fn step<N: num, T: f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
+@const fn step<T: fa_f32_f16>(T, T) -> T
+@const fn step<N: num, T: fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T>
@stage("compute") fn storageBarrier()
fn tan<T: f32_f16>(T) -> T
fn tan<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
@@ -554,149 +554,149 @@
fn unpack4x8unorm(u32) -> vec4<f32>
@stage("compute") fn workgroupBarrier()
-fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> i32
-fn textureDimensions<T: fiu32>(texture: texture_1d<T>, level: i32) -> i32
-fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<i32>
-fn textureDimensions<T: fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32>
-fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> i32
-fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> vec2<i32>
-fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_3d<F, A>) -> vec3<i32>
-fn textureDimensions(texture: texture_external) -> vec2<i32>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<T>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
-fn textureGather<T: fiu32>(@const component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T>
+fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> u32
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_1d<T>, level: L) -> u32
+fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<u32>
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d<T>, level: L) -> vec2<u32>
+fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<u32>
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d_array<T>, level: L) -> vec2<u32>
+fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<u32>
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_3d<T>, level: L) -> vec3<u32>
+fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<u32>
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube<T>, level: L) -> vec2<u32>
+fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<u32>
+fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube_array<T>, level: L) -> vec2<u32>
+fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32>
+fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
+fn textureDimensions<L: iu32>(texture: texture_depth_2d, level: L) -> vec2<u32>
+fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
+fn textureDimensions<L: iu32>(texture: texture_depth_2d_array, level: L) -> vec2<u32>
+fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
+fn textureDimensions<L: iu32>(texture: texture_depth_cube, level: L) -> vec2<u32>
+fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
+fn textureDimensions<L: iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32>
+fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
+fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> u32
+fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<u32>
+fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> vec2<u32>
+fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_3d<F, A>) -> vec3<u32>
+fn textureDimensions(texture: texture_external) -> vec2<u32>
+fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T>
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
-fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
+fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
+fn textureGather<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
-fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
-fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> i32
-fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> i32
-fn textureNumLayers(texture: texture_depth_2d_array) -> i32
-fn textureNumLayers(texture: texture_depth_cube_array) -> i32
-fn textureNumLayers<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> i32
-fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> i32
-fn textureNumLevels(texture: texture_depth_2d) -> i32
-fn textureNumLevels(texture: texture_depth_2d_array) -> i32
-fn textureNumLevels(texture: texture_depth_cube) -> i32
-fn textureNumLevels(texture: texture_depth_cube_array) -> i32
-fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> i32
-fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
+fn textureGatherCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
+fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> u32
+fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> u32
+fn textureNumLayers(texture: texture_depth_2d_array) -> u32
+fn textureNumLayers(texture: texture_depth_cube_array) -> u32
+fn textureNumLayers<F: texel_format, A: write>(texture: texture_storage_2d_array<F, A>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_1d<T>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_2d<T>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_2d_array<T>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_3d<T>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_cube<T>) -> u32
+fn textureNumLevels<T: fiu32>(texture: texture_cube_array<T>) -> u32
+fn textureNumLevels(texture: texture_depth_2d) -> u32
+fn textureNumLevels(texture: texture_depth_2d_array) -> u32
+fn textureNumLevels(texture: texture_depth_cube) -> u32
+fn textureNumLevels(texture: texture_depth_cube_array) -> u32
+fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> u32
+fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32
@stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
-@stage("fragment") fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
-@stage("fragment") fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32>
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
-@stage("fragment") fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
-@stage("fragment") fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32
-@stage("fragment") fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> f32
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
-@stage("fragment") fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32
+@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
-@stage("fragment") fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32>
-@stage("fragment") fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
+@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32>
+@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32>
@stage("fragment") fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
-@stage("fragment") fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32>
+@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32>
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
-@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
-@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
+@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
@stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-@stage("fragment") fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
+@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
+fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
-fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
-fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32>
+fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32>
fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32>
-fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, @const offset: vec2<i32>) -> f32
-fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, @const offset: vec2<i32>) -> f32
-fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32
-fn textureSampleLevel(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32
+fn textureSampleLevel<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32>
+fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32
+fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32
+fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel<L: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32
+fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32
@deprecated fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
-fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>)
-fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>)
-fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
-fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>)
-fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>)
-fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>)
-fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
-fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>)
-fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>)
-fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>)
-fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
+fn textureStore<C: iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>)
+fn textureStore<C: iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>)
+fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>)
+fn textureStore<C: iu32>(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<C>, value: vec4<f32>)
+fn textureStore<C: iu32>(texture: texture_storage_1d<i32_texel_format, write>, coords: C, value: vec4<i32>)
+fn textureStore<C: iu32>(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<C>, value: vec4<i32>)
+fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<i32>)
+fn textureStore<C: iu32>(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<C>, value: vec4<i32>)
+fn textureStore<C: iu32>(texture: texture_storage_1d<u32_texel_format, write>, coords: C, value: vec4<u32>)
+fn textureStore<C: iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>)
+fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<u32>)
fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
-fn textureLoad<T: fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T>
-fn textureLoad<T: fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T>
-fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
-fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32
-fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32
-fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32, A: iu32, L: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32, S: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T>
+fn textureLoad<C: iu32, L: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32
+fn textureLoad<C: iu32, A: iu32, L: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32
+fn textureLoad<C: iu32, S: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32
+fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32>
@stage("fragment", "compute") fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
@stage("fragment", "compute") fn atomicStore<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T)
@@ -739,9 +739,9 @@
@const("Identity") init f32(f32) -> f32
@const("Identity") init f16(f16) -> f16
@const("Identity") init bool(bool) -> bool
-@const("Identity") init vec2<T: concrete_scalar>(vec2<T>) -> vec2<T>
-@const("Identity") init vec3<T: concrete_scalar>(vec3<T>) -> vec3<T>
-@const("Identity") init vec4<T: concrete_scalar>(vec4<T>) -> vec4<T>
+@const("Identity") init vec2<T: scalar>(vec2<T>) -> vec2<T>
+@const("Identity") init vec3<T: scalar>(vec3<T>) -> vec3<T>
+@const("Identity") init vec4<T: scalar>(vec4<T>) -> vec4<T>
@const("Identity") init mat2x2<T: f32_f16>(mat2x2<T>) -> mat2x2<T>
@const("Identity") init mat2x3<T: f32_f16>(mat2x3<T>) -> mat2x3<T>
@const("Identity") init mat2x4<T: f32_f16>(mat2x4<T>) -> mat2x4<T>
@@ -972,8 +972,8 @@
@const op << <T: iu32>(T, u32) -> T
@const op << <T: iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T>
-@const op << <T: ia>(T, ia) -> T
-@const op << <T: ia, N: num> (vec<N, T>, vec<N, ia>) -> vec<N, T>
+@const op << <T: ia>(T, u32) -> T
+@const op << <T: ia, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T>
op >> <T: iu32>(T, u32) -> T
op >> <T: iu32, N: num> (vec<N, T>, vec<N, u32>) -> vec<N, T>
diff --git a/src/tint/ir/block.cc b/src/tint/ir/block.cc
new file mode 100644
index 0000000..2030c19
--- /dev/null
+++ b/src/tint/ir/block.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/block.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::Block);
+
+namespace tint::ir {
+
+Block::Block() : Base() {}
+
+Block::~Block() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/block.h b/src/tint/ir/block.h
new file mode 100644
index 0000000..022aff2
--- /dev/null
+++ b/src/tint/ir/block.h
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_BLOCK_H_
+#define SRC_TINT_IR_BLOCK_H_
+
+#include "src/tint/ir/flow_node.h"
+
+namespace tint::ir {
+
+/// A flow node comprising a block of statements. The instructions in the block are a linear list of
+/// instructions to execute. The block will branch at the end. The only blocks which do not branch
+/// are the end blocks of functions.
+class Block : public Castable<Block, FlowNode> {
+ public:
+ /// Constructor
+ Block();
+ ~Block() override;
+
+ /// The node this block branches too.
+ const FlowNode* branch_target = nullptr;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_BLOCK_H_
diff --git a/src/tint/ir/builder.cc b/src/tint/ir/builder.cc
new file mode 100644
index 0000000..66b195b
--- /dev/null
+++ b/src/tint/ir/builder.cc
@@ -0,0 +1,73 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/builder.h"
+
+#include <utility>
+
+#include "src/tint/ir/builder_impl.h"
+#include "src/tint/program.h"
+
+namespace tint::ir {
+
+Builder::Builder(const Program* prog) : ir(prog) {}
+
+Builder::Builder(Module&& mod) : ir(std::move(mod)) {}
+
+Builder::~Builder() = default;
+
+Block* Builder::CreateBlock() {
+ return ir.flow_nodes.Create<Block>();
+}
+
+Terminator* Builder::CreateTerminator() {
+ return ir.flow_nodes.Create<Terminator>();
+}
+
+Function* Builder::CreateFunction(const ast::Function* ast_func) {
+ auto* ir_func = ir.flow_nodes.Create<Function>(ast_func);
+ ir_func->start_target = CreateBlock();
+ ir_func->end_target = CreateTerminator();
+ return ir_func;
+}
+
+If* Builder::CreateIf(const ast::Statement* stmt, IfFlags flags) {
+ auto* ir_if = ir.flow_nodes.Create<If>(stmt);
+ ir_if->false_target = CreateBlock();
+ ir_if->true_target = CreateBlock();
+
+ if (flags == IfFlags::kCreateMerge) {
+ ir_if->merge_target = CreateBlock();
+ } else {
+ ir_if->merge_target = nullptr;
+ }
+ return ir_if;
+}
+
+Loop* Builder::CreateLoop(const ast::LoopStatement* stmt) {
+ auto* ir_loop = ir.flow_nodes.Create<Loop>(stmt);
+ ir_loop->start_target = CreateBlock();
+ ir_loop->continuing_target = CreateBlock();
+ ir_loop->merge_target = CreateBlock();
+
+ return ir_loop;
+}
+
+void Builder::Branch(Block* from, const FlowNode* to) {
+ TINT_ASSERT(IR, from);
+ TINT_ASSERT(IR, to);
+ from->branch_target = to;
+}
+
+} // namespace tint::ir
diff --git a/src/tint/ir/builder.h b/src/tint/ir/builder.h
new file mode 100644
index 0000000..531bcce
--- /dev/null
+++ b/src/tint/ir/builder.h
@@ -0,0 +1,86 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_BUILDER_H_
+#define SRC_TINT_IR_BUILDER_H_
+
+#include "src/tint/ir/function.h"
+#include "src/tint/ir/if.h"
+#include "src/tint/ir/loop.h"
+#include "src/tint/ir/module.h"
+#include "src/tint/ir/switch.h"
+#include "src/tint/ir/terminator.h"
+
+// Forward Declarations
+namespace tint {
+class Program;
+} // namespace tint
+
+namespace tint::ir {
+
+/// Builds an ir::Module from a given Program
+class Builder {
+ public:
+ /// Constructor
+ /// @param prog the program this ir is associated with
+ explicit Builder(const Program* prog);
+ /// Constructor
+ /// @param mod the ir::Module to wrap with this builder
+ explicit Builder(Module&& mod);
+ /// Destructor
+ ~Builder();
+
+ /// @returns a new block flow node
+ Block* CreateBlock();
+
+ /// @returns a new terminator flow node
+ Terminator* CreateTerminator();
+
+ /// Creates a function flow node for the given ast::Function
+ /// @param func the ast::Function
+ /// @returns the flow node
+ Function* CreateFunction(const ast::Function* func);
+
+ /// Flags used for creation of if flow nodes
+ enum class IfFlags {
+ /// Do not create a merge node, `merge_target` will be `nullptr`
+ kSkipMerge,
+ /// Create the `merge_target` block
+ kCreateMerge,
+ };
+
+ /// Creates an if flow node for the given ast::IfStatement or ast::BreakIfStatement
+ /// @param stmt the ast::IfStatement or ast::BreakIfStatement
+ /// @param flags the if creation flags. By default the merge block will not be created, pass
+ /// IfFlags::kCreateMerge if creation is desired.
+ /// @returns the flow node
+ If* CreateIf(const ast::Statement* stmt, IfFlags flags = IfFlags::kSkipMerge);
+
+ /// Creates a loop flow node for the given ast::LoopStatement
+ /// @param stmt the ast::LoopStatement
+ /// @returns the flow node
+ Loop* CreateLoop(const ast::LoopStatement* stmt);
+
+ /// Branches the given block to the given flow node.
+ /// @param from the block to branch from
+ /// @param to the node to branch too
+ void Branch(Block* from, const FlowNode* to);
+
+ /// The IR module.
+ Module ir;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_BUILDER_H_
diff --git a/src/tint/ir/builder_impl.cc b/src/tint/ir/builder_impl.cc
new file mode 100644
index 0000000..5f7553f
--- /dev/null
+++ b/src/tint/ir/builder_impl.cc
@@ -0,0 +1,372 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/builder_impl.h"
+
+#include "src/tint/ast/alias.h"
+#include "src/tint/ast/block_statement.h"
+#include "src/tint/ast/break_if_statement.h"
+#include "src/tint/ast/break_statement.h"
+#include "src/tint/ast/continue_statement.h"
+#include "src/tint/ast/function.h"
+#include "src/tint/ast/if_statement.h"
+#include "src/tint/ast/return_statement.h"
+#include "src/tint/ast/statement.h"
+#include "src/tint/ast/static_assert.h"
+#include "src/tint/ir/function.h"
+#include "src/tint/ir/if.h"
+#include "src/tint/ir/loop.h"
+#include "src/tint/ir/module.h"
+#include "src/tint/ir/switch.h"
+#include "src/tint/ir/terminator.h"
+#include "src/tint/program.h"
+#include "src/tint/sem/module.h"
+
+namespace tint::ir {
+namespace {
+
+using ResultType = utils::Result<Module>;
+
+class FlowStackScope {
+ public:
+ FlowStackScope(BuilderImpl* impl, FlowNode* node) : impl_(impl) {
+ impl_->flow_stack.Push(node);
+ }
+
+ ~FlowStackScope() { impl_->flow_stack.Pop(); }
+
+ private:
+ BuilderImpl* impl_;
+};
+
+} // namespace
+
+BuilderImpl::BuilderImpl(const Program* program) : builder_(program) {}
+
+BuilderImpl::~BuilderImpl() = default;
+
+void BuilderImpl::BranchTo(const FlowNode* node) {
+ TINT_ASSERT(IR, current_flow_block_);
+ TINT_ASSERT(IR, !current_flow_block_->branch_target);
+
+ builder_.Branch(current_flow_block_, node);
+ current_flow_block_->branch_target = node;
+ current_flow_block_ = nullptr;
+}
+
+void BuilderImpl::BranchToIfNeeded(const FlowNode* node) {
+ if (!current_flow_block_ || current_flow_block_->branch_target) {
+ return;
+ }
+ BranchTo(node);
+}
+
+FlowNode* BuilderImpl::FindEnclosingControl(ControlFlags flags) {
+ for (auto it = flow_stack.rbegin(); it != flow_stack.rend(); ++it) {
+ if ((*it)->Is<Loop>()) {
+ return *it;
+ }
+ if (flags == ControlFlags::kExcludeSwitch) {
+ continue;
+ }
+ if ((*it)->Is<Switch>()) {
+ return *it;
+ }
+ }
+ return nullptr;
+}
+
+ResultType BuilderImpl::Build() {
+ auto* sem = builder_.ir.program->Sem().Module();
+
+ for (auto* decl : sem->DependencyOrderedDeclarations()) {
+ bool ok = tint::Switch(
+ decl, //
+ // [&](const ast::Struct* str) {
+ // return false;
+ // },
+ [&](const ast::Alias*) {
+ // Folded away and doesn't appear in the IR.
+ return true;
+ },
+ // [&](const ast::Const*) {
+ // return false;
+ // },
+ // [&](const ast::Override*) {
+ // return false;
+ // },
+ [&](const ast::Function* func) { return EmitFunction(func); },
+ // [&](const ast::Enable*) {
+ // return false;
+ // },
+ [&](const ast::StaticAssert*) {
+ // Evaluated by the resolver, drop from the IR.
+ return true;
+ },
+ [&](Default) {
+ TINT_ICE(IR, diagnostics_) << "unhandled type: " << decl->TypeInfo().name;
+ return false;
+ });
+ if (!ok) {
+ return utils::Failure;
+ }
+ }
+
+ return ResultType{std::move(builder_.ir)};
+}
+
+bool BuilderImpl::EmitFunction(const ast::Function* ast_func) {
+ // The flow stack should have been emptied when the previous function finshed building.
+ TINT_ASSERT(IR, flow_stack.IsEmpty());
+
+ auto* ir_func = builder_.CreateFunction(ast_func);
+ current_function_ = ir_func;
+ builder_.ir.functions.Push(ir_func);
+
+ ast_to_flow_[ast_func] = ir_func;
+
+ if (ast_func->IsEntryPoint()) {
+ builder_.ir.entry_points.Push(ir_func);
+ }
+
+ {
+ FlowStackScope scope(this, ir_func);
+
+ current_flow_block_ = ir_func->start_target;
+ if (!EmitStatements(ast_func->body->statements)) {
+ return false;
+ }
+
+ // If the branch target has already been set then a `return` was called. Only set in the
+ // case where `return` wasn't called.
+ BranchToIfNeeded(current_function_->end_target);
+ }
+
+ TINT_ASSERT(IR, flow_stack.IsEmpty());
+ current_flow_block_ = nullptr;
+ current_function_ = nullptr;
+
+ return true;
+}
+
+bool BuilderImpl::EmitStatements(utils::VectorRef<const ast::Statement*> stmts) {
+ for (auto* s : stmts) {
+ if (!EmitStatement(s)) {
+ return false;
+ }
+
+ // If the current flow block has a branch target then the rest of the statements in this
+ // block are dead code. Skip them.
+ if (!current_flow_block_ || current_flow_block_->branch_target) {
+ break;
+ }
+ }
+ return true;
+}
+
+bool BuilderImpl::EmitStatement(const ast::Statement* stmt) {
+ return tint::Switch(
+ stmt,
+ // [&](const ast::AssignmentStatement* a) { },
+ [&](const ast::BlockStatement* b) { return EmitBlock(b); },
+ [&](const ast::BreakStatement* b) { return EmitBreak(b); },
+ [&](const ast::BreakIfStatement* b) { return EmitBreakIf(b); },
+ // [&](const ast::CallStatement* c) { },
+ [&](const ast::ContinueStatement* c) { return EmitContinue(c); },
+ // [&](const ast::DiscardStatement* d) { },
+ // [&](const ast::FallthroughStatement*) { },
+ [&](const ast::IfStatement* i) { return EmitIf(i); },
+ [&](const ast::LoopStatement* l) { return EmitLoop(l); },
+ // [&](const ast::ForLoopStatement* l) { },
+ // [&](const ast::WhileStatement* l) { },
+ [&](const ast::ReturnStatement* r) { return EmitReturn(r); },
+ // [&](const ast::SwitchStatement* s) { },
+ // [&](const ast::VariableDeclStatement* v) { },
+ [&](const ast::StaticAssert*) {
+ return true; // Not emitted
+ },
+ [&](Default) {
+ TINT_ICE(IR, diagnostics_)
+ << "unknown statement type: " << std::string(stmt->TypeInfo().name);
+ return false;
+ });
+}
+
+bool BuilderImpl::EmitBlock(const ast::BlockStatement* block) {
+ // Note, this doesn't need to emit a Block as the current block flow node should be
+ // sufficient as the blocks all get flattened. Each flow control node will inject the basic
+ // blocks it requires.
+ return EmitStatements(block->statements);
+}
+
+bool BuilderImpl::EmitIf(const ast::IfStatement* stmt) {
+ auto* if_node = builder_.CreateIf(stmt);
+
+ // TODO(dsinclair): Emit the condition expression into the current block
+
+ BranchTo(if_node);
+
+ ast_to_flow_[stmt] = if_node;
+
+ {
+ FlowStackScope scope(this, if_node);
+
+ // TODO(dsinclair): set if condition register into if flow node
+
+ current_flow_block_ = if_node->true_target;
+ if (!EmitStatement(stmt->body)) {
+ return false;
+ }
+
+ current_flow_block_ = if_node->false_target;
+ if (stmt->else_statement && !EmitStatement(stmt->else_statement)) {
+ return false;
+ }
+ }
+ current_flow_block_ = nullptr;
+
+ // If both branches went somewhere, then they both returned, continued or broke. So,
+ // there is no need for the if merge-block and there is nothing to branch to the merge
+ // block anyway.
+ if (if_node->true_target->branch_target && if_node->false_target->branch_target) {
+ return true;
+ }
+
+ if_node->merge_target = builder_.CreateBlock();
+ current_flow_block_ = if_node->merge_target;
+
+ // If the true branch did not execute control flow, then go to the merge target
+ if (!if_node->true_target->branch_target) {
+ if_node->true_target->branch_target = if_node->merge_target;
+ }
+ // If the false branch did not execute control flow, then go to the merge target
+ if (!if_node->false_target->branch_target) {
+ if_node->false_target->branch_target = if_node->merge_target;
+ }
+
+ return true;
+}
+
+bool BuilderImpl::EmitLoop(const ast::LoopStatement* stmt) {
+ auto* loop_node = builder_.CreateLoop(stmt);
+
+ BranchTo(loop_node);
+
+ ast_to_flow_[stmt] = loop_node;
+
+ {
+ FlowStackScope scope(this, loop_node);
+
+ current_flow_block_ = loop_node->start_target;
+ if (!EmitStatement(stmt->body)) {
+ return false;
+ }
+
+ // The current block didn't `break`, `return` or `continue`, go to the continuing block.
+ BranchToIfNeeded(loop_node->continuing_target);
+
+ current_flow_block_ = loop_node->continuing_target;
+ if (stmt->continuing) {
+ if (!EmitStatement(stmt->continuing)) {
+ return false;
+ }
+ }
+
+ // Branch back to the start node if the continue target didn't branch out already
+ BranchToIfNeeded(loop_node->start_target);
+ }
+
+ current_flow_block_ = loop_node->merge_target;
+ return true;
+}
+
+bool BuilderImpl::EmitReturn(const ast::ReturnStatement*) {
+ // TODO(dsinclair): Emit the return value ....
+
+ BranchTo(current_function_->end_target);
+
+ // TODO(dsinclair): The BranchTo will reset the current block. What happens with dead code
+ // after the return?
+
+ return true;
+}
+
+bool BuilderImpl::EmitBreak(const ast::BreakStatement*) {
+ auto* current_control = FindEnclosingControl(ControlFlags::kNone);
+ TINT_ASSERT(IR, current_control);
+
+ if (auto* c = current_control->As<Loop>()) {
+ BranchTo(c->merge_target);
+ } else if (auto* s = current_control->As<Switch>()) {
+ BranchTo(s->merge_target);
+ } else {
+ TINT_UNREACHABLE(IR, diagnostics_);
+ return false;
+ }
+
+ // TODO(dsinclair): The BranchTo will reset the current block. What happens with dead code
+ // after the break?
+ return true;
+}
+
+bool BuilderImpl::EmitContinue(const ast::ContinueStatement*) {
+ auto* current_control = FindEnclosingControl(ControlFlags::kExcludeSwitch);
+ TINT_ASSERT(IR, current_control);
+
+ if (auto* c = current_control->As<Loop>()) {
+ BranchTo(c->continuing_target);
+ } else {
+ TINT_UNREACHABLE(IR, diagnostics_);
+ }
+
+ // TODO(dsinclair): The BranchTo will reset the current block. What happens with dead code
+ // after the continue?
+
+ return true;
+}
+
+bool BuilderImpl::EmitBreakIf(const ast::BreakIfStatement* stmt) {
+ auto* if_node = builder_.CreateIf(stmt, Builder::IfFlags::kCreateMerge);
+
+ // TODO(dsinclair): Emit the condition expression into the current block
+
+ BranchTo(if_node);
+
+ ast_to_flow_[stmt] = if_node;
+
+ auto* current_control = FindEnclosingControl(ControlFlags::kExcludeSwitch);
+ TINT_ASSERT(IR, current_control);
+ TINT_ASSERT(IR, current_control->Is<Loop>());
+
+ auto* loop = current_control->As<Loop>();
+
+ // TODO(dsinclair): set if condition register into if flow node
+
+ current_flow_block_ = if_node->true_target;
+ BranchTo(loop->merge_target);
+
+ current_flow_block_ = if_node->false_target;
+ BranchTo(if_node->merge_target);
+
+ current_flow_block_ = if_node->merge_target;
+
+ // The `break-if` has to be the last item in the continuing block. The false branch of the
+ // `break-if` will always take us back to the start of the loop.
+ // break then we go back to the start of the loop.
+ BranchTo(loop->start_target);
+
+ return true;
+}
+
+} // namespace tint::ir
diff --git a/src/tint/ir/builder_impl.h b/src/tint/ir/builder_impl.h
new file mode 100644
index 0000000..8daeebc
--- /dev/null
+++ b/src/tint/ir/builder_impl.h
@@ -0,0 +1,155 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_BUILDER_IMPL_H_
+#define SRC_TINT_IR_BUILDER_IMPL_H_
+
+#include <string>
+#include <unordered_map>
+#include <utility>
+
+#include "src/tint/diagnostic/diagnostic.h"
+#include "src/tint/ir/builder.h"
+#include "src/tint/ir/flow_node.h"
+#include "src/tint/ir/module.h"
+#include "src/tint/utils/result.h"
+
+// Forward Declarations
+namespace tint {
+class Program;
+} // namespace tint
+namespace tint::ast {
+class BlockStatement;
+class BreakIfStatement;
+class BreakStatement;
+class ContinueStatement;
+class Function;
+class IfStatement;
+class LoopStatement;
+class ReturnStatement;
+class Statement;
+} // namespace tint::ast
+namespace tint::ir {
+class Block;
+class If;
+class Function;
+class Loop;
+class Switch;
+class Terminator;
+} // namespace tint::ir
+
+namespace tint::ir {
+
+/// Builds an ir::Module from a given ast::Program
+class BuilderImpl {
+ public:
+ /// Constructor
+ /// @param program the program to create from
+ explicit BuilderImpl(const Program* program);
+ /// Destructor
+ ~BuilderImpl();
+
+ /// Builds an ir::Module from the given Program
+ /// @returns true on success, false otherwise
+ utils::Result<Module> Build();
+
+ /// @returns the error
+ std::string error() const { return diagnostics_.str(); }
+
+ /// Emits a function to the IR.
+ /// @param func the function to emit
+ /// @returns true if successful, false otherwise
+ bool EmitFunction(const ast::Function* func);
+
+ /// Emits a set of statements to the IR.
+ /// @param stmts the statements to emit
+ /// @returns true if successful, false otherwise.
+ bool EmitStatements(utils::VectorRef<const ast::Statement*> stmts);
+
+ /// Emits a statement to the IR
+ /// @param stmt the statment to emit
+ /// @returns true on success, false otherwise.
+ bool EmitStatement(const ast::Statement* stmt);
+
+ /// Emits a block statement to the IR.
+ /// @param block the block to emit
+ /// @returns true if successful, false otherwise.
+ bool EmitBlock(const ast::BlockStatement* block);
+
+ /// Emits an if control node to the IR.
+ /// @param stmt the if statement
+ /// @returns true if successful, false otherwise.
+ bool EmitIf(const ast::IfStatement* stmt);
+
+ /// Emits a return node to the IR.
+ /// @param stmt the return AST statement
+ /// @returns true if successful, false otherwise.
+ bool EmitReturn(const ast::ReturnStatement* stmt);
+
+ /// Emits a loop control node to the IR.
+ /// @param stmt the loop statement
+ /// @returns true if successful, false otherwise.
+ bool EmitLoop(const ast::LoopStatement* stmt);
+
+ /// Emits a break statement
+ /// @param stmt the break statement
+ /// @returns true if successfull, false otherwise.
+ bool EmitBreak(const ast::BreakStatement* stmt);
+
+ /// Emits a continue statement
+ /// @param stmt the continue statement
+ /// @returns true if successfull, false otherwise.
+ bool EmitContinue(const ast::ContinueStatement* stmt);
+
+ /// Emits a break-if statement
+ /// @param stmt the break-if statement
+ /// @returns true if successfull, false otherwise.
+ bool EmitBreakIf(const ast::BreakIfStatement* stmt);
+
+ /// Retrieve the IR Flow node for a given AST node.
+ /// @param n the node to lookup
+ /// @returns the FlowNode for the given ast::Node or nullptr if it doesn't exist.
+ const ir::FlowNode* FlowNodeForAstNode(const ast::Node* n) const {
+ if (ast_to_flow_.count(n) == 0) {
+ return nullptr;
+ }
+ return ast_to_flow_.at(n);
+ }
+
+ /// The stack of flow control blocks.
+ utils::Vector<FlowNode*, 8> flow_stack;
+
+ private:
+ enum class ControlFlags { kNone, kExcludeSwitch };
+
+ void BranchTo(const ir::FlowNode* node);
+ void BranchToIfNeeded(const ir::FlowNode* node);
+
+ FlowNode* FindEnclosingControl(ControlFlags flags);
+
+ Builder builder_;
+
+ diag::List diagnostics_;
+
+ Block* current_flow_block_ = nullptr;
+ Function* current_function_ = nullptr;
+
+ /// Map from ast nodes to flow nodes, used to retrieve the flow node for a given AST node.
+ /// Used for testing purposes.
+ std::unordered_map<const ast::Node*, const FlowNode*> ast_to_flow_;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_BUILDER_IMPL_H_
diff --git a/src/tint/ir/builder_impl_test.cc b/src/tint/ir/builder_impl_test.cc
new file mode 100644
index 0000000..fa37ac5
--- /dev/null
+++ b/src/tint/ir/builder_impl_test.cc
@@ -0,0 +1,582 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/test_helper.h"
+
+namespace tint::ir {
+namespace {
+
+using IRBuilderImplTest = TestHelper;
+
+TEST_F(IRBuilderImplTest, Func) {
+ // func -> start -> end
+
+ Func("f", utils::Empty, ty.void_(), utils::Empty);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ ASSERT_EQ(0u, m.entry_points.Length());
+ ASSERT_EQ(1u, m.functions.Length());
+
+ auto* f = m.functions[0];
+ EXPECT_NE(f->start_target, nullptr);
+ EXPECT_NE(f->end_target, nullptr);
+
+ EXPECT_EQ(f->start_target->branch_target, f->end_target);
+}
+
+TEST_F(IRBuilderImplTest, EntryPoint) {
+ Func("f", utils::Empty, ty.void_(), utils::Empty,
+ utils::Vector{Stage(ast::PipelineStage::kFragment)});
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ ASSERT_EQ(1u, m.entry_points.Length());
+ EXPECT_EQ(m.functions[0], m.entry_points[0]);
+}
+
+TEST_F(IRBuilderImplTest, IfStatement) {
+ // func -> start -> if -> true block
+ // -> false block
+ //
+ // [true block] -> if merge
+ // [false block] -> if merge
+ // [if merge] -> func end
+ //
+ auto* ast_if = If(true, Block(), Else(Block()));
+ WrapInFunction(ast_if);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ EXPECT_TRUE(ir_if->Is<ir::If>());
+
+ // TODO(dsinclair): check condition
+
+ auto* flow = ir_if->As<ir::If>();
+ ASSERT_NE(flow->true_target, nullptr);
+ ASSERT_NE(flow->false_target, nullptr);
+ ASSERT_NE(flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, flow);
+ EXPECT_EQ(flow->true_target->branch_target, flow->merge_target);
+ EXPECT_EQ(flow->false_target->branch_target, flow->merge_target);
+ EXPECT_EQ(flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, IfStatement_TrueReturns) {
+ // func -> start -> if -> true block
+ // -> false block
+ //
+ // [true block] -> func end
+ // [false block] -> if merge
+ // [if merge] -> func end
+ //
+ auto* ast_if = If(true, Block(Return()));
+ WrapInFunction(ast_if);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ EXPECT_TRUE(ir_if->Is<ir::If>());
+
+ auto* flow = ir_if->As<ir::If>();
+ ASSERT_NE(flow->true_target, nullptr);
+ ASSERT_NE(flow->false_target, nullptr);
+ ASSERT_NE(flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, flow);
+ EXPECT_EQ(flow->true_target->branch_target, func->end_target);
+ EXPECT_EQ(flow->false_target->branch_target, flow->merge_target);
+ EXPECT_EQ(flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, IfStatement_FalseReturns) {
+ // func -> start -> if -> true block
+ // -> false block
+ //
+ // [true block] -> if merge
+ // [false block] -> func end
+ // [if merge] -> func end
+ //
+ auto* ast_if = If(true, Block(), Else(Block(Return())));
+ WrapInFunction(ast_if);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ EXPECT_TRUE(ir_if->Is<ir::If>());
+
+ auto* flow = ir_if->As<ir::If>();
+ ASSERT_NE(flow->true_target, nullptr);
+ ASSERT_NE(flow->false_target, nullptr);
+ ASSERT_NE(flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, flow);
+ EXPECT_EQ(flow->true_target->branch_target, flow->merge_target);
+ EXPECT_EQ(flow->false_target->branch_target, func->end_target);
+ EXPECT_EQ(flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, IfStatement_BothReturn) {
+ // func -> start -> if -> true block
+ // -> false block
+ //
+ // [true block] -> func end
+ // [false block] -> func end
+ // [if merge] -> nullptr
+ //
+ auto* ast_if = If(true, Block(Return()), Else(Block(Return())));
+ WrapInFunction(ast_if);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ EXPECT_TRUE(ir_if->Is<ir::If>());
+
+ auto* flow = ir_if->As<ir::If>();
+ ASSERT_NE(flow->true_target, nullptr);
+ ASSERT_NE(flow->false_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, flow);
+ EXPECT_EQ(flow->true_target->branch_target, func->end_target);
+ EXPECT_EQ(flow->false_target->branch_target, func->end_target);
+ EXPECT_EQ(flow->merge_target, nullptr);
+}
+
+TEST_F(IRBuilderImplTest, Loop_WithBreak) {
+ // func -> start -> loop -> loop start -> loop merge -> func end
+ //
+ // [continuing] -> loop start
+ //
+ auto* ast_loop = Loop(Block(Break()));
+ WrapInFunction(ast_loop);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop = b.FlowNodeForAstNode(ast_loop);
+ ASSERT_NE(ir_loop, nullptr);
+ EXPECT_TRUE(ir_loop->Is<ir::Loop>());
+
+ auto* flow = ir_loop->As<ir::Loop>();
+ ASSERT_NE(flow->start_target, nullptr);
+ ASSERT_NE(flow->continuing_target, nullptr);
+ ASSERT_NE(flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, flow);
+ EXPECT_EQ(flow->start_target->branch_target, flow->merge_target);
+ EXPECT_EQ(flow->continuing_target->branch_target, flow->start_target);
+ EXPECT_EQ(flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, Loop_WithContinue) {
+ // func -> start -> loop -> loop start -> if -> true block
+ // -> false block
+ //
+ // [if true] -> loop merge
+ // [if false] -> if merge
+ // [if merge] -> loop continuing
+ // [loop continuing] -> loop start
+ // [loop merge] -> func end
+ //
+ auto* ast_if = If(true, Block(Break()));
+ auto* ast_loop = Loop(Block(ast_if, Continue()));
+ WrapInFunction(ast_loop);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop = b.FlowNodeForAstNode(ast_loop);
+ ASSERT_NE(ir_loop, nullptr);
+ EXPECT_TRUE(ir_loop->Is<ir::Loop>());
+
+ auto* loop_flow = ir_loop->As<ir::Loop>();
+ ASSERT_NE(loop_flow->start_target, nullptr);
+ ASSERT_NE(loop_flow->continuing_target, nullptr);
+ ASSERT_NE(loop_flow->merge_target, nullptr);
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ ASSERT_TRUE(ir_if->Is<ir::If>());
+
+ auto* if_flow = ir_if->As<ir::If>();
+ ASSERT_NE(if_flow->true_target, nullptr);
+ ASSERT_NE(if_flow->false_target, nullptr);
+ ASSERT_NE(if_flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, loop_flow);
+ EXPECT_EQ(loop_flow->start_target->branch_target, if_flow);
+ EXPECT_EQ(if_flow->true_target->branch_target, loop_flow->merge_target);
+ EXPECT_EQ(if_flow->false_target->branch_target, if_flow->merge_target);
+ EXPECT_EQ(loop_flow->continuing_target->branch_target, loop_flow->start_target);
+ EXPECT_EQ(loop_flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, Loop_WithContinuing_BreakIf) {
+ // func -> start -> loop -> loop start -> continuing
+ //
+ // [loop continuing] -> if -> true branch
+ // -> false branch
+ // [if true] -> loop merge
+ // [if false] -> if merge
+ // [if merge] -> loop start
+ // [loop merge] -> func end
+ //
+ auto* ast_break_if = BreakIf(true);
+ auto* ast_loop = Loop(Block(), Block(ast_break_if));
+ WrapInFunction(ast_loop);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop = b.FlowNodeForAstNode(ast_loop);
+ ASSERT_NE(ir_loop, nullptr);
+ EXPECT_TRUE(ir_loop->Is<ir::Loop>());
+
+ auto* loop_flow = ir_loop->As<ir::Loop>();
+ ASSERT_NE(loop_flow->start_target, nullptr);
+ ASSERT_NE(loop_flow->continuing_target, nullptr);
+ ASSERT_NE(loop_flow->merge_target, nullptr);
+
+ auto* ir_break_if = b.FlowNodeForAstNode(ast_break_if);
+ ASSERT_NE(ir_break_if, nullptr);
+ ASSERT_TRUE(ir_break_if->Is<ir::If>());
+
+ auto* break_if_flow = ir_break_if->As<ir::If>();
+ ASSERT_NE(break_if_flow->true_target, nullptr);
+ ASSERT_NE(break_if_flow->false_target, nullptr);
+ ASSERT_NE(break_if_flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, loop_flow);
+ EXPECT_EQ(loop_flow->start_target->branch_target, loop_flow->continuing_target);
+ EXPECT_EQ(loop_flow->continuing_target->branch_target, break_if_flow);
+ EXPECT_EQ(break_if_flow->true_target->branch_target, loop_flow->merge_target);
+ EXPECT_EQ(break_if_flow->false_target->branch_target, break_if_flow->merge_target);
+ EXPECT_EQ(break_if_flow->merge_target->branch_target, loop_flow->start_target);
+ EXPECT_EQ(loop_flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, Loop_WithReturn) {
+ // func -> start -> loop -> loop start -> if -> true block
+ // -> false block
+ //
+ // [if true] -> func end
+ // [if false] -> if merge
+ // [if merge] -> loop continuing
+ // [loop continuing] -> loop start
+ // [loop merge] -> func end
+ //
+ auto* ast_if = If(true, Block(Return()));
+ auto* ast_loop = Loop(Block(ast_if, Continue()));
+ WrapInFunction(ast_loop);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop = b.FlowNodeForAstNode(ast_loop);
+ ASSERT_NE(ir_loop, nullptr);
+ EXPECT_TRUE(ir_loop->Is<ir::Loop>());
+
+ auto* loop_flow = ir_loop->As<ir::Loop>();
+ ASSERT_NE(loop_flow->start_target, nullptr);
+ ASSERT_NE(loop_flow->continuing_target, nullptr);
+ ASSERT_NE(loop_flow->merge_target, nullptr);
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ ASSERT_TRUE(ir_if->Is<ir::If>());
+
+ auto* if_flow = ir_if->As<ir::If>();
+ ASSERT_NE(if_flow->true_target, nullptr);
+ ASSERT_NE(if_flow->false_target, nullptr);
+ ASSERT_NE(if_flow->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(loop_flow->start_target->branch_target, if_flow);
+ EXPECT_EQ(if_flow->true_target->branch_target, func->end_target);
+ EXPECT_EQ(if_flow->false_target->branch_target, if_flow->merge_target);
+
+ EXPECT_EQ(loop_flow->continuing_target->branch_target, loop_flow->start_target);
+
+ EXPECT_EQ(func->start_target->branch_target, ir_loop);
+ EXPECT_EQ(loop_flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, Loop_WithIf_BothBranchesBreak) {
+ // func -> start -> loop -> loop start -> if -> true branch
+ // -> false branch
+ //
+ // [if true] -> loop merge
+ // [if false] -> loop merge
+ // [if merge] -> nullptr
+ // [loop continuing] -> loop start
+ // [loop merge] -> func end
+ //
+ auto* ast_if = If(true, Block(Break()), Else(Block(Break())));
+ auto* ast_loop = Loop(Block(ast_if, Continue()));
+ WrapInFunction(ast_loop);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop = b.FlowNodeForAstNode(ast_loop);
+ ASSERT_NE(ir_loop, nullptr);
+ EXPECT_TRUE(ir_loop->Is<ir::Loop>());
+
+ auto* loop_flow = ir_loop->As<ir::Loop>();
+ ASSERT_NE(loop_flow->start_target, nullptr);
+ ASSERT_NE(loop_flow->continuing_target, nullptr);
+ ASSERT_NE(loop_flow->merge_target, nullptr);
+
+ auto* ir_if = b.FlowNodeForAstNode(ast_if);
+ ASSERT_NE(ir_if, nullptr);
+ ASSERT_TRUE(ir_if->Is<ir::If>());
+
+ auto* if_flow = ir_if->As<ir::If>();
+ ASSERT_NE(if_flow->true_target, nullptr);
+ ASSERT_NE(if_flow->false_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ // Note, the `continue` is dead code because both if branches go out of loop, so it just gets
+ // dropped.
+
+ EXPECT_EQ(func->start_target->branch_target, loop_flow);
+ EXPECT_EQ(loop_flow->start_target->branch_target, if_flow);
+ EXPECT_EQ(if_flow->true_target->branch_target, loop_flow->merge_target);
+ EXPECT_EQ(if_flow->false_target->branch_target, loop_flow->merge_target);
+ EXPECT_EQ(if_flow->merge_target, nullptr);
+ EXPECT_EQ(loop_flow->continuing_target->branch_target, loop_flow->start_target);
+ EXPECT_EQ(loop_flow->merge_target->branch_target, func->end_target);
+}
+
+TEST_F(IRBuilderImplTest, Loop_Nested) {
+ // loop { // loop_a
+ // loop { // loop_b
+ // if (true) { break; } // if_a
+ // if (true) { continue; } // if_b
+ // continuing {
+ // loop { // loop_c
+ // break;
+ // }
+ //
+ // loop { // loop_d
+ // continuing {
+ // break if (true); // if_c
+ // }
+ // }
+ // }
+ // }
+ // if (true) { break; } // if_d
+ // }
+ //
+ // func -> start -> loop_a -> loop_a start
+ //
+ // [loop_a start] -> loop_b
+ // [loop_b start] -> if_a
+ // [if_a true] -> loop_b merge
+ // [if_a false] -> if_a merge
+ // [if_a merge] -> if_b
+ // [if_b true] -> loop_b continuing
+ // [if_b false] -> if_b merge
+ // [if_b merge] -> loop_b continug
+ // [loop_b continuing] -> loop_c
+ // [loop_c start] -> loop_c merge
+ // [loop_c continuing] -> loop_c start
+ // [loop_c merge] -> loop_d
+ // [loop_d start] -> loop_d continuing
+ // [loop_d continuing] -> if_c
+ // [if_c true] -> loop_d merge
+ // [if_c false] -> if_c merge
+ // [if c merge] -> loop_d start
+ // [loop_d merge] -> loop_b start
+ // [loop_b merge] -> if_d
+ // [if_d true] -> loop_a merge
+ // [if_d false] -> if_d merge
+ // [if_d merge] -> loop_a continuing
+ // [loop_a continuing] -> loop_a start
+ // [loop_a merge] -> func end
+ //
+
+ auto* ast_if_a = If(true, Block(Break()));
+ auto* ast_if_b = If(true, Block(Continue()));
+ auto* ast_if_c = BreakIf(true);
+ auto* ast_if_d = If(true, Block(Break()));
+
+ auto* ast_loop_d = Loop(Block(), Block(ast_if_c));
+ auto* ast_loop_c = Loop(Block(Break()));
+
+ auto* ast_loop_b = Loop(Block(ast_if_a, ast_if_b), Block(ast_loop_c, ast_loop_d));
+ auto* ast_loop_a = Loop(Block(ast_loop_b, ast_if_d));
+
+ WrapInFunction(ast_loop_a);
+ auto& b = Build();
+
+ auto r = b.Build();
+ ASSERT_TRUE(r) << b.error();
+ auto m = r.Move();
+
+ auto* ir_loop_a = b.FlowNodeForAstNode(ast_loop_a);
+ ASSERT_NE(ir_loop_a, nullptr);
+ EXPECT_TRUE(ir_loop_a->Is<ir::Loop>());
+ auto* loop_flow_a = ir_loop_a->As<ir::Loop>();
+ ASSERT_NE(loop_flow_a->start_target, nullptr);
+ ASSERT_NE(loop_flow_a->continuing_target, nullptr);
+ ASSERT_NE(loop_flow_a->merge_target, nullptr);
+
+ auto* ir_loop_b = b.FlowNodeForAstNode(ast_loop_b);
+ ASSERT_NE(ir_loop_b, nullptr);
+ EXPECT_TRUE(ir_loop_b->Is<ir::Loop>());
+ auto* loop_flow_b = ir_loop_b->As<ir::Loop>();
+ ASSERT_NE(loop_flow_b->start_target, nullptr);
+ ASSERT_NE(loop_flow_b->continuing_target, nullptr);
+ ASSERT_NE(loop_flow_b->merge_target, nullptr);
+
+ auto* ir_loop_c = b.FlowNodeForAstNode(ast_loop_c);
+ ASSERT_NE(ir_loop_c, nullptr);
+ EXPECT_TRUE(ir_loop_c->Is<ir::Loop>());
+ auto* loop_flow_c = ir_loop_c->As<ir::Loop>();
+ ASSERT_NE(loop_flow_c->start_target, nullptr);
+ ASSERT_NE(loop_flow_c->continuing_target, nullptr);
+ ASSERT_NE(loop_flow_c->merge_target, nullptr);
+
+ auto* ir_loop_d = b.FlowNodeForAstNode(ast_loop_d);
+ ASSERT_NE(ir_loop_d, nullptr);
+ EXPECT_TRUE(ir_loop_d->Is<ir::Loop>());
+ auto* loop_flow_d = ir_loop_d->As<ir::Loop>();
+ ASSERT_NE(loop_flow_d->start_target, nullptr);
+ ASSERT_NE(loop_flow_d->continuing_target, nullptr);
+ ASSERT_NE(loop_flow_d->merge_target, nullptr);
+
+ auto* ir_if_a = b.FlowNodeForAstNode(ast_if_a);
+ ASSERT_NE(ir_if_a, nullptr);
+ EXPECT_TRUE(ir_if_a->Is<ir::If>());
+ auto* if_flow_a = ir_if_a->As<ir::If>();
+ ASSERT_NE(if_flow_a->true_target, nullptr);
+ ASSERT_NE(if_flow_a->false_target, nullptr);
+ ASSERT_NE(if_flow_a->merge_target, nullptr);
+
+ auto* ir_if_b = b.FlowNodeForAstNode(ast_if_b);
+ ASSERT_NE(ir_if_b, nullptr);
+ EXPECT_TRUE(ir_if_b->Is<ir::If>());
+ auto* if_flow_b = ir_if_b->As<ir::If>();
+ ASSERT_NE(if_flow_b->true_target, nullptr);
+ ASSERT_NE(if_flow_b->false_target, nullptr);
+ ASSERT_NE(if_flow_b->merge_target, nullptr);
+
+ auto* ir_if_c = b.FlowNodeForAstNode(ast_if_c);
+ ASSERT_NE(ir_if_c, nullptr);
+ EXPECT_TRUE(ir_if_c->Is<ir::If>());
+ auto* if_flow_c = ir_if_c->As<ir::If>();
+ ASSERT_NE(if_flow_c->true_target, nullptr);
+ ASSERT_NE(if_flow_c->false_target, nullptr);
+ ASSERT_NE(if_flow_c->merge_target, nullptr);
+
+ auto* ir_if_d = b.FlowNodeForAstNode(ast_if_d);
+ ASSERT_NE(ir_if_d, nullptr);
+ EXPECT_TRUE(ir_if_d->Is<ir::If>());
+ auto* if_flow_d = ir_if_d->As<ir::If>();
+ ASSERT_NE(if_flow_d->true_target, nullptr);
+ ASSERT_NE(if_flow_d->false_target, nullptr);
+ ASSERT_NE(if_flow_d->merge_target, nullptr);
+
+ ASSERT_EQ(1u, m.functions.Length());
+ auto* func = m.functions[0];
+
+ EXPECT_EQ(func->start_target->branch_target, loop_flow_a);
+ EXPECT_EQ(loop_flow_a->start_target->branch_target, loop_flow_b);
+ EXPECT_EQ(loop_flow_b->start_target->branch_target, if_flow_a);
+ EXPECT_EQ(if_flow_a->true_target->branch_target, loop_flow_b->merge_target);
+ EXPECT_EQ(if_flow_a->false_target->branch_target, if_flow_a->merge_target);
+ EXPECT_EQ(if_flow_a->merge_target->branch_target, if_flow_b);
+ EXPECT_EQ(if_flow_b->true_target->branch_target, loop_flow_b->continuing_target);
+ EXPECT_EQ(if_flow_b->false_target->branch_target, if_flow_b->merge_target);
+ EXPECT_EQ(if_flow_b->merge_target->branch_target, loop_flow_b->continuing_target);
+ EXPECT_EQ(loop_flow_b->continuing_target->branch_target, loop_flow_c);
+ EXPECT_EQ(loop_flow_c->start_target->branch_target, loop_flow_c->merge_target);
+ EXPECT_EQ(loop_flow_c->continuing_target->branch_target, loop_flow_c->start_target);
+ EXPECT_EQ(loop_flow_c->merge_target->branch_target, loop_flow_d);
+ EXPECT_EQ(loop_flow_d->start_target->branch_target, loop_flow_d->continuing_target);
+ EXPECT_EQ(loop_flow_d->continuing_target->branch_target, if_flow_c);
+ EXPECT_EQ(if_flow_c->true_target->branch_target, loop_flow_d->merge_target);
+ EXPECT_EQ(if_flow_c->false_target->branch_target, if_flow_c->merge_target);
+ EXPECT_EQ(if_flow_c->merge_target->branch_target, loop_flow_d->start_target);
+ EXPECT_EQ(loop_flow_d->merge_target->branch_target, loop_flow_b->start_target);
+ EXPECT_EQ(loop_flow_b->merge_target->branch_target, if_flow_d);
+ EXPECT_EQ(if_flow_d->true_target->branch_target, loop_flow_a->merge_target);
+ EXPECT_EQ(if_flow_d->false_target->branch_target, if_flow_d->merge_target);
+ EXPECT_EQ(if_flow_d->merge_target->branch_target, loop_flow_a->continuing_target);
+ EXPECT_EQ(loop_flow_a->continuing_target->branch_target, loop_flow_a->start_target);
+ EXPECT_EQ(loop_flow_a->merge_target->branch_target, func->end_target);
+}
+
+} // namespace
+} // namespace tint::ir
diff --git a/src/tint/ir/flow_node.cc b/src/tint/ir/flow_node.cc
new file mode 100644
index 0000000..bbbd78b
--- /dev/null
+++ b/src/tint/ir/flow_node.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/flow_node.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::FlowNode);
+
+namespace tint::ir {
+
+FlowNode::FlowNode() = default;
+
+FlowNode::~FlowNode() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/flow_node.h b/src/tint/ir/flow_node.h
new file mode 100644
index 0000000..0158af4
--- /dev/null
+++ b/src/tint/ir/flow_node.h
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_FLOW_NODE_H_
+#define SRC_TINT_IR_FLOW_NODE_H_
+
+#include "src/tint/castable.h"
+
+namespace tint::ir {
+
+/// Base class for flow nodes
+class FlowNode : public Castable<FlowNode> {
+ public:
+ ~FlowNode() override;
+
+ protected:
+ /// Constructor
+ FlowNode();
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_FLOW_NODE_H_
diff --git a/src/tint/ir/function.cc b/src/tint/ir/function.cc
new file mode 100644
index 0000000..f74550e
--- /dev/null
+++ b/src/tint/ir/function.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/function.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::Function);
+
+namespace tint::ir {
+
+Function::Function(const ast::Function* f) : Base(), source(f) {}
+
+Function::~Function() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/function.h b/src/tint/ir/function.h
new file mode 100644
index 0000000..c63aec0
--- /dev/null
+++ b/src/tint/ir/function.h
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_FUNCTION_H_
+#define SRC_TINT_IR_FUNCTION_H_
+
+#include "src/tint/ast/function.h"
+#include "src/tint/ir/flow_node.h"
+
+// Forward declarations
+namespace tint::ir {
+class Block;
+class Terminator;
+} // namespace tint::ir
+
+namespace tint::ir {
+
+/// An IR representation of a function
+class Function : public Castable<Function, FlowNode> {
+ public:
+ /// Constructor
+ /// @param func the ast::Function to create from
+ explicit Function(const ast::Function* func);
+ ~Function() override;
+
+ /// The ast function this ir function is created from.
+ const ast::Function* source;
+
+ /// The start target is the first block in a function.
+ Block* start_target = nullptr;
+ /// The end target is the end of the function. It is used as the branch target if a return is
+ /// encountered in the function.
+ Terminator* end_target = nullptr;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_FUNCTION_H_
diff --git a/src/tint/ir/if.cc b/src/tint/ir/if.cc
new file mode 100644
index 0000000..df017d2
--- /dev/null
+++ b/src/tint/ir/if.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/if.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::If);
+
+namespace tint::ir {
+
+If::If(const ast::Statement* stmt) : Base(), source(stmt) {}
+
+If::~If() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/if.h b/src/tint/ir/if.h
new file mode 100644
index 0000000..84967b0
--- /dev/null
+++ b/src/tint/ir/if.h
@@ -0,0 +1,50 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_IF_H_
+#define SRC_TINT_IR_IF_H_
+
+#include "src/tint/ast/if_statement.h"
+#include "src/tint/ir/flow_node.h"
+
+// Forward declarations
+namespace tint::ir {
+class Block;
+} // namespace tint::ir
+
+namespace tint::ir {
+
+/// A flow node representing an if statement. The node always contains a true and a false block. It
+/// may contain a merge block where the true/false blocks will merge too unless they return.
+class If : public Castable<If, FlowNode> {
+ public:
+ /// Constructor
+ /// @param stmt the ast::IfStatement or ast::BreakIfStatement
+ explicit If(const ast::Statement* stmt);
+ ~If() override;
+
+ /// The ast::IfStatement or ast::BreakIfStatement source for this flow node.
+ const ast::Statement* source;
+
+ /// The true branch block
+ Block* true_target = nullptr;
+ /// The false branch block
+ Block* false_target = nullptr;
+ /// An optional block where the true/false blocks will branch too if needed.
+ Block* merge_target = nullptr;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_IF_H_
diff --git a/src/tint/ir/loop.cc b/src/tint/ir/loop.cc
new file mode 100644
index 0000000..4458de6
--- /dev/null
+++ b/src/tint/ir/loop.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/loop.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::Loop);
+
+namespace tint::ir {
+
+Loop::Loop(const ast::LoopStatement* stmt) : Base(), source(stmt) {}
+
+Loop::~Loop() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/loop.h b/src/tint/ir/loop.h
new file mode 100644
index 0000000..03a0190
--- /dev/null
+++ b/src/tint/ir/loop.h
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_LOOP_H_
+#define SRC_TINT_IR_LOOP_H_
+
+#include "src/tint/ast/loop_statement.h"
+#include "src/tint/ir/block.h"
+#include "src/tint/ir/flow_node.h"
+
+namespace tint::ir {
+
+/// Flow node describing a loop.
+class Loop : public Castable<Loop, FlowNode> {
+ public:
+ /// Constructor
+ /// @param stmt the ast::LoopStatement
+ explicit Loop(const ast::LoopStatement* stmt);
+ ~Loop() override;
+
+ /// The ast loop statement this ir loop is created from.
+ const ast::LoopStatement* source;
+
+ /// The start block is the first block in a loop.
+ Block* start_target = nullptr;
+ /// The continue target of the block.
+ Block* continuing_target = nullptr;
+ /// The loop merge target. If the `loop` does a `return` then this block may not actually
+ /// end up in the control flow. We need it if the loop does a `break` we know where to break
+ /// too.
+ Block* merge_target = nullptr;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_LOOP_H_
diff --git a/src/tint/ir/module.cc b/src/tint/ir/module.cc
new file mode 100644
index 0000000..0f9be09
--- /dev/null
+++ b/src/tint/ir/module.cc
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/module.h"
+
+#include "src/tint/ir/builder_impl.h"
+#include "src/tint/program.h"
+
+namespace tint::ir {
+
+// static
+Module::Result Module::FromProgram(const Program* program) {
+ if (!program->IsValid()) {
+ return Result{std::string("input program is not valid")};
+ }
+
+ BuilderImpl b(program);
+ auto r = b.Build();
+ if (!r) {
+ return b.error();
+ }
+
+ return Result{r.Move()};
+}
+
+Module::Module(const Program* prog) : program(prog) {}
+
+Module::Module(Module&&) = default;
+
+Module::~Module() = default;
+
+Module& Module::operator=(Module&&) = default;
+
+const Program* Module::ToProgram() const {
+ return nullptr;
+}
+
+} // namespace tint::ir
diff --git a/src/tint/ir/module.h b/src/tint/ir/module.h
new file mode 100644
index 0000000..4d38614
--- /dev/null
+++ b/src/tint/ir/module.h
@@ -0,0 +1,81 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_MODULE_H_
+#define SRC_TINT_IR_MODULE_H_
+
+#include <string>
+
+#include "src/tint/ir/function.h"
+#include "src/tint/utils/block_allocator.h"
+#include "src/tint/utils/result.h"
+#include "src/tint/utils/vector.h"
+
+// Forward Declarations
+namespace tint {
+class Program;
+} // namespace tint
+
+namespace tint::ir {
+
+/// Main module class for the IR.
+class Module {
+ public:
+ /// The result type for the FromProgram method.
+ using Result = utils::Result<Module, std::string>;
+
+ /// Builds an ir::Module from the given Program
+ /// @param program the Program to use.
+ /// @returns the `utiils::Result` of generating the IR. The result will contain the `ir::Module`
+ /// on success, otherwise the `std::string` error.
+ ///
+ /// @note this assumes the program |IsValid|, and has had const-eval done so
+ /// any abstract values have been calculated and converted into the relevant
+ /// concrete types.
+ static Result FromProgram(const Program* program);
+
+ /// Constructor
+ /// @param program the program this module was constructed from
+ explicit Module(const Program* program);
+ /// Move constructor
+ /// @param o the module to move from
+ Module(Module&& o);
+ /// Destructor
+ ~Module();
+
+ /// Move assign
+ /// @param o the module to assign from
+ /// @returns a reference to this module
+ Module& operator=(Module&& o);
+
+ /// Converts the module back to a Program
+ /// @returns the resulting program, or nullptr on error
+ /// (Note, this will probably turn into a utils::Result, just stubbing for now)
+ const Program* ToProgram() const;
+
+ /// The flow node allocator
+ utils::BlockAllocator<FlowNode> flow_nodes;
+
+ /// List of functions in the program
+ utils::Vector<Function*, 8> functions;
+ /// List of indexes into the functions list for the entry points
+ utils::Vector<Function*, 8> entry_points;
+
+ /// The source ast::Program this module was constucted from
+ const Program* program;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_MODULE_H_
diff --git a/src/tint/ir/switch.cc b/src/tint/ir/switch.cc
new file mode 100644
index 0000000..9ad6d30
--- /dev/null
+++ b/src/tint/ir/switch.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/switch.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::Switch);
+
+namespace tint::ir {
+
+Switch::Switch() : Base() {}
+
+Switch::~Switch() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/switch.h b/src/tint/ir/switch.h
new file mode 100644
index 0000000..e9de3ae
--- /dev/null
+++ b/src/tint/ir/switch.h
@@ -0,0 +1,36 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_SWITCH_H_
+#define SRC_TINT_IR_SWITCH_H_
+
+#include "src/tint/ir/block.h"
+#include "src/tint/ir/flow_node.h"
+
+namespace tint::ir {
+
+/// Flow node representing a switch statement
+class Switch : public Castable<Switch, FlowNode> {
+ public:
+ /// Constructor
+ Switch();
+ ~Switch() override;
+
+ /// The switch merge target
+ Block* merge_target;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_SWITCH_H_
diff --git a/src/tint/ir/terminator.cc b/src/tint/ir/terminator.cc
new file mode 100644
index 0000000..6d7678d
--- /dev/null
+++ b/src/tint/ir/terminator.cc
@@ -0,0 +1,25 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/ir/terminator.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::ir::Terminator);
+
+namespace tint::ir {
+
+Terminator::Terminator() : Base() {}
+
+Terminator::~Terminator() = default;
+
+} // namespace tint::ir
diff --git a/src/tint/ir/terminator.h b/src/tint/ir/terminator.h
new file mode 100644
index 0000000..9f9aba0
--- /dev/null
+++ b/src/tint/ir/terminator.h
@@ -0,0 +1,33 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_TERMINATOR_H_
+#define SRC_TINT_IR_TERMINATOR_H_
+
+#include "src/tint/ir/flow_node.h"
+
+namespace tint::ir {
+
+/// Flow node used as the end of a function. Must only be used as the `end_target` in a function
+/// flow node. There are no instructions and no branches from this node.
+class Terminator : public Castable<Terminator, FlowNode> {
+ public:
+ /// Constructor
+ Terminator();
+ ~Terminator() override;
+};
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_TERMINATOR_H_
diff --git a/src/tint/ir/test_helper.h b/src/tint/ir/test_helper.h
new file mode 100644
index 0000000..fdc4787
--- /dev/null
+++ b/src/tint/ir/test_helper.h
@@ -0,0 +1,63 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_IR_TEST_HELPER_H_
+#define SRC_TINT_IR_TEST_HELPER_H_
+
+#include <memory>
+#include <utility>
+
+#include "gtest/gtest.h"
+#include "src/tint/ir/builder_impl.h"
+#include "src/tint/program_builder.h"
+
+namespace tint::ir {
+
+/// Helper class for testing
+template <typename BASE>
+class TestHelperBase : public BASE, public ProgramBuilder {
+ public:
+ TestHelperBase() = default;
+
+ ~TestHelperBase() override = default;
+
+ /// Builds and returns a BuilderImpl from the program.
+ /// @note The builder is only created once. Multiple calls to Build() will
+ /// return the same builder without rebuilding.
+ /// @return the builder
+ BuilderImpl& Build() {
+ if (gen_) {
+ return *gen_;
+ }
+ program = std::make_unique<Program>(std::move(*this));
+ diag::Formatter formatter;
+ [&]() { ASSERT_TRUE(program->IsValid()) << formatter.format(program->Diagnostics()); }();
+ gen_ = std::make_unique<BuilderImpl>(program.get());
+ return *gen_;
+ }
+
+ /// The program built with a call to Build()
+ std::unique_ptr<Program> program;
+
+ private:
+ std::unique_ptr<BuilderImpl> gen_;
+};
+using TestHelper = TestHelperBase<testing::Test>;
+
+template <typename T>
+using TestParamHelper = TestHelperBase<testing::TestWithParam<T>>;
+
+} // namespace tint::ir
+
+#endif // SRC_TINT_IR_TEST_HELPER_H_
diff --git a/src/tint/reader/spirv/function.cc b/src/tint/reader/spirv/function.cc
index e6c73fe..4c71607 100644
--- a/src/tint/reader/spirv/function.cc
+++ b/src/tint/reader/spirv/function.cc
@@ -5709,7 +5709,7 @@
Source{}, builder_.Symbols().Register("textureDimensions"));
ExpressionList dims_args{GetImageExpression(inst)};
if (opcode == SpvOpImageQuerySizeLod) {
- dims_args.Push(ToI32(MakeOperand(inst, 1)).expr);
+ dims_args.Push(MakeOperand(inst, 1).expr);
}
const ast::Expression* dims_call =
create<ast::CallExpression>(Source{}, dims_ident, dims_args);
@@ -5724,18 +5724,29 @@
if (ast::IsTextureArray(dims)) {
auto* layers_ident = create<ast::IdentifierExpression>(
Source{}, builder_.Symbols().Register("textureNumLayers"));
- exprs.Push(create<ast::CallExpression>(Source{}, layers_ident,
- utils::Vector{GetImageExpression(inst)}));
+ auto num_layers = create<ast::CallExpression>(
+ Source{}, layers_ident, utils::Vector{GetImageExpression(inst)});
+ exprs.Push(num_layers);
}
auto* result_type = parser_impl_.ConvertType(inst.type_id());
+ auto* unsigned_type = ty_.AsUnsigned(result_type);
TypedExpression expr = {
- result_type,
- builder_.Construct(Source{}, result_type->Build(builder_), std::move(exprs))};
+ unsigned_type,
+ // If `exprs` holds multiple expressions, then these are the calls to
+ // textureDimensions() and textureNumLayers(), and these need to be placed into a
+ // vector initializer - otherwise, just emit the single expression to omit an
+ // unnecessary cast.
+ (exprs.Length() > 1)
+ ? builder_.Construct(Source{}, unsigned_type->Build(builder_), std::move(exprs))
+ : exprs[0],
+ };
+
+ expr = ToSignedIfUnsigned(expr);
+
return EmitConstDefOrWriteToHoistedVar(inst, expr);
}
case SpvOpImageQueryLod:
- return Fail() << "WGSL does not support querying the level of detail of "
- "an image: "
+ return Fail() << "WGSL does not support querying the level of detail of an image: "
<< inst.PrettyPrint();
case SpvOpImageQueryLevels:
case SpvOpImageQuerySamples: {
@@ -5746,9 +5757,10 @@
const ast::Expression* ast_expr = create<ast::CallExpression>(
Source{}, levels_ident, utils::Vector{GetImageExpression(inst)});
auto* result_type = parser_impl_.ConvertType(inst.type_id());
- // The SPIR-V result type must be integer scalar. The WGSL bulitin
- // returns i32. If they aren't the same then convert the result.
- if (!result_type->Is<I32>()) {
+ // The SPIR-V result type must be integer scalar.
+ // The WGSL bulitin returns u32.
+ // If they aren't the same then convert the result.
+ if (!result_type->Is<U32>()) {
ast_expr = builder_.Construct(Source{}, result_type->Build(builder_),
utils::Vector{ast_expr});
}
diff --git a/src/tint/reader/spirv/function.h b/src/tint/reader/spirv/function.h
index fb4dfcf..755ecc9 100644
--- a/src/tint/reader/spirv/function.h
+++ b/src/tint/reader/spirv/function.h
@@ -956,17 +956,15 @@
ExpressionList MakeCoordinateOperandsForImageAccess(
const spvtools::opt::Instruction& image_access);
- /// Returns the given value as an I32. If it's already an I32 then this
- /// return the given value. Otherwise, wrap the value in a TypeInitializer
- /// expression.
+ /// Returns the given value as an i32. If it's already an i32 then simply returns @p value.
+ /// Otherwise, wrap the value in a TypeInitializer expression.
/// @param value the value to pass through or convert
- /// @returns the value as an I32 value.
+ /// @returns the value as an i32 value.
TypedExpression ToI32(TypedExpression value);
- /// Returns the given value as a signed integer type of the same shape
- /// if the value is unsigned scalar or vector, by wrapping the value
- /// with a TypeInitializer expression. Returns the value itself if the
- /// value otherwise.
+ /// Returns the given value as a signed integer type of the same shape if the value is unsigned
+ /// scalar or vector, by wrapping the value with a TypeInitializer expression. Returns the
+ /// value itself if the value was already signed.
/// @param value the value to pass through or convert
/// @returns the value itself, or converted to signed integral
TypedExpression ToSignedIfUnsigned(TypedExpression value);
diff --git a/src/tint/reader/spirv/parser_impl_handle_test.cc b/src/tint/reader/spirv/parser_impl_handle_test.cc
index f7879f6..4e02d9b 100644
--- a/src/tint/reader/spirv/parser_impl_handle_test.cc
+++ b/src/tint/reader/spirv/parser_impl_handle_test.cc
@@ -2842,7 +2842,7 @@
"%99 = OpImageQuerySize %v3int %im \n"
"%98 = OpImageRead %v4float %im %vi123\n",
R"(@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(let x_99 : vec3<i32> = vec3<i32>(textureDimensions(x_20), textureNumLayers(x_20));)"}
+ R"(let x_99 : vec3<i32> = vec3<i32>(vec3<u32>(textureDimensions(x_20), textureNumLayers(x_20)));)"}
// 3D array storage image doesn't exist.
// Multisampled array
@@ -2898,7 +2898,7 @@
// 2D array
{"%float 2D 0 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n",
R"(@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(let x_99 : vec3<i32> = vec3<i32>(textureDimensions(x_20, i1), textureNumLayers(x_20));)"},
+ R"(let x_99 : vec3<i32> = vec3<i32>(vec3<u32>(textureDimensions(x_20, i1), textureNumLayers(x_20)));)"},
// There is no 3D array
@@ -2909,12 +2909,12 @@
// https://github.com/gpuweb/gpuweb/issues/1345
{"%float Cube 0 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n",
R"(@group(2) @binding(1) var x_20 : texture_cube_array<f32>;)",
- R"(let x_99 : vec3<i32> = vec3<i32>(textureDimensions(x_20, i1).xy, textureNumLayers(x_20));)"},
+ R"(let x_99 : vec3<i32> = vec3<i32>(vec3<u32>(textureDimensions(x_20, i1).xy, textureNumLayers(x_20)));)"},
// Depth 2D array
{"%float 2D 1 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
- R"(let x_99 : vec3<i32> = vec3<i32>(textureDimensions(x_20, i1), textureNumLayers(x_20));)"},
+ R"(let x_99 : vec3<i32> = vec3<i32>(vec3<u32>(textureDimensions(x_20, i1), textureNumLayers(x_20)));)"},
// Depth Cube Array
//
@@ -2923,19 +2923,17 @@
// https://github.com/gpuweb/gpuweb/issues/1345
{"%float Cube 1 1 0 1 Unknown", "%99 = OpImageQuerySizeLod %v3int %im %i1\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_cube_array;)",
- R"(let x_99 : vec3<i32> = vec3<i32>(textureDimensions(x_20, i1).xy, textureNumLayers(x_20));)"}}));
+ R"(let x_99 : vec3<i32> = vec3<i32>(vec3<u32>(textureDimensions(x_20, i1).xy, textureNumLayers(x_20)));)"}}));
INSTANTIATE_TEST_SUITE_P(
- // When the level-of-detail value is given as an unsigned
- // integer, we must convert it before using it as an argument
- // to textureDimensions.
+ // textureDimensions accepts both signed and unsigned the level-of-detail values.
ImageQuerySizeLod_NonArrayed_SignedResult_UnsignedLevel,
SpvParserHandleTest_SampledImageAccessTest,
::testing::ValuesIn(std::vector<ImageAccessCase>{
{"%float 1D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %int %im %u1\n",
R"(@group(2) @binding(1) var x_20 : texture_1d<f32>;)",
- R"(let x_99 : i32 = i32(textureDimensions(x_20, i32(u1)));)"}}));
+ R"(let x_99 : i32 = i32(textureDimensions(x_20, u1));)"}}));
INSTANTIATE_TEST_SUITE_P(
// When SPIR-V wants the result type to be unsigned, we have to
@@ -2948,7 +2946,7 @@
{"%float 1D 0 0 0 1 Unknown", "%99 = OpImageQuerySizeLod %uint %im %i1\n",
R"(@group(2) @binding(1) var x_20 : texture_1d<f32>;)",
- R"(let x_99 : u32 = u32(textureDimensions(x_20, i1));)"}}));
+ R"(let x_99 : i32 = i32(textureDimensions(x_20, i1));)"}}));
INSTANTIATE_TEST_SUITE_P(ImageQueryLevels_SignedResult,
SpvParserHandleTest_SampledImageAccessTest,
@@ -2961,47 +2959,47 @@
// 2D
{"%float 2D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// 2D array
{"%float 2D 0 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_2d_array<f32>;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// 3D
{"%float 3D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_3d<f32>;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// Cube
{"%float Cube 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_cube<f32>;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// Cube array
{"%float Cube 0 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_cube_array<f32>;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// depth 2d
{"%float 2D 1 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// depth 2d array
{"%float 2D 1 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_2d_array;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// depth cube
{"%float Cube 1 0 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_cube;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"},
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"},
// depth cube array
{"%float Cube 1 1 0 1 Unknown", "%99 = OpImageQueryLevels %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_depth_cube_array;)",
- R"(let x_99 : i32 = textureNumLevels(x_20);)"}}));
+ R"(let x_99 : i32 = i32(textureNumLevels(x_20));)"}}));
INSTANTIATE_TEST_SUITE_P(
// Spot check that a type conversion is inserted when SPIR-V asks for
@@ -3011,7 +3009,7 @@
::testing::ValuesIn(std::vector<ImageAccessCase>{
{"%float 2D 0 0 0 1 Unknown", "%99 = OpImageQueryLevels %uint %im\n",
R"(@group(2) @binding(1) var x_20 : texture_2d<f32>;)",
- R"(let x_99 : u32 = u32(textureNumLevels(x_20));)"}}));
+ R"(let x_99 : u32 = textureNumLevels(x_20);)"}}));
INSTANTIATE_TEST_SUITE_P(ImageQuerySamples_SignedResult,
SpvParserHandleTest_SampledImageAccessTest,
@@ -3019,21 +3017,21 @@
// Multsample 2D
{"%float 2D 0 0 1 1 Unknown", "%99 = OpImageQuerySamples %int %im\n",
R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d<f32>;)",
- R"(let x_99 : i32 = textureNumSamples(x_20);)"} // namespace
+ R"(let x_99 : i32 = i32(textureNumSamples(x_20));)"}
// Multisample 2D array
// Not in WebGPU
}));
INSTANTIATE_TEST_SUITE_P(
- // Translation must inject a type coersion from signed to unsigned.
+ // Translation must inject a type coersion from unsigned to signed.
ImageQuerySamples_UnsignedResult,
SpvParserHandleTest_SampledImageAccessTest,
::testing::ValuesIn(std::vector<ImageAccessCase>{
- // Multsample 2D
+ // Multisample 2D
{"%float 2D 0 0 1 1 Unknown", "%99 = OpImageQuerySamples %uint %im\n",
R"(@group(2) @binding(1) var x_20 : texture_multisampled_2d<f32>;)",
- R"(let x_99 : u32 = u32(textureNumSamples(x_20));)"}
+ R"(let x_99 : u32 = textureNumSamples(x_20);)"}
// Multisample 2D array
// Not in WebGPU
diff --git a/src/tint/reader/spirv/parser_type.cc b/src/tint/reader/spirv/parser_type.cc
index ff4b96e..04036f2 100644
--- a/src/tint/reader/spirv/parser_type.cc
+++ b/src/tint/reader/spirv/parser_type.cc
@@ -444,6 +444,20 @@
return state->i32_;
}
+const Type* TypeManager::AsUnsigned(const Type* ty) {
+ return Switch(
+ ty, //
+ [&](const spirv::I32*) { return U32(); }, //
+ [&](const spirv::U32*) { return ty; }, //
+ [&](const spirv::Vector* vec) {
+ return Switch(
+ vec->type, //
+ [&](const spirv::I32*) { return Vector(U32(), vec->size); }, //
+ [&](const spirv::U32*) { return ty; } //
+ );
+ });
+}
+
const spirv::Pointer* TypeManager::Pointer(const Type* el,
ast::AddressSpace address_space,
ast::Access access) {
diff --git a/src/tint/reader/spirv/parser_type.h b/src/tint/reader/spirv/parser_type.h
index 48b6f3f..43c311c 100644
--- a/src/tint/reader/spirv/parser_type.h
+++ b/src/tint/reader/spirv/parser_type.h
@@ -539,6 +539,11 @@
const spirv::F32* F32();
/// @return a I32 type. Repeated calls will return the same pointer.
const spirv::I32* I32();
+ /// @param ty the input type.
+ /// @returns the equivalent unsigned integer scalar or vector if @p ty is a scalar or vector,
+ /// otherwise nullptr.
+ const Type* AsUnsigned(const Type* ty);
+
/// @param ty the store type
/// @param address_space the pointer address space
/// @param access the declared access mode
diff --git a/src/tint/reader/wgsl/lexer.cc b/src/tint/reader/wgsl/lexer.cc
index 0bc19ad..16712ca 100644
--- a/src/tint/reader/wgsl/lexer.cc
+++ b/src/tint/reader/wgsl/lexer.cc
@@ -328,9 +328,6 @@
auto source = begin_source();
bool has_mantissa_digits = false;
- if (matches(end, '-')) {
- end++;
- }
while (end < length() && is_digit(at(end))) {
has_mantissa_digits = true;
end++;
@@ -426,7 +423,6 @@
constexpr uint64_t kExponentMask = (1 << kExponentBits) - 1;
constexpr int64_t kExponentMax = kExponentMask; // Including NaN / inf
constexpr uint64_t kExponentLeftShift = kMantissaBits;
- constexpr uint64_t kSignBit = kTotalBits - 1;
constexpr uint64_t kOne = 1;
auto start = pos();
@@ -434,16 +430,8 @@
auto source = begin_source();
- // clang-format off
- // -?0[xX]([0-9a-fA-F]*.?[0-9a-fA-F]+ | [0-9a-fA-F]+.[0-9a-fA-F]*)(p|P)(+|-)?[0-9]+ // NOLINT
- // clang-format on
+ // 0[xX]([0-9a-fA-F]*.?[0-9a-fA-F]+ | [0-9a-fA-F]+.[0-9a-fA-F]*)(p|P)(+|-)?[0-9]+ // NOLINT
- // -?
- uint64_t sign_bit = 0;
- if (matches(end, '-')) {
- sign_bit = 1;
- end++;
- }
// 0[xX]
if (matches(end, '0') && (matches(end + 1, 'x') || matches(end + 1, 'X'))) {
end += 2;
@@ -696,7 +684,7 @@
}
// Combine sign, mantissa, and exponent
- uint64_t result_u64 = sign_bit << kSignBit;
+ uint64_t result_u64 = 0;
result_u64 |= mantissa;
result_u64 |= (static_cast<uint64_t>(signed_exponent) & kExponentMask) << kExponentLeftShift;
@@ -856,10 +844,6 @@
auto source = begin_source();
- if (matches(curr, '-')) {
- curr++;
- }
-
if (matches(curr, '0') && (matches(curr + 1, 'x') || matches(curr + 1, 'X'))) {
curr += 2;
} else {
@@ -880,10 +864,6 @@
auto source = begin_source();
- if (matches(curr, '-')) {
- curr++;
- }
-
if (curr >= length() || !is_digit(at(curr))) {
return {};
}
diff --git a/src/tint/reader/wgsl/lexer_test.cc b/src/tint/reader/wgsl/lexer_test.cc
index 3268eaf..a7c13e6 100644
--- a/src/tint/reader/wgsl/lexer_test.cc
+++ b/src/tint/reader/wgsl/lexer_test.cc
@@ -426,57 +426,35 @@
// No decimal, with 'f' suffix
FloatData{"0f", 0.0},
FloatData{"1f", 1.0},
- FloatData{"-0f", 0.0},
- FloatData{"-1f", -1.0},
// No decimal, with 'h' suffix
FloatData{"0h", 0.0},
FloatData{"1h", 1.0},
- FloatData{"-0h", 0.0},
- FloatData{"-1h", -1.0},
// Zero, with decimal.
FloatData{"0.0", 0.0},
FloatData{"0.", 0.0},
FloatData{".0", 0.0},
- FloatData{"-0.0", 0.0},
- FloatData{"-0.", 0.0},
- FloatData{"-.0", 0.0},
// Zero, with decimal and 'f' suffix
FloatData{"0.0f", 0.0},
FloatData{"0.f", 0.0},
FloatData{".0f", 0.0},
- FloatData{"-0.0f", 0.0},
- FloatData{"-0.f", 0.0},
- FloatData{"-.0f", 0.0},
// Zero, with decimal and 'h' suffix
FloatData{"0.0h", 0.0},
FloatData{"0.h", 0.0},
FloatData{".0h", 0.0},
- FloatData{"-0.0h", 0.0},
- FloatData{"-0.h", 0.0},
- FloatData{"-.0h", 0.0},
// Non-zero with decimal
FloatData{"5.7", 5.7},
FloatData{"5.", 5.},
FloatData{".7", .7},
- FloatData{"-5.7", -5.7},
- FloatData{"-5.", -5.},
- FloatData{"-.7", -.7},
// Non-zero with decimal and 'f' suffix
FloatData{"5.7f", static_cast<double>(5.7f)},
FloatData{"5.f", static_cast<double>(5.f)},
FloatData{".7f", static_cast<double>(.7f)},
- FloatData{"-5.7f", static_cast<double>(-5.7f)},
- FloatData{"-5.f", static_cast<double>(-5.f)},
- FloatData{"-.7f", static_cast<double>(-.7f)},
// Non-zero with decimal and 'h' suffix
FloatData{"5.7h", static_cast<double>(f16::Quantize(5.7f))},
FloatData{"5.h", static_cast<double>(f16::Quantize(5.f))},
FloatData{".7h", static_cast<double>(f16::Quantize(.7f))},
- FloatData{"-5.7h", static_cast<double>(f16::Quantize(-5.7f))},
- FloatData{"-5.h", static_cast<double>(f16::Quantize(-5.f))},
- FloatData{"-.7h", static_cast<double>(f16::Quantize(-.7f))},
// No decimal, with exponent
FloatData{"1e5", 1e5},
@@ -532,7 +510,6 @@
INSTANTIATE_TEST_SUITE_P(LexerTest,
FloatTest_Invalid,
testing::Values(".",
- "-.",
// Need a mantissa digit
".e5",
".E5",
@@ -545,9 +522,7 @@
".e-",
// Overflow
"2.5e+256f",
- "-2.5e+127f",
"6.5520e+4h",
- "-6.5e+12h",
// Decimal exponent must immediately
// follow the 'e'.
"2.5e 12",
@@ -791,12 +766,9 @@
testing::Combine(testing::Values('\0'), // No suffix
testing::ValuesIn(std::vector<ParseIntegerCase>{
{"0", 0},
- {"-2", -2},
{"2", 2},
{"123", 123},
{"2147483647", 2147483647},
- {"-2147483648", -2147483648LL},
- {"-9223372036854775808", -9223372036854775807LL - 1},
})));
INSTANTIATE_TEST_SUITE_P(Dec_u32,
@@ -813,11 +785,8 @@
testing::Combine(testing::Values('i'), // Suffix
testing::ValuesIn(std::vector<ParseIntegerCase>{
{"0i", 0u},
- {"-0i", 0u},
{"123i", 123},
- {"-123i", -123},
{"2147483647i", 2147483647},
- {"-2147483647i", -2147483647ll},
})));
INSTANTIATE_TEST_SUITE_P(Hex_AInt,
@@ -828,16 +797,10 @@
{"0X0", 0},
{"0x42", 66},
{"0X42", 66},
- {"-0x42", -66},
- {"-0X42", -66},
{"0xeF1Abc9", 0xeF1Abc9},
{"0XeF1Abc9", 0xeF1Abc9},
- {"-0xeF1Abc9", -0xeF1Abc9},
- {"-0XeF1Abc9", -0xeF1Abc9},
{"0x80000000", 0x80000000},
{"0X80000000", 0X80000000},
- {"-0x80000000", -0x80000000ll},
- {"-0X80000000", -0X80000000ll},
{"0x7FFFFFFF", 0x7fffffff},
{"0X7FFFFFFF", 0x7fffffff},
{"0x7fffffff", 0x7fffffff},
@@ -845,7 +808,6 @@
{"0x7FfFfFfF", 0x7fffffff},
{"0X7FfFfFfF", 0x7fffffff},
{"0x7fffffffffffffff", 0x7fffffffffffffffll},
- {"-0x7fffffffffffffff", -0x7fffffffffffffffll},
})));
INSTANTIATE_TEST_SUITE_P(Hex_u32,
@@ -869,22 +831,13 @@
testing::ValuesIn(std::vector<ParseIntegerCase>{
{"0x0i", 0},
{"0x42i", 66},
- {"-0x0i", 0},
- {"-0x42i", -66},
{"0xeF1Abc9i", 250719177},
- {"-0xeF1Abc9i", -250719177},
{"0x7FFFFFFFi", 0x7fffffff},
- {"-0x7FFFFFFFi", -0x7fffffff},
{"0X7FFFFFFFi", 0x7fffffff},
- {"-0X7FFFFFFFi", -0x7fffffff},
{"0x7fffffffi", 0x7fffffff},
- {"-0x7fffffffi", -0x7fffffff},
{"0X7fffffffi", 0x7fffffff},
- {"-0X7fffffffi", -0x7fffffff},
{"0x7FfFfFfFi", 0x7fffffff},
- {"-0x7FfFfFfFi", -0x7fffffff},
{"0X7FfFfFfFi", 0x7fffffff},
- {"-0X7FfFfFfFi", -0x7fffffff},
})));
////////////////////////////////////////////////////////////////////////////////
// ParseIntegerTest_CannotBeRepresented
@@ -920,9 +873,8 @@
INSTANTIATE_TEST_SUITE_P(u32,
ParseIntegerTest_CannotBeRepresented,
- testing::Combine(testing::Values("u32"), // type
- testing::Values("4294967296u", //
- "-1u")));
+ testing::Combine(testing::Values("u32"), // type
+ testing::Values("4294967296u")));
////////////////////////////////////////////////////////////////////////////////
// ParseIntegerTest_LeadingZeros
@@ -942,7 +894,7 @@
INSTANTIATE_TEST_SUITE_P(LeadingZero,
ParseIntegerTest_LeadingZeros,
- testing::Values("01234", "0000", "-00", "00u"));
+ testing::Values("01234", "0000", "00u"));
////////////////////////////////////////////////////////////////////////////////
// ParseIntegerTest_NoSignificantDigits
@@ -962,18 +914,7 @@
INSTANTIATE_TEST_SUITE_P(LeadingZero,
ParseIntegerTest_NoSignificantDigits,
- testing::Values("0x",
- "0X",
- "-0x",
- "-0X",
- "0xu",
- "0Xu",
- "-0xu",
- "-0Xu",
- "0xi",
- "0Xi",
- "-0xi",
- "-0Xi"));
+ testing::Values("0x", "0X", "0xu", "0Xu", "0xi", "0Xi"));
struct TokenData {
const char* input;
diff --git a/src/tint/reader/wgsl/parser_impl.cc b/src/tint/reader/wgsl/parser_impl.cc
index 90fb8a8..62352ee 100644
--- a/src/tint/reader/wgsl/parser_impl.cc
+++ b/src/tint/reader/wgsl/parser_impl.cc
@@ -2456,10 +2456,10 @@
return Failure::kErrored;
}
if (!expr.matched) {
- return add_error(t1, "expected expression for `break if`");
+ return add_error(t1, "expected expression for `break-if`");
}
- if (!match(Token::Type::kSemicolon)) {
- return add_error(peek(), "expected ';' for `break if` statement");
+ if (!expect("`break-if` statement", Token::Type::kSemicolon)) {
+ return Failure::kErrored;
}
return create<ast::BreakIfStatement>(t1.source(), expr.value);
@@ -2629,12 +2629,13 @@
return Failure::kNoMatch;
}
-// postfix_expression
+// component_or_swizzle_specifier
// :
-// | BRACE_LEFT expression BRACE_RIGHT postfix_expression?
-// | PERIOD member_ident postfix_expression?
-// | PERIOD swizzle_name postfix_expression?
-Maybe<const ast::Expression*> ParserImpl::postfix_expression(const ast::Expression* prefix) {
+// | BRACE_LEFT expression BRACE_RIGHT component_or_swizzle_specifier?
+// | PERIOD member_ident component_or_swizzle_specifier?
+// | PERIOD swizzle_name component_or_swizzle_specifier?
+Maybe<const ast::Expression*> ParserImpl::component_or_swizzle_specifier(
+ const ast::Expression* prefix) {
Source source;
while (continue_parsing()) {
@@ -3116,7 +3117,7 @@
return Failure::kNoMatch;
}
- return postfix_expression(prefix.value);
+ return component_or_swizzle_specifier(prefix.value);
}
// unary_expression
@@ -3127,7 +3128,8 @@
// | STAR unary_expression
// | AND unary_expression
//
-// The `primary_expression postfix_expression ?` is moved out into a `singular_expression`
+// The `primary_expression component_or_swizzle_specifier ?` is moved out into a
+// `singular_expression`
Maybe<const ast::Expression*> ParserImpl::unary_expression() {
auto& t = peek();
@@ -3246,7 +3248,7 @@
}
// lhs_expression
-// : ( STAR | AND )* core_lhs_expression postfix_expression?
+// : ( STAR | AND )* core_lhs_expression component_or_swizzle_specifier?
Maybe<const ast::Expression*> ParserImpl::lhs_expression() {
std::vector<const Token*> prefixes;
while (peek_is(Token::Type::kStar) || peek_is(Token::Type::kAnd) ||
@@ -3282,7 +3284,7 @@
expr = create<ast::UnaryOpExpression>(t.source(), op, expr);
}
- auto e = postfix_expression(expr);
+ auto e = component_or_swizzle_specifier(expr);
if (e.errored) {
return Failure::kErrored;
}
diff --git a/src/tint/reader/wgsl/parser_impl.h b/src/tint/reader/wgsl/parser_impl.h
index 691cc5e..fc91b5c 100644
--- a/src/tint/reader/wgsl/parser_impl.h
+++ b/src/tint/reader/wgsl/parser_impl.h
@@ -614,10 +614,10 @@
/// @param use a description of what was being parsed if an error was raised
/// @returns the list of arguments
Expect<ExpressionList> expect_argument_expression_list(std::string_view use);
- /// Parses the recursive portion of the postfix_expression
+ /// Parses the recursive portion of the component_or_swizzle_specifier
/// @param prefix the left side of the expression
/// @returns the parsed expression or nullptr
- Maybe<const ast::Expression*> postfix_expression(const ast::Expression* prefix);
+ Maybe<const ast::Expression*> component_or_swizzle_specifier(const ast::Expression* prefix);
/// Parses a `singular_expression` grammar elment
/// @returns the parsed expression or nullptr
Maybe<const ast::Expression*> singular_expression();
diff --git a/src/tint/reader/wgsl/parser_impl_argument_expression_list_test.cc b/src/tint/reader/wgsl/parser_impl_argument_expression_list_test.cc
index 7f1132c..e22a706 100644
--- a/src/tint/reader/wgsl/parser_impl_argument_expression_list_test.cc
+++ b/src/tint/reader/wgsl/parser_impl_argument_expression_list_test.cc
@@ -37,7 +37,7 @@
}
TEST_F(ParserImplTest, ArgumentExpressionList_ParsesMultiple) {
- auto p = parser("(a, -33, 1+2)");
+ auto p = parser("(a, 33, 1+2)");
auto e = p->expect_argument_expression_list("argument list");
ASSERT_FALSE(p->has_error()) << p->error();
ASSERT_FALSE(e.errored);
diff --git a/src/tint/reader/wgsl/parser_impl_const_literal_test.cc b/src/tint/reader/wgsl/parser_impl_const_literal_test.cc
index 16861e4..af7b38e 100644
--- a/src/tint/reader/wgsl/parser_impl_const_literal_test.cc
+++ b/src/tint/reader/wgsl/parser_impl_const_literal_test.cc
@@ -67,32 +67,6 @@
ast::IntLiteralExpression::Suffix::kI);
EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 5u}}));
}
- {
- auto p = parser("-234");
- auto c = p->const_literal();
- EXPECT_TRUE(c.matched);
- EXPECT_FALSE(c.errored);
- EXPECT_FALSE(p->has_error()) << p->error();
- ASSERT_NE(c.value, nullptr);
- ASSERT_TRUE(c->Is<ast::IntLiteralExpression>());
- EXPECT_EQ(c->As<ast::IntLiteralExpression>()->value, -234);
- EXPECT_EQ(c->As<ast::IntLiteralExpression>()->suffix,
- ast::IntLiteralExpression::Suffix::kNone);
- EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 5u}}));
- }
- {
- auto p = parser("-234i");
- auto c = p->const_literal();
- EXPECT_TRUE(c.matched);
- EXPECT_FALSE(c.errored);
- EXPECT_FALSE(p->has_error()) << p->error();
- ASSERT_NE(c.value, nullptr);
- ASSERT_TRUE(c->Is<ast::IntLiteralExpression>());
- EXPECT_EQ(c->As<ast::IntLiteralExpression>()->value, -234);
- EXPECT_EQ(c->As<ast::IntLiteralExpression>()->suffix,
- ast::IntLiteralExpression::Suffix::kI);
- EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 6u}}));
- }
}
TEST_F(ParserImplTest, ConstLiteral_Uint) {
@@ -108,15 +82,6 @@
EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 5u}}));
}
-TEST_F(ParserImplTest, ConstLiteral_Uint_Negative) {
- auto p = parser("-234u");
- auto c = p->const_literal();
- EXPECT_FALSE(c.matched);
- EXPECT_TRUE(c.errored);
- EXPECT_EQ(p->error(), "1:1: value cannot be represented as 'u32'");
- ASSERT_EQ(c.value, nullptr);
-}
-
TEST_F(ParserImplTest, ConstLiteral_InvalidFloat_IncompleteExponent) {
auto p = parser("1.0e+");
auto c = p->const_literal();
@@ -174,15 +139,11 @@
INSTANTIATE_TEST_SUITE_P(ParserImplFloatLiteralTest_Float,
ParserImplFloatLiteralTest,
testing::ValuesIn(FloatLiteralTestCaseList{
- {"0.0", 0.0}, // Zero
- {"1.0", 1.0}, // One
- {"-1.0", -1.0}, // MinusOne
- {"1000000000.0", 1e9}, // Billion
- {"-0.0", std::copysign(0.0, -5.0)}, // NegativeZero
- {"0.0", MakeDouble(0, 0, 0)}, // Zero
- {"-0.0", MakeDouble(1, 0, 0)}, // NegativeZero
- {"1.0", MakeDouble(0, 1023, 0)}, // One
- {"-1.0", MakeDouble(1, 1023, 0)}, // NegativeOne
+ {"0.0", 0.0}, // Zero
+ {"1.0", 1.0}, // One
+ {"1000000000.0", 1e9}, // Billion
+ {"0.0", MakeDouble(0, 0, 0)}, // Zero
+ {"1.0", MakeDouble(0, 1023, 0)}, // One
{"234.e12", 234.e12},
{"234.e12f", static_cast<double>(234.e12f)},
@@ -190,47 +151,29 @@
// Tiny cases
{"1e-5000", 0.0},
- {"-1e-5000", 0.0},
{"1e-5000f", 0.0},
- {"-1e-5000f", 0.0},
{"1e-50f", 0.0},
- {"-1e-50f", 0.0},
{"1e-5000h", 0.0},
- {"-1e-5000h", 0.0},
{"1e-50h", 0.0},
- {"-1e-50h", 0.0},
{"1e-8h", 0.0}, // The smallest positive subnormal f16 is 5.96e-8
- {"-1e-8h", 0.0},
// Nearly overflow
{"1.e308", 1.e308},
- {"-1.e308", -1.e308},
{"1.8e307", 1.8e307},
- {"-1.8e307", -1.8e307},
{"1.798e307", 1.798e307},
- {"-1.798e307", -1.798e307},
{"1.7977e307", 1.7977e307},
- {"-1.7977e307", -1.7977e307},
// Nearly overflow
{"1e38f", static_cast<double>(1e38f)},
- {"-1e38f", static_cast<double>(-1e38f)},
{"4.0e37f", static_cast<double>(4.0e37f)},
- {"-4.0e37f", static_cast<double>(-4.0e37f)},
{"3.5e37f", static_cast<double>(3.5e37f)},
- {"-3.5e37f", static_cast<double>(-3.5e37f)},
{"3.403e37f", static_cast<double>(3.403e37f)},
- {"-3.403e37f", static_cast<double>(-3.403e37f)},
// Nearly overflow
{"6e4h", 6e4},
- {"-6e4h", -6e4},
{"8.0e3h", 8.0e3},
- {"-8.0e3h", -8.0e3},
{"3.5e3h", 3.5e3},
- {"-3.5e3h", -3.5e3},
- {"3.403e3h", 3.402e3}, // Quantized
- {"-3.403e3h", -3.402e3}, // Quantized
+ {"3.403e3h", 3.402e3}, // Quantized
}));
const double NegInf = MakeDouble(1, 0x7FF, 0);
@@ -246,11 +189,6 @@
{"0x1p-1", 0x1p-1},
{"0x1p-2", 0x1p-2},
{"0x1.8p-1", 0x1.8p-1},
- {"-0x0p+0", -0x0p+0},
- {"-0x1p+0", -0x1p+0},
- {"-0x1p-1", -0x1p-1},
- {"-0x1p-2", -0x1p-2},
- {"-0x1.8p-1", -0x1.8p-1},
{"0x0.4p+1", 0x0.4p+1},
{"0x0.02p+3", 0x0.02p+3},
{"0x4.4p+1", 0x4.4p+1},
@@ -260,43 +198,28 @@
{"0x1p+9", 0x1p+9},
{"0x1p+10", 0x1p+10},
{"0x1.02p+10", 0x1.02p+10},
- {"-0x1p+9", -0x1p+9},
- {"-0x1p+10", -0x1p+10},
- {"-0x1.02p+10", -0x1.02p+10},
// Small numbers
{"0x1p-9", 0x1p-9},
{"0x1p-10", 0x1p-10},
{"0x1.02p-3", 0x1.02p-3},
- {"-0x1p-9", -0x1p-9},
- {"-0x1p-10", -0x1p-10},
- {"-0x1.02p-3", -0x1.02p-3},
// Near lowest non-denorm
{"0x1p-1020", 0x1p-1020},
{"0x1p-1021", 0x1p-1021},
- {"-0x1p-1020", -0x1p-1020},
- {"-0x1p-1021", -0x1p-1021},
{"0x1p-124f", 0x1p-124},
{"0x1p-125f", 0x1p-125},
- {"-0x1p-124f", -0x1p-124},
- {"-0x1p-125f", -0x1p-125},
{"0x1p-12h", 0x1p-12},
{"0x1p-13h", 0x1p-13},
- {"-0x1p-12h", -0x1p-12},
- {"-0x1p-13h", -0x1p-13},
// Lowest non-denorm
{"0x1p-1022", 0x1p-1022},
- {"-0x1p-1022", -0x1p-1022},
{"0x1p-126f", 0x1p-126},
- {"-0x1p-126f", -0x1p-126},
{"0x1p-14h", 0x1p-14},
- {"-0x1p-14h", -0x1p-14},
// Denormalized values
{"0x1p-1023", 0x1p-1023},
@@ -305,10 +228,6 @@
{"0x0.2p-1021", 0x0.2p-1021},
{"0x1p-1025", 0x1p-1025},
{"0x1p-1026", 0x1p-1026},
- {"-0x1p-1023", -0x1p-1023},
- {"-0x1p-1024", -0x1p-1024},
- {"-0x1p-1025", -0x1p-1025},
- {"-0x1p-1026", -0x1p-1026},
{"0x1.8p-1023", 0x1.8p-1023},
{"0x1.8p-1024", 0x1.8p-1024},
@@ -318,10 +237,6 @@
{"0x0.2p-125f", 0x0.2p-125},
{"0x1p-129f", 0x1p-129},
{"0x1p-130f", 0x1p-130},
- {"-0x1p-127f", -0x1p-127},
- {"-0x1p-128f", -0x1p-128},
- {"-0x1p-129f", -0x1p-129},
- {"-0x1p-130f", -0x1p-130},
{"0x1.8p-127f", 0x1.8p-127},
{"0x1.8p-128f", 0x1.8p-128},
@@ -331,52 +246,31 @@
{"0x0.2p-13h", 0x0.2p-13},
{"0x1p-17h", 0x1p-17},
{"0x1p-18h", 0x1p-18},
- {"-0x1p-15h", -0x1p-15},
- {"-0x1p-16h", -0x1p-16},
- {"-0x1p-17h", -0x1p-17},
- {"-0x1p-18h", -0x1p-18},
{"0x1.8p-15h", 0x1.8p-15},
{"0x1.8p-16h", 0x1.8p-16},
// F64 extremities
- {"0x1p-1074", 0x1p-1074}, // +SmallestDenormal
- {"0x1p-1073", 0x1p-1073}, // +BiggerDenormal
- {"0x1.ffffffffffffep-1023", 0x1.ffffffffffffep-1023}, // +LargestDenormal
- {"0x0.fffffffffffffp-1022", 0x0.fffffffffffffp-1022}, // +LargestDenormal
- {"-0x1p-1074", -0x1p-1074}, // -SmallestDenormal
- {"-0x1p-1073", -0x1p-1073}, // -BiggerDenormal
- {"-0x1.ffffffffffffep-1023", -0x1.ffffffffffffep-1023}, // -LargestDenormal
- {"-0x0.fffffffffffffp-1022", -0x0.fffffffffffffp-1022}, // -LargestDenormal
+ {"0x1p-1074", 0x1p-1074}, // +SmallestDenormal
+ {"0x1p-1073", 0x1p-1073}, // +BiggerDenormal
+ {"0x1.ffffffffffffep-1023", 0x1.ffffffffffffep-1023}, // +LargestDenormal
+ {"0x0.fffffffffffffp-1022", 0x0.fffffffffffffp-1022}, // +LargestDenormal
- {"0x0.cafebeeff000dp-1022", 0x0.cafebeeff000dp-1022}, // +Subnormal
- {"-0x0.cafebeeff000dp-1022", -0x0.cafebeeff000dp-1022}, // -Subnormal
- {"0x1.2bfaf8p-1052", 0x1.2bfaf8p-1052}, // +Subnormal
- {"-0x1.2bfaf8p-1052", -0x1.2bfaf8p-1052}, // +Subnormal
- {"0x1.55554p-1055", 0x1.55554p-1055}, // +Subnormal
- {"-0x1.55554p-1055", -0x1.55554p-1055}, // -Subnormal
+ {"0x0.cafebeeff000dp-1022", 0x0.cafebeeff000dp-1022}, // +Subnormal
+ {"0x1.2bfaf8p-1052", 0x1.2bfaf8p-1052}, // +Subnormal
+ {"0x1.55554p-1055", 0x1.55554p-1055}, // +Subnormal
{"0x1.fffffffffffp-1027", 0x1.fffffffffffp-1027}, // +Subnormal, = 0x0.0fffffffffff8p-1022
- {"-0x1.fffffffffffp-1027", -0x1.fffffffffffp-1027}, // -Subnormal
// F32 extremities
- {"0x1p-149f", 0x1p-149}, // +SmallestDenormal
- {"0x1p-148f", 0x1p-148}, // +BiggerDenormal
- {"0x1.fffffcp-127f", 0x1.fffffcp-127}, // +LargestDenormal
- {"0x0.fffffep-126f", 0x0.fffffep-126}, // +LargestDenormal
- {"0x1.0p-126f", 0x1.0p-126}, // +SmallestNormal
- {"0x8.0p-129f", 0x8.0p-129}, // +SmallestNormal
- {"-0x1p-149f", -0x1p-149}, // -SmallestDenormal
- {"-0x1p-148f", -0x1p-148}, // -BiggerDenormal
- {"-0x1.fffffcp-127f", -0x1.fffffcp-127}, // -LargestDenormal
- {"-0x0.fffffep-126f", -0x0.fffffep-126}, // -LargestDenormal
- {"-0x1.0p-126f", -0x1.0p-126}, // -SmallestNormal
- {"-0x8.0p-129f", -0x8.0p-129}, // -SmallestNormal
+ {"0x1p-149f", 0x1p-149}, // +SmallestDenormal
+ {"0x1p-148f", 0x1p-148}, // +BiggerDenormal
+ {"0x1.fffffcp-127f", 0x1.fffffcp-127}, // +LargestDenormal
+ {"0x0.fffffep-126f", 0x0.fffffep-126}, // +LargestDenormal
+ {"0x1.0p-126f", 0x1.0p-126}, // +SmallestNormal
+ {"0x8.0p-129f", 0x8.0p-129}, // +SmallestNormal
- {"0x0.cafebp-129f", 0x0.cafebp-129}, // +Subnormal
- {"-0x0.cafebp-129f", -0x0.cafebp-129}, // -Subnormal
- {"0x1.2bfaf8p-127f", 0x1.2bfaf8p-127}, // +Subnormal
- {"-0x1.2bfaf8p-127f", -0x1.2bfaf8p-127}, // -Subnormal
- {"0x1.55554p-130f", 0x1.55554p-130}, // +Subnormal
- {"-0x1.55554p-130f", -0x1.55554p-130}, // -Subnormal
+ {"0x0.cafebp-129f", 0x0.cafebp-129}, // +Subnormal
+ {"0x1.2bfaf8p-127f", 0x1.2bfaf8p-127}, // +Subnormal
+ {"0x1.55554p-130f", 0x1.55554p-130}, // +Subnormal
// F32 exactly representable
{"0x1.000002p+0f", 0x1.000002p+0},
@@ -385,31 +279,20 @@
{"0x8.00003p+0f", 0x8.00003p+0},
{"0x2.123p+0f", 0x2.123p+0},
{"0x2.cafefp+0f", 0x2.cafefp+0},
- {"0x0.0000fep-126f", 0x0.0000fep-126}, // Subnormal
- {"-0x0.0000fep-126f", -0x0.0000fep-126}, // Subnormal
- {"0x3.f8p-144f", 0x3.f8p-144}, // Subnormal
- {"-0x3.f8p-144f", -0x3.f8p-144}, // Subnormal
+ {"0x0.0000fep-126f", 0x0.0000fep-126}, // Subnormal
+ {"0x3.f8p-144f", 0x3.f8p-144}, // Subnormal
// F16 extremities
- {"0x1p-24h", 0x1p-24}, // +SmallestDenormal
- {"0x1p-23h", 0x1p-23}, // +BiggerDenormal
- {"0x1.ff8p-15h", 0x1.ff8p-15}, // +LargestDenormal
- {"0x0.ffcp-14h", 0x0.ffcp-14}, // +LargestDenormal
- {"0x1.0p-14h", 0x1.0p-14}, // +SmallestNormal
- {"0x8.0p-17h", 0x8.0p-17}, // +SmallestNormal
- {"-0x1p-24h", -0x1p-24}, // -SmallestDenormal
- {"-0x1p-23h", -0x1p-23}, // -BiggerDenormal
- {"-0x1.ff8p-15h", -0x1.ff8p-15}, // -LargestDenormal
- {"-0x0.ffcp-14h", -0x0.ffcp-14}, // -LargestDenormal
- {"-0x1.0p-14h", -0x1.0p-14}, // -SmallestNormal
- {"-0x8.0p-17h", -0x8.0p-17}, // -SmallestNormal
+ {"0x1p-24h", 0x1p-24}, // +SmallestDenormal
+ {"0x1p-23h", 0x1p-23}, // +BiggerDenormal
+ {"0x1.ff8p-15h", 0x1.ff8p-15}, // +LargestDenormal
+ {"0x0.ffcp-14h", 0x0.ffcp-14}, // +LargestDenormal
+ {"0x1.0p-14h", 0x1.0p-14}, // +SmallestNormal
+ {"0x8.0p-17h", 0x8.0p-17}, // +SmallestNormal
- {"0x0.a8p-19h", 0x0.a8p-19}, // +Subnormal
- {"-0x0.a8p-19h", -0x0.a8p-19}, // -Subnormal
- {"0x1.7ap-17h", 0x1.7ap-17}, // +Subnormal
- {"-0x1.7ap-17h", -0x1.7ap-17}, // -Subnormal
- {"0x1.dp-20h", 0x1.dp-20}, // +Subnormal
- {"-0x1.dp-20h", -0x1.dp-20}, // -Subnormal
+ {"0x0.a8p-19h", 0x0.a8p-19}, // +Subnormal
+ {"0x1.7ap-17h", 0x1.7ap-17}, // +Subnormal
+ {"0x1.dp-20h", 0x1.dp-20}, // +Subnormal
// F16 exactly representable
{"0x1.004p+0h", 0x1.004p+0},
@@ -418,20 +301,14 @@
{"0x8.06p+0h", 0x8.06p+0},
{"0x2.128p+0h", 0x2.128p+0},
{"0x2.ca8p+0h", 0x2.ca8p+0},
- {"0x0.0fcp-14h", 0x0.0fcp-14}, // Subnormal
- {"-0x0.0fcp-14h", -0x0.0fcp-14}, // Subnormal
- {"0x3.f00p-20h", 0x3.f00p-20}, // Subnormal
- {"-0x3.f00p-20h", -0x3.f00p-20}, // Subnormal
+ {"0x0.0fcp-14h", 0x0.0fcp-14}, // Subnormal
+ {"0x3.f00p-20h", 0x3.f00p-20}, // Subnormal
// Underflow -> Zero
{"0x1p-1075", 0.0}, // Exponent underflows
- {"-0x1p-1075", 0.0},
{"0x1p-5000", 0.0},
- {"-0x1p-5000", 0.0},
{"0x0.00000000000000000000001p-1022", 0.0}, // Fraction causes underflow
- {"-0x0.0000000000000000000001p-1023", -0.0},
{"0x0.01p-1073", -0.0},
- {"-0x0.01p-1073", -0.0}, // Fraction causes additional underflow
{"0x1.0p-9223372036854774784", 0}, // -(INT64_MAX - 1023) (smallest valid exponent)
@@ -443,22 +320,14 @@
{"0x0p-9999999999", 0.0},
// Same, but with very large positive exponents that would cause overflow
// if the mantissa were non-zero.
- {"0x0p+10000000000000000000", 0.0}, // 10 quintillion (10,000,000,000,000,000,000)
- {"0x0p+100000000000000000000", 0.0}, // 100 quintillion (100,000,000,000,000,000,000)
- {"-0x0p+100000000000000000000", 0.0}, // As above 2, but negative mantissa
- {"-0x0p+1000000000000000000000", 0.0},
+ {"0x0p+10000000000000000000", 0.0}, // 10 quintillion (10,000,000,000,000,000,000)
+ {"0x0p+100000000000000000000", 0.0}, // 100 quintillion (100,000,000,000,000,000,000)
{"0x0.00p+10000000000000000000", 0.0}, // As above 4, but with fractional part
{"0x0.00p+100000000000000000000", 0.0},
- {"-0x0.00p+100000000000000000000", 0.0},
- {"-0x0.00p+1000000000000000000000", 0.0},
{"0x0p-10000000000000000000", 0.0}, // As above 8, but with negative exponents
{"0x0p-100000000000000000000", 0.0},
- {"-0x0p-100000000000000000000", 0.0},
- {"-0x0p-1000000000000000000000", 0.0},
{"0x0.00p-10000000000000000000", 0.0},
{"0x0.00p-100000000000000000000", 0.0},
- {"-0x0.00p-100000000000000000000", 0.0},
- {"-0x0.00p-1000000000000000000000", 0.0},
// Test parsing
{"0x0p0", 0.0},
@@ -476,37 +345,24 @@
{"0x0.4p+1", 2 * 0.25},
{"0x0.4p+2", 4 * 0.25},
{"0x123Ep+1", 9340.0},
- {"-0x123Ep+1", -9340.0},
{"0x1a2b3cP12", 7.024656384e+09},
- {"-0x1a2b3cP12", -7.024656384e+09},
// Examples without a binary exponent part.
{"0x1.", 1.0},
{"0x.8", 0.5},
{"0x1.8", 1.5},
- {"-0x1.", -1.0},
- {"-0x.8", -0.5},
- {"-0x1.8", -1.5},
// Examples with a binary exponent and a 'f' suffix.
{"0x1.p0f", 1.0},
{"0x.8p2f", 2.0},
{"0x1.8p-1f", 0.75},
{"0x2p-2f", 0.5}, // No binary point
- {"-0x1.p0f", -1.0},
- {"-0x.8p2f", -2.0},
- {"-0x1.8p-1f", -0.75},
- {"-0x2p-2f", -0.5}, // No binary point
// Examples with a binary exponent and a 'h' suffix.
{"0x1.p0h", 1.0},
{"0x.8p2h", 2.0},
{"0x1.8p-1h", 0.75},
{"0x2p-2h", 0.5}, // No binary point
- {"-0x1.p0h", -1.0},
- {"-0x.8p2h", -2.0},
- {"-0x1.8p-1h", -0.75},
- {"-0x2p-2h", -0.5}, // No binary point
};
}
INSTANTIATE_TEST_SUITE_P(ParserImplFloatLiteralTest_HexFloat,
@@ -532,11 +388,9 @@
using UpperCase0XTest = ::testing::Test;
TEST_F(UpperCase0XTest, Samples) {
const auto cases = FloatLiteralTestCaseList{
- {"absent", 0.0}, {"0x", 1.0}, {"0X", 2.0}, {"-0x", 3.0},
- {"-0X", 4.0}, {" 0x1p1", 5.0}, {" -0x1p", 6.0}, {" examine ", 7.0}};
+ {"absent", 0.0}, {"0x", 1.0}, {"0X", 2.0}, {" 0x1p1", 5.0}, {" examine ", 7.0}};
const auto expected = FloatLiteralTestCaseList{
- {"absent", 0.0}, {"0X", 1.0}, {"0X", 2.0}, {"-0X", 3.0},
- {"-0X", 4.0}, {" 0X1p1", 5.0}, {" -0X1p", 6.0}, {" examine ", 7.0}};
+ {"absent", 0.0}, {"0X", 1.0}, {"0X", 2.0}, {" 0X1p1", 5.0}, {" examine ", 7.0}};
auto result = UpperCase0X(cases);
EXPECT_THAT(result, ::testing::ElementsAreArray(expected));
@@ -625,11 +479,6 @@
"0x1.0018p+1024",
"0x1.01ep+1024",
"0x1.fffffep+1024",
- "-0x1.8p+1024",
- "-0x1.0002p+1024",
- "-0x1.0018p+1024",
- "-0x1.01ep+1024",
- "-0x1.fffffep+1024",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -642,11 +491,6 @@
"0x1.0018p+128f",
"0x1.01ep+128f",
"0x1.fffffep+128f",
- "-0x1.8p+128f",
- "-0x1.0002p+128f",
- "-0x1.0018p+128f",
- "-0x1.01ep+128f",
- "-0x1.fffffep+128f",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -659,11 +503,6 @@
"0x1.018p+16h",
"0x1.1ep+16h",
"0x1.ffcp+16h",
- "-0x1.8p+16h",
- "-0x1.004p+16h",
- "-0x1.018p+16h",
- "-0x1.1ep+16h",
- "-0x1.ffcp+16h",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -672,17 +511,11 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'abstract-float'"),
testing::ValuesIn(std::vector<const char*>{
"0x1p+1024",
- "-0x1p+1024",
"0x1.1p+1024",
- "-0x1.1p+1024",
"0x1p+1025",
- "-0x1p+1025",
"0x32p+1023",
- "-0x32p+1023",
"0x32p+5000",
- "-0x32p+5000",
"0x1.0p9223372036854774784",
- "-0x1.0p9223372036854774784",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -691,15 +524,10 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'f32'"),
testing::ValuesIn(std::vector<const char*>{
"0x1p+128f",
- "-0x1p+128f",
"0x1.1p+128f",
- "-0x1.1p+128f",
"0x1p+129f",
- "-0x1p+129f",
"0x32p+127f",
- "-0x32p+127f",
"0x32p+500f",
- "-0x32p+500f",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -708,15 +536,10 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'f16'"),
testing::ValuesIn(std::vector<const char*>{
"0x1p+16h",
- "-0x1p+16h",
"0x1.1p+16h",
- "-0x1.1p+16h",
"0x1p+17h",
- "-0x1p+17h",
"0x32p+15h",
- "-0x32p+15h",
"0x32p+500h",
- "-0x32p+500h",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -724,32 +547,22 @@
ParserImplInvalidLiteralTest,
testing::Combine(testing::Values("1:1: value cannot be exactly represented as 'f32'"),
testing::ValuesIn(std::vector<const char*>{
- "0x1.000001p+0f", // Quantizes to 0x1.0p+0
- "0x1.0000008p+0f", // Quantizes to 0x1.0p+0
- "0x1.0000000000001p+0f", // Quantizes to 0x1.0p+0
- "0x8.0000f8p+0f", // Quantizes to 0x8.0000fp+0
- "0x8.000038p+0f", // Quantizes to 0x8.00003p+0
- "0x2.cafef00dp+0f", // Quantizes to 0x2.cafefp+0
- "0x0.0000ffp-126f", // Subnormal, quantizes to 0x0.0000fep-126
- "0x3.fcp-144f", // Subnormal, quantizes to 0x3.f8p-144
- "-0x0.0000ffp-126f", // Subnormal, quantizes to -0x0.0000fep-126
- "-0x3.fcp-144f", // Subnormal, quantizes to -0x3.f8p-144
- "0x0.ffffffp-126f", // Subnormal, quantizes to 0x0.fffffep-144
- "0x0.fffffe0000001p-126f", // Subnormal, quantizes to 0x0.fffffep-144
- "-0x0.ffffffp-126f", // Subnormal, quantizes to -0x0.fffffep-144
- "-0x0.fffffe0000001p-126f", // Subnormal, quantizes to -0x0.fffffep-144
- "0x1.8p-149f", // Subnormal, quantizes to 0x1.0p-149f
- "0x1.4p-149f", // Subnormal, quantizes to 0x1.0p-149f
- "0x1.000002p-149f", // Subnormal, quantizes to 0x1.0p-149f
- "0x1.0000000000001p-149f", // Subnormal, quantizes to 0x1.0p-149f
- "-0x1.8p-149f", // Subnormal, quantizes to -0x1.0p-149f
- "-0x1.4p-149f", // Subnormal, quantizes to -0x1.0p-149f
- "-0x1.000002p-149f", // Subnormal, quantizes to -0x1.0p-149f
- "-0x1.0000000000001p-149f", // Subnormal, quantizes to -0x1.0p-149f
- "0x1.0p-150f", // Smaller than the smallest subnormal, quantizes to 0.0
- "0x1.8p-150f", // Smaller than the smallest subnormal, quantizes to 0.0
- "-0x1.0p-150f", // Smaller than the smallest subnormal, quantizes to -0.0
- "-0x1.8p-150f", // Smaller than the smallest subnormal, quantizes to -0.0
+ "0x1.000001p+0f", // Quantizes to 0x1.0p+0
+ "0x1.0000008p+0f", // Quantizes to 0x1.0p+0
+ "0x1.0000000000001p+0f", // Quantizes to 0x1.0p+0
+ "0x8.0000f8p+0f", // Quantizes to 0x8.0000fp+0
+ "0x8.000038p+0f", // Quantizes to 0x8.00003p+0
+ "0x2.cafef00dp+0f", // Quantizes to 0x2.cafefp+0
+ "0x0.0000ffp-126f", // Subnormal, quantizes to 0x0.0000fep-126
+ "0x3.fcp-144f", // Subnormal, quantizes to 0x3.f8p-144
+ "0x0.ffffffp-126f", // Subnormal, quantizes to 0x0.fffffep-144
+ "0x0.fffffe0000001p-126f", // Subnormal, quantizes to 0x0.fffffep-144
+ "0x1.8p-149f", // Subnormal, quantizes to 0x1.0p-149f
+ "0x1.4p-149f", // Subnormal, quantizes to 0x1.0p-149f
+ "0x1.000002p-149f", // Subnormal, quantizes to 0x1.0p-149f
+ "0x1.0000000000001p-149f", // Subnormal, quantizes to 0x1.0p-149f
+ "0x1.0p-150f", // Smaller than the smallest subnormal, quantizes to 0.0
+ "0x1.8p-150f", // Smaller than the smallest subnormal, quantizes to 0.0
})));
INSTANTIATE_TEST_SUITE_P(
@@ -768,26 +581,15 @@
"0x4.011p+0h", // Quantizes to 0x4.01p+0
"0x0.0fep-14h", // Subnormal, quantizes to 0x0.0fcp-14
"0x3.f8p-20h", // Subnormal, quantizes to 0x3.f0p-20
- "-0x0.0fep-14h", // Subnormal, quantizes to -0x0.0fcp-14
- "-0x3.f8p-20h", // Subnormal, quantizes to -0x3.f0p-20
"0x0.ffep-14h", // Subnormal, quantizes to 0x0.ffcp-14
"0x0.ffe0000000001p-14h", // Subnormal, quantizes to 0x0.ffcp-14
"0x0.fffffffffffffp-14h", // Subnormal, quantizes to 0x0.ffcp-14
- "-0x0.ffep-14h", // Subnormal, quantizes to -0x0.ffcp-14
- "-0x0.ffe0000000001p-14h", // Subnormal, quantizes to -0x0.ffcp-14
- "-0x0.fffffffffffffp-14h", // Subnormal, quantizes to -0x0.ffcp-14
- "0x1.8p-24h", // Subnormal, quantizes to 0x1.0p-24f
- "0x1.4p-24h", // Subnormal, quantizes to 0x1.0p-24f
- "0x1.004p-24h", // Subnormal, quantizes to 0x1.0p-24f
- "0x1.0000000000001p-24h", // Subnormal, quantizes to 0x1.0p-24f
- "-0x1.8p-24h", // Subnormal, quantizes to -0x1.0p-24f
- "-0x1.4p-24h", // Subnormal, quantizes to -0x1.0p-24f
- "-0x1.004p-24h", // Subnormal, quantizes to -0x1.0p-24f
- "-0x1.0000000000001p-24h", // Subnormal, quantizes to -0x1.0p-24f
- "0x1.0p-25h", // Smaller than the smallest subnormal, quantizes to 0.0
- "0x1.8p-25h", // Smaller than the smallest subnormal, quantizes to 0.0
- "-0x1.0p-25h", // Smaller than the smallest subnormal, quantizes to -0.0
- "-0x1.8p-25h", // Smaller than the smallest subnormal, quantizes to -0.0
+ "0x1.8p-24h", // Subnormal, quantizes to 0x1.0p-24f
+ "0x1.4p-24h", // Subnormal, quantizes to 0x1.0p-24f
+ "0x1.004p-24h", // Subnormal, quantizes to 0x1.0p-24f
+ "0x1.0000000000001p-24h", // Subnormal, quantizes to 0x1.0p-24f
+ "0x1.0p-25h", // Smaller than the smallest subnormal, quantizes to 0.0
+ "0x1.8p-25h", // Smaller than the smallest subnormal, quantizes to 0.0
})));
INSTANTIATE_TEST_SUITE_P(
@@ -796,15 +598,10 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'abstract-float'"),
testing::ValuesIn(std::vector<const char*>{
"1.e309",
- "-1.e309",
"1.8e308",
- "-1.8e308",
"1.798e308",
- "-1.798e308",
"1.7977e308",
- "-1.7977e308",
"1.2e+5000",
- "-1.2e+5000",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -813,15 +610,10 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'f32'"),
testing::ValuesIn(std::vector<const char*>{
"1e39f",
- "-1e39f",
"4.0e38f",
- "-4.0e38f",
"3.5e38f",
- "-3.5e38f",
"3.403e38f",
- "-3.403e38f",
"1.2e+256f",
- "-1.2e+256f",
})));
INSTANTIATE_TEST_SUITE_P(
@@ -830,17 +622,11 @@
testing::Combine(testing::Values("1:1: value cannot be represented as 'f16'"),
testing::ValuesIn(std::vector<const char*>{
"1.0e5h",
- "-1.0e5h",
"7.0e4h",
- "-7.0e4h",
"6.6e4h",
- "-6.6e4h",
"6.56e4h",
- "-6.56e4h",
"6.554e4h",
- "-6.554e4h",
"1.2e+32h",
- "-1.2e+32h",
})));
TEST_F(ParserImplTest, ConstLiteral_FloatHighest) {
@@ -863,29 +649,6 @@
EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 42u}}));
}
-TEST_F(ParserImplTest, ConstLiteral_FloatLowest) {
- // Some compilers complain if you test floating point numbers for equality.
- // So say it via two inequalities.
- const auto lowest = std::numeric_limits<float>::lowest();
- const auto expected_lowest = -340282346638528859811704183484516925440.0f;
- if (lowest < expected_lowest || lowest > expected_lowest) {
- GTEST_SKIP() << "std::numeric_limits<float>::lowest() is not as expected for "
- "this target";
- }
-
- auto p = parser("-340282346638528859811704183484516925440.0");
- auto c = p->const_literal();
- EXPECT_TRUE(c.matched);
- EXPECT_FALSE(c.errored);
- EXPECT_FALSE(p->has_error()) << p->error();
- ASSERT_NE(c.value, nullptr);
- ASSERT_TRUE(c->Is<ast::FloatLiteralExpression>());
- EXPECT_EQ(c->As<ast::FloatLiteralExpression>()->value, std::numeric_limits<float>::lowest());
- EXPECT_EQ(c->As<ast::FloatLiteralExpression>()->suffix,
- ast::FloatLiteralExpression::Suffix::kNone);
- EXPECT_EQ(c->source.range, (Source::Range{{1u, 1u}, {1u, 43u}}));
-}
-
TEST_F(ParserImplTest, ConstLiteral_True) {
auto p = parser("true");
auto c = p->const_literal();
diff --git a/src/tint/reader/wgsl/parser_impl_expression_test.cc b/src/tint/reader/wgsl/parser_impl_expression_test.cc
index 389999f..71d1d99 100644
--- a/src/tint/reader/wgsl/parser_impl_expression_test.cc
+++ b/src/tint/reader/wgsl/parser_impl_expression_test.cc
@@ -269,6 +269,124 @@
EXPECT_EQ(p->error(), R"(1:7: mixing '&&' and '||' requires parenthesis)");
}
+TEST_F(ParserImplTest, Expression_SubtractionNoSpace) {
+ auto p = parser("(2-1)");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+ ASSERT_TRUE(e->Is<ast::BinaryExpression>());
+ auto* b = e->As<ast::BinaryExpression>();
+ EXPECT_TRUE(b->IsSubtract());
+
+ ASSERT_TRUE(b->lhs->Is<ast::IntLiteralExpression>());
+ ASSERT_TRUE(b->rhs->Is<ast::IntLiteralExpression>());
+
+ EXPECT_EQ(b->lhs->As<ast::IntLiteralExpression>()->value, 2);
+ EXPECT_EQ(b->rhs->As<ast::IntLiteralExpression>()->value, 1);
+}
+
+TEST_F(ParserImplTest, Expression_NegatedNumber) {
+ auto p = parser("-1");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::UnaryOpExpression>());
+ auto* b = e->As<ast::UnaryOpExpression>();
+ EXPECT_EQ(b->op, ast::UnaryOp::kNegation);
+
+ ASSERT_TRUE(b->expr->Is<ast::IntLiteralExpression>());
+ EXPECT_EQ(b->expr->As<ast::IntLiteralExpression>()->value, 1);
+}
+
+TEST_F(ParserImplTest, Expression_MaxI32) {
+ auto p = parser("2147483647");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::IntLiteralExpression>());
+ EXPECT_EQ(e->As<ast::IntLiteralExpression>()->value, 2147483647);
+}
+
+TEST_F(ParserImplTest, Expression_MinI32) {
+ auto p = parser("-2147483648");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::UnaryOpExpression>());
+ auto* b = e->As<ast::UnaryOpExpression>();
+ EXPECT_EQ(b->op, ast::UnaryOp::kNegation);
+
+ ASSERT_TRUE(b->expr->Is<ast::IntLiteralExpression>());
+ EXPECT_EQ(b->expr->As<ast::IntLiteralExpression>()->value, 2147483648);
+}
+
+TEST_F(ParserImplTest, Expression_MaxU32) {
+ auto p = parser("4294967295");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::IntLiteralExpression>());
+ EXPECT_EQ(e->As<ast::IntLiteralExpression>()->value, 4294967295);
+}
+
+TEST_F(ParserImplTest, Expression_MaxF32) {
+ const auto highest = std::numeric_limits<float>::max();
+ const auto expected_highest = 340282346638528859811704183484516925440.0f;
+ if (highest < expected_highest || highest > expected_highest) {
+ GTEST_SKIP() << "std::numeric_limits<float>::max() is not as expected for "
+ "this target";
+ }
+
+ auto p = parser("340282346638528859811704183484516925440.0f");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::FloatLiteralExpression>());
+ EXPECT_EQ(e->As<ast::FloatLiteralExpression>()->value,
+ 340282346638528859811704183484516925440.0f);
+}
+
+TEST_F(ParserImplTest, Expression_MinF32) {
+ const auto lowest = std::numeric_limits<float>::lowest();
+ const auto expected_lowest = -340282346638528859811704183484516925440.0f;
+ if (lowest < expected_lowest || lowest > expected_lowest) {
+ GTEST_SKIP() << "std::numeric_limits<float>::lowest() is not as expected for "
+ "this target";
+ }
+
+ auto p = parser("-340282346638528859811704183484516925440.0f");
+ auto e = p->expression();
+ EXPECT_TRUE(e.matched);
+ EXPECT_FALSE(e.errored);
+ EXPECT_FALSE(p->has_error()) << p->error();
+ ASSERT_NE(e.value, nullptr);
+
+ ASSERT_TRUE(e->Is<ast::UnaryOpExpression>());
+ auto* b = e->As<ast::UnaryOpExpression>();
+ EXPECT_EQ(b->op, ast::UnaryOp::kNegation);
+
+ ASSERT_TRUE(b->expr->Is<ast::FloatLiteralExpression>());
+ EXPECT_EQ(b->expr->As<ast::FloatLiteralExpression>()->value,
+ 340282346638528859811704183484516925440.0f);
+}
+
namespace mixing_binary_ops {
struct BinaryOperatorInfo {
diff --git a/src/tint/reader/wgsl/parser_impl_loop_stmt_test.cc b/src/tint/reader/wgsl/parser_impl_loop_stmt_test.cc
index 2b8033f..5122332 100644
--- a/src/tint/reader/wgsl/parser_impl_loop_stmt_test.cc
+++ b/src/tint/reader/wgsl/parser_impl_loop_stmt_test.cc
@@ -129,7 +129,7 @@
EXPECT_TRUE(e.errored);
EXPECT_TRUE(p->has_error());
EXPECT_EQ(e.value, nullptr);
- EXPECT_EQ(p->error(), "1:21: expected expression for `break if`");
+ EXPECT_EQ(p->error(), "1:21: expected expression for `break-if`");
}
TEST_F(ParserImplTest, LoopStmt_Continuing_BreakIf_InvalidExpr) {
@@ -139,7 +139,7 @@
EXPECT_TRUE(e.errored);
EXPECT_TRUE(p->has_error());
EXPECT_EQ(e.value, nullptr);
- EXPECT_EQ(p->error(), "1:21: expected expression for `break if`");
+ EXPECT_EQ(p->error(), "1:21: expected expression for `break-if`");
}
TEST_F(ParserImplTest, LoopStmt_NoContinuing_BreakIf) {
@@ -159,7 +159,7 @@
EXPECT_TRUE(e.errored);
EXPECT_TRUE(p->has_error());
EXPECT_EQ(e.value, nullptr);
- EXPECT_EQ(p->error(), "1:40: expected ';' for `break if` statement");
+ EXPECT_EQ(p->error(), "1:40: expected ';' for `break-if` statement");
}
} // namespace
diff --git a/src/tint/resolver/attribute_validation_test.cc b/src/tint/resolver/attribute_validation_test.cc
index 212f594..86d6825 100644
--- a/src/tint/resolver/attribute_validation_test.cc
+++ b/src/tint/resolver/attribute_validation_test.cc
@@ -809,11 +809,25 @@
TEST_F(StructMemberAttributeTest, Size_Attribute_Override) {
Override("val", ty.f32(), Expr(1.23_f));
- Structure("mystruct", utils::Vector{Member("a", ty.f32(), utils::Vector{MemberSize("val")})});
+ Structure("mystruct",
+ utils::Vector{
+ Member("a", ty.f32(), utils::Vector{MemberSize(Expr(Source{{12, 34}}, "val"))}),
+ });
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(
r()->error(),
- R"(error: @size requires a const-expression, but expression is an override-expression)");
+ R"(12:34 error: @size requires a const-expression, but expression is an override-expression)");
+}
+
+TEST_F(StructMemberAttributeTest, Size_On_RuntimeSizedArray) {
+ Structure("mystruct",
+ utils::Vector{
+ Member("a", ty.array<i32>(), utils::Vector{MemberSize(Source{{12, 34}}, 8_a)}),
+ });
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(
+ r()->error(),
+ R"(12:34 error: @size can only be applied to members where the member's type size can be fully determined at shader creation time)");
}
} // namespace StructAndStructMemberTests
diff --git a/src/tint/resolver/builtin_test.cc b/src/tint/resolver/builtin_test.cc
index b28521d..7c15767 100644
--- a/src/tint/resolver/builtin_test.cc
+++ b/src/tint/resolver/builtin_test.cc
@@ -278,7 +278,7 @@
TEST_P(ResolverBuiltinTest_FloatBuiltin_IdenticalType, OneParam_Scalar_f32) {
auto param = GetParam();
- auto* call = Call(param.name, 1_f);
+ auto* call = Call(param.name, 0.5_f);
WrapInFunction(call);
if (param.args_number == 1u) {
@@ -299,7 +299,7 @@
TEST_P(ResolverBuiltinTest_FloatBuiltin_IdenticalType, OneParam_Vector_f32) {
auto param = GetParam();
- auto* call = Call(param.name, vec3<f32>(1_f, 1_f, 3_f));
+ auto* call = Call(param.name, vec3<f32>(0.5_f, 0.5_f, 0.8_f));
WrapInFunction(call);
if (param.args_number == 1u) {
@@ -464,7 +464,7 @@
Enable(ast::Extension::kF16);
- auto* call = Call(param.name, 1_h);
+ auto* call = Call(param.name, 0.5_h);
WrapInFunction(call);
if (param.args_number == 1u) {
@@ -487,7 +487,7 @@
Enable(ast::Extension::kF16);
- auto* call = Call(param.name, vec3<f16>(1_h, 1_h, 3_h));
+ auto* call = Call(param.name, vec3<f16>(0.5_h, 0.5_h, 0.8_h));
WrapInFunction(call);
if (param.args_number == 1u) {
@@ -2416,17 +2416,17 @@
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
- return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, depth_ref))";
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
- return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, depth_ref, offset))";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
- return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, array_index, depth_ref))";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
- return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, array_index, depth_ref, offset))";
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
- return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, depth_ref))";
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
- return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
+ return R"(textureSampleCompareLevel(texture, sampler, coords, array_index, depth_ref))";
case ValidTextureOverload::kLoad1dLevelF32:
case ValidTextureOverload::kLoad1dLevelU32:
case ValidTextureOverload::kLoad1dLevelI32:
@@ -2478,7 +2478,7 @@
default:
FAIL() << "invalid texture dimensions: " << param.texture_dimension;
case ast::TextureDimension::k1d:
- EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+ EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
break;
case ast::TextureDimension::k2d:
case ast::TextureDimension::k2dArray:
@@ -2487,23 +2487,23 @@
auto* vec = As<sem::Vector>(TypeOf(call));
ASSERT_NE(vec, nullptr);
EXPECT_EQ(vec->Width(), 2u);
- EXPECT_TRUE(vec->type()->Is<sem::I32>());
+ EXPECT_TRUE(vec->type()->Is<sem::U32>());
break;
}
case ast::TextureDimension::k3d: {
auto* vec = As<sem::Vector>(TypeOf(call));
ASSERT_NE(vec, nullptr);
EXPECT_EQ(vec->Width(), 3u);
- EXPECT_TRUE(vec->type()->Is<sem::I32>());
+ EXPECT_TRUE(vec->type()->Is<sem::U32>());
break;
}
}
} else if (std::string(param.function) == "textureNumLayers") {
- EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+ EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
} else if (std::string(param.function) == "textureNumLevels") {
- EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+ EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
} else if (std::string(param.function) == "textureNumSamples") {
- EXPECT_TRUE(TypeOf(call)->Is<sem::I32>());
+ EXPECT_TRUE(TypeOf(call)->Is<sem::U32>());
} else if (std::string(param.function) == "textureStore") {
EXPECT_TRUE(TypeOf(call)->Is<sem::Void>());
} else if (std::string(param.function) == "textureGather") {
diff --git a/src/tint/resolver/builtin_validation_test.cc b/src/tint/resolver/builtin_validation_test.cc
index 3cea975..b67a9ee 100644
--- a/src/tint/resolver/builtin_validation_test.cc
+++ b/src/tint/resolver/builtin_validation_test.cc
@@ -14,6 +14,7 @@
#include "src/tint/ast/builtin_texture_helper_test.h"
#include "src/tint/resolver/resolver_test_helper.h"
+#include "src/tint/sem/type_initializer.h"
using namespace tint::number_suffixes; // NOLINT
@@ -96,48 +97,169 @@
7:8 note: called by entry point 'main')");
}
-TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunction) {
- Func(Source{{12, 34}}, "mix", utils::Empty, ty.i32(), {});
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunctionUsedAsFunction) {
+ auto* mix = Func(Source{{12, 34}}, "mix", utils::Empty, ty.i32(),
+ utils::Vector{
+ Return(1_i),
+ });
+ auto* use = Call("mix");
+ WrapInFunction(use);
- EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(),
- R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a function)");
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
+ auto* sem = Sem().Get<sem::Call>(use);
+ ASSERT_NE(sem, nullptr);
+ EXPECT_EQ(sem->Target(), Sem().Get(mix));
}
-TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalConst) {
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunctionUsedAsVariable) {
+ Func(Source{{12, 34}}, "mix", utils::Empty, ty.i32(),
+ utils::Vector{
+ Return(1_i),
+ });
+ WrapInFunction(Decl(Var("v", Expr(Source{{56, 78}}, "mix"))));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(56:78 error: missing '(' for function call)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunctionUsedAsType) {
+ Func(Source{{12, 34}}, "mix", utils::Empty, ty.i32(),
+ utils::Vector{
+ Return(1_i),
+ });
+ WrapInFunction(Construct(ty.type_name(Source{{56, 78}}, "mix")));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(56:78 error: cannot use function 'mix' as type
+12:34 note: 'mix' declared here)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalConstUsedAsFunction) {
GlobalConst(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i));
+ WrapInFunction(Call(Expr(Source{{56, 78}}, "mix"), 1_f, 2_f, 3_f));
EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(),
- R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a 'const')");
+ EXPECT_EQ(r()->error(), R"(56:78 error: cannot call variable 'mix'
+12:34 note: 'mix' declared here)");
}
-TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVar) {
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalConstUsedAsVariable) {
+ auto* mix = GlobalConst(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i));
+ auto* use = Expr("mix");
+ WrapInFunction(Decl(Var("v", use)));
+
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
+ auto* sem = Sem().Get<sem::VariableUser>(use);
+ ASSERT_NE(sem, nullptr);
+ EXPECT_EQ(sem->Variable(), Sem().Get(mix));
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalConstUsedAsType) {
+ GlobalConst(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i));
+ WrapInFunction(Construct(ty.type_name(Source{{56, 78}}, "mix")));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(56:78 error: cannot use variable 'mix' as type
+12:34 note: 'mix' declared here)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVarUsedAsFunction) {
GlobalVar(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i), ast::AddressSpace::kPrivate);
+ WrapInFunction(Call(Expr(Source{{56, 78}}, "mix"), 1_f, 2_f, 3_f));
EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(
- r()->error(),
- R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a module-scope 'var')");
+ EXPECT_EQ(r()->error(), R"(56:78 error: cannot call variable 'mix'
+12:34 note: 'mix' declared here)");
}
-TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAlias) {
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVarUsedAsVariable) {
+ auto* mix =
+ GlobalVar(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i), ast::AddressSpace::kPrivate);
+ auto* use = Expr("mix");
+ WrapInFunction(Decl(Var("v", use)));
+
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
+ auto* sem = Sem().Get<sem::VariableUser>(use);
+ ASSERT_NE(sem, nullptr);
+ EXPECT_EQ(sem->Variable(), Sem().Get(mix));
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVarUsedAsType) {
+ GlobalVar(Source{{12, 34}}, "mix", ty.i32(), Expr(1_i), ast::AddressSpace::kPrivate);
+ WrapInFunction(Construct(ty.type_name(Source{{56, 78}}, "mix")));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(56:78 error: cannot use variable 'mix' as type
+12:34 note: 'mix' declared here)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAliasUsedAsFunction) {
Alias(Source{{12, 34}}, "mix", ty.i32());
+ WrapInFunction(Call(Source{{56, 78}}, "mix", 1_f, 2_f, 3_f));
EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(),
- R"(12:34 error: 'mix' is a builtin and cannot be redeclared as an alias)");
+ EXPECT_EQ(r()->error(), R"(56:78 error: no matching initializer for i32(f32, f32, f32)
+
+2 candidate initializers:
+ i32(i32) -> i32
+ i32() -> i32
+
+1 candidate conversion:
+ i32<T>(T) -> i32 where: T is abstract-int, abstract-float, f32, f16, u32 or bool
+)");
}
-TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStruct) {
- Structure(Source{{12, 34}}, "mix",
- utils::Vector{
- Member("m", ty.i32()),
- });
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAliasUsedAsVariable) {
+ Alias(Source{{12, 34}}, "mix", ty.i32());
+ WrapInFunction(Decl(Var("v", Expr(Source{{56, 78}}, "mix"))));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(56:78 error: missing '(' for builtin call)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAliasUsedAsType) {
+ auto* mix = Alias(Source{{12, 34}}, "mix", ty.i32());
+ auto* use = Construct(ty.type_name("mix"));
+ WrapInFunction(use);
+
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
+ auto* sem = Sem().Get<sem::Call>(use);
+ ASSERT_NE(sem, nullptr);
+ EXPECT_EQ(sem->Type(), Sem().Get(mix));
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStructUsedAsFunction) {
+ Structure("mix", utils::Vector{
+ Member("m", ty.i32()),
+ });
+ WrapInFunction(Call(Source{{12, 34}}, "mix", 1_f, 2_f, 3_f));
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
- R"(12:34 error: 'mix' is a builtin and cannot be redeclared as a struct)");
+ R"(12:34 error: struct initializer has too many inputs: expected 1, found 3)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStructUsedAsVariable) {
+ Structure("mix", utils::Vector{
+ Member("m", ty.i32()),
+ });
+ WrapInFunction(Decl(Var("v", Expr(Source{{12, 34}}, "mix"))));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), R"(12:34 error: missing '(' for builtin call)");
+}
+
+TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStructUsedAsType) {
+ auto* mix = Structure("mix", utils::Vector{
+ Member("m", ty.i32()),
+ });
+ auto* use = Construct(ty.type_name("mix"));
+ WrapInFunction(use);
+
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
+ auto* sem = Sem().Get<sem::Call>(use);
+ ASSERT_NE(sem, nullptr);
+ EXPECT_EQ(sem->Type(), Sem().Get(mix));
}
namespace texture_constexpr_args {
@@ -443,20 +565,23 @@
INSTANTIATE_TEST_SUITE_P(
Component,
BuiltinTextureConstExprArgValidationTest,
- testing::Combine(testing::ValuesIn(TextureCases({ValidTextureOverload::kGather2dF32,
- ValidTextureOverload::kGather2dOffsetF32,
- ValidTextureOverload::kGather2dArrayF32,
- ValidTextureOverload::kGather2dArrayOffsetF32,
- ValidTextureOverload::kGatherCubeF32,
- ValidTextureOverload::kGatherCubeArrayF32})),
- testing::Values(Parameter{"component", Position::kFirst, 0, 3}),
- testing::Values(Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 0},
- Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 1},
- Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 2},
- Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 3},
- Constexpr{0, Constexpr::Kind::kScalar, 4},
- Constexpr{0, Constexpr::Kind::kScalar, 123},
- Constexpr{0, Constexpr::Kind::kScalar, -1})));
+ testing::Combine(
+ testing::ValuesIn(TextureCases({
+ ValidTextureOverload::kGather2dF32, ValidTextureOverload::kGather2dOffsetF32,
+ ValidTextureOverload::kGather2dArrayF32, ValidTextureOverload::kGatherCubeF32,
+ // The below require mixed integer signedness.
+ // See https://github.com/gpuweb/gpuweb/issues/3536
+ // ValidTextureOverload::kGather2dArrayOffsetF32,
+ // ValidTextureOverload::kGatherCubeArrayF32,
+ })),
+ testing::Values(Parameter{"component", Position::kFirst, 0, 3}),
+ testing::Values(Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 0},
+ Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 1},
+ Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 2},
+ Constexpr{Constexpr::kValid, Constexpr::Kind::kScalar, 3},
+ Constexpr{0, Constexpr::Kind::kScalar, 4},
+ Constexpr{0, Constexpr::Kind::kScalar, 123},
+ Constexpr{0, Constexpr::Kind::kScalar, -1})));
} // namespace texture_constexpr_args
diff --git a/src/tint/resolver/const_eval.cc b/src/tint/resolver/const_eval.cc
index 0e0678a..b61151d 100644
--- a/src/tint/resolver/const_eval.cc
+++ b/src/tint/resolver/const_eval.cc
@@ -54,7 +54,17 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
+template <typename F, typename... CONSTANTS>
+auto Dispatch_iu32(F&& f, CONSTANTS&&... cs) {
+ return Switch(
+ First(cs...)->Type(), //
+ [&](const sem::I32*) { return f(cs->template As<i32>()...); },
+ [&](const sem::U32*) { return f(cs->template As<u32>()...); });
+}
+
+/// Helper that calls `f` passing in the value of all `cs`.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_ia_iu32(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -65,7 +75,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_ia_iu32_bool(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -77,7 +87,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_fia_fi32_f16(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -90,7 +100,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_fia_fiu32_f16(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -104,7 +114,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_fia_fiu32_f16_bool(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -119,7 +129,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_fa_f32_f16(F&& f, CONSTANTS&&... cs) {
return Switch(
@@ -130,7 +140,7 @@
}
/// Helper that calls `f` passing in the value of all `cs`.
-/// Assumes all `cs` are of the same type.
+/// Calls `f` with all constants cast to the type of the first `cs` argument.
template <typename F, typename... CONSTANTS>
auto Dispatch_bool(F&& f, CONSTANTS&&... cs) {
return f(cs->template As<bool>()...);
@@ -182,6 +192,40 @@
return ss.str();
}
+/// @returns the number of consecutive leading bits in `@p e` set to `@p bit_value_to_count`.
+template <typename T>
+auto CountLeadingBits(T e, T bit_value_to_count) -> std::make_unsigned_t<T> {
+ using UT = std::make_unsigned_t<T>;
+ constexpr UT kNumBits = sizeof(UT) * 8;
+ constexpr UT kLeftMost = UT{1} << (kNumBits - 1);
+ const UT b = bit_value_to_count == 0 ? UT{0} : kLeftMost;
+
+ auto v = static_cast<UT>(e);
+ auto count = UT{0};
+ while ((count < kNumBits) && ((v & kLeftMost) == b)) {
+ ++count;
+ v <<= 1;
+ }
+ return count;
+}
+
+/// @returns the number of consecutive trailing bits set to `@p bit_value_to_count` in `@p e`
+template <typename T>
+auto CountTrailingBits(T e, T bit_value_to_count) -> std::make_unsigned_t<T> {
+ using UT = std::make_unsigned_t<T>;
+ constexpr UT kNumBits = sizeof(UT) * 8;
+ constexpr UT kRightMost = UT{1};
+ const UT b = static_cast<UT>(bit_value_to_count);
+
+ auto v = static_cast<UT>(e);
+ auto count = UT{0};
+ while ((count < kNumBits) && ((v & kRightMost) == b)) {
+ ++count;
+ v >>= 1;
+ }
+ return count;
+}
+
/// ImplConstant inherits from sem::Constant to add an private implementation method for conversion.
struct ImplConstant : public sem::Constant {
/// Convert attempts to convert the constant value to the given type. On error, Convert()
@@ -1450,13 +1494,6 @@
UT e2u = static_cast<UT>(e2);
if constexpr (IsAbstract<NumberT>) {
- // NOTE: Concrete shift left requires an unsigned rhs, so this check only applies
- // for abstracts.
- if (e2 < 0) {
- AddError("cannot shift left by a negative value", source);
- return nullptr;
- }
-
// The e2 + 1 most significant bits of e1 must have the same bit value, otherwise
// sign change (overflow) would occur.
// Check sign change only if e2 is less than bit width of e1. If e1 is larger
@@ -1520,6 +1557,12 @@
return Dispatch_ia_iu32(create, c0, c1);
};
+ if (!sem::Type::DeepestElementOf(args[1]->Type())->Is<sem::U32>()) {
+ TINT_ICE(Resolver, builder.Diagnostics())
+ << "Element type of rhs of ShiftLeft must be a u32";
+ return nullptr;
+ }
+
auto r = TransformElements(builder, ty, transform, args[0], args[1]);
if (builder.Diagnostics().contains_errors()) {
return utils::Failure;
@@ -1527,6 +1570,76 @@
return r;
}
+ConstEval::Result ConstEval::any(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ return CreateElement(builder, ty, !args[0]->AllZero());
+}
+
+ConstEval::Result ConstEval::asin(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto i) -> ImplResult {
+ using NumberT = decltype(i);
+ if (i.value < NumberT(-1.0) || i.value > NumberT(1.0)) {
+ AddError("asin must be called with a value in the range [-1, 1]", source);
+ return utils::Failure;
+ }
+ return CreateElement(builder, c0->Type(), decltype(i)(std::asin(i.value)));
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::asinh(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto i) {
+ return CreateElement(builder, c0->Type(), decltype(i)(std::asinh(i.value)));
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+
+ auto r = TransformElements(builder, ty, transform, args[0]);
+ if (builder.Diagnostics().contains_errors()) {
+ return utils::Failure;
+ }
+ return r;
+}
+
+ConstEval::Result ConstEval::atan(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto i) {
+ return CreateElement(builder, c0->Type(), decltype(i)(std::atan(i.value)));
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::atanh(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto i) -> ImplResult {
+ using NumberT = decltype(i);
+ if (i.value <= NumberT(-1.0) || i.value >= NumberT(1.0)) {
+ AddError("atanh must be called with a value in the range (-1, 1)", source);
+ return utils::Failure;
+ }
+ return CreateElement(builder, c0->Type(), decltype(i)(std::atanh(i.value)));
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
ConstEval::Result ConstEval::atan2(const sem::Type* ty,
utils::VectorRef<const sem::Constant*> args,
const Source&) {
@@ -1553,6 +1666,144 @@
return TransformElements(builder, ty, transform, args[0], args[1], args[2]);
}
+ConstEval::Result ConstEval::countLeadingZeros(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ using T = UnwrapNumber<NumberT>;
+ auto count = CountLeadingBits(T{e}, T{0});
+ return CreateElement(builder, c0->Type(), NumberT(count));
+ };
+ return Dispatch_iu32(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::countOneBits(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ using T = UnwrapNumber<NumberT>;
+ using UT = std::make_unsigned_t<T>;
+ constexpr UT kRightMost = UT{1};
+
+ auto count = UT{0};
+ for (auto v = static_cast<UT>(e); v != UT{0}; v >>= 1) {
+ if ((v & kRightMost) == 1) {
+ ++count;
+ }
+ }
+
+ return CreateElement(builder, c0->Type(), NumberT(count));
+ };
+ return Dispatch_iu32(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::countTrailingZeros(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ using T = UnwrapNumber<NumberT>;
+ auto count = CountTrailingBits(T{e}, T{0});
+ return CreateElement(builder, c0->Type(), NumberT(count));
+ };
+ return Dispatch_iu32(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::firstLeadingBit(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ using T = UnwrapNumber<NumberT>;
+ using UT = std::make_unsigned_t<T>;
+ constexpr UT kNumBits = sizeof(UT) * 8;
+
+ NumberT result;
+ if constexpr (IsUnsignedIntegral<T>) {
+ if (e == T{0}) {
+ // T(-1) if e is zero.
+ result = NumberT(static_cast<T>(-1));
+ } else {
+ // Otherwise the position of the most significant 1 bit in e.
+ static_assert(std::is_same_v<T, UT>);
+ UT count = CountLeadingBits(UT{e}, UT{0});
+ UT pos = kNumBits - count - 1;
+ result = NumberT(pos);
+ }
+ } else {
+ if (e == T{0} || e == T{-1}) {
+ // -1 if e is 0 or -1.
+ result = NumberT(-1);
+ } else {
+ // Otherwise the position of the most significant bit in e that is different
+ // from e's sign bit.
+ UT eu = static_cast<UT>(e);
+ UT sign_bit = eu >> (kNumBits - 1);
+ UT count = CountLeadingBits(eu, sign_bit);
+ UT pos = kNumBits - count - 1;
+ result = NumberT(pos);
+ }
+ }
+
+ return CreateElement(builder, c0->Type(), result);
+ };
+ return Dispatch_iu32(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::firstTrailingBit(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ using T = UnwrapNumber<NumberT>;
+ using UT = std::make_unsigned_t<T>;
+
+ NumberT result;
+ if (e == T{0}) {
+ // T(-1) if e is zero.
+ result = NumberT(static_cast<T>(-1));
+ } else {
+ // Otherwise the position of the least significant 1 bit in e.
+ UT pos = CountTrailingBits(T{e}, T{0});
+ result = NumberT(pos);
+ }
+
+ return CreateElement(builder, c0->Type(), result);
+ };
+ return Dispatch_iu32(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::saturate(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) {
+ using NumberT = decltype(e);
+ return CreateElement(builder, c0->Type(),
+ NumberT(std::min(std::max(e, NumberT(0.0)), NumberT(1.0))));
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
ConstEval::Result ConstEval::select_bool(const sem::Type* ty,
utils::VectorRef<const sem::Constant*> args,
const Source&) {
@@ -1582,6 +1833,42 @@
return TransformElements(builder, ty, transform, args[0], args[1]);
}
+ConstEval::Result ConstEval::sign(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0) {
+ auto create = [&](auto e) -> ImplResult {
+ using NumberT = decltype(e);
+ NumberT result;
+ NumberT zero{0.0};
+ if (e.value < zero) {
+ result = NumberT{-1.0};
+ } else if (e.value > zero) {
+ result = NumberT{1.0};
+ } else {
+ result = zero;
+ }
+ return CreateElement(builder, c0->Type(), result);
+ };
+ return Dispatch_fa_f32_f16(create, c0);
+ };
+ return TransformElements(builder, ty, transform, args[0]);
+}
+
+ConstEval::Result ConstEval::step(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source&) {
+ auto transform = [&](const sem::Constant* c0, const sem::Constant* c1) {
+ auto create = [&](auto edge, auto x) -> ImplResult {
+ using NumberT = decltype(edge);
+ NumberT result = x.value < edge.value ? NumberT(0.0) : NumberT(1.0);
+ return CreateElement(builder, c0->Type(), result);
+ };
+ return Dispatch_fa_f32_f16(create, c0, c1);
+ };
+ return TransformElements(builder, ty, transform, args[0], args[1]);
+}
+
ConstEval::Result ConstEval::Convert(const sem::Type* target_ty,
const sem::Constant* value,
const Source& source) {
diff --git a/src/tint/resolver/const_eval.h b/src/tint/resolver/const_eval.h
index 18f1374..91189fa 100644
--- a/src/tint/resolver/const_eval.h
+++ b/src/tint/resolver/const_eval.h
@@ -377,6 +377,51 @@
// Builtins
////////////////////////////////////////////////////////////////////////////
+ /// any builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result any(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// asin builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result asin(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// asinh builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result asinh(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// atan builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result atan(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// atanh builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result atanh(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
/// atan2 builtin
/// @param ty the expression type
/// @param args the input arguments
@@ -395,6 +440,60 @@
utils::VectorRef<const sem::Constant*> args,
const Source& source);
+ /// countLeadingZeros builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result countLeadingZeros(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// countOneBits builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result countOneBits(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// countTrailingZeros builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result countTrailingZeros(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// firstLeadingBit builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result firstLeadingBit(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// firstTrailingBit builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result firstTrailingBit(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// saturate builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result saturate(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
/// select builtin with single bool third arg
/// @param ty the expression type
/// @param args the input arguments
@@ -413,6 +512,24 @@
utils::VectorRef<const sem::Constant*> args,
const Source& source);
+ /// sign builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result sign(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
+ /// step builtin
+ /// @param ty the expression type
+ /// @param args the input arguments
+ /// @param source the source location of the conversion
+ /// @return the result value, or null if the value cannot be calculated
+ Result step(const sem::Type* ty,
+ utils::VectorRef<const sem::Constant*> args,
+ const Source& source);
+
private:
/// Adds the given error message to the diagnostics
void AddError(const std::string& msg, const Source& source) const;
diff --git a/src/tint/resolver/const_eval_binary_op_test.cc b/src/tint/resolver/const_eval_binary_op_test.cc
index b45401e..05a1453 100644
--- a/src/tint/resolver/const_eval_binary_op_test.cc
+++ b/src/tint/resolver/const_eval_binary_op_test.cc
@@ -636,21 +636,21 @@
Vec(T{0b0010'1000'0000}, T{0b0101'0000'0000}, T{0b1010'0000'0000})), //
};
- // Only abstract 0 can be shifted left as much as we like. For concrete 0 (and any number), it
- // cannot be shifted equal or more than the number of bits of the lhs (see
- // ResolverConstEvalShiftLeftConcreteGeqBitWidthError for negative tests)
+ // Abstract 0 can be shifted by any u32 value (0 to 2^32), whereas concrete 0 (or any number)
+ // can only by shifted by a value less than the number of bits of the lhs.
+ // (see ResolverConstEvalShiftLeftConcreteGeqBitWidthError for negative tests)
ConcatIntoIf<IsAbstract<T>>( //
r, std::vector<Case>{
- C(T{0}, ST{64}, T{0}),
- C(T{0}, ST{65}, T{0}),
- C(T{0}, ST{65}, T{0}),
- C(T{0}, ST{10000}, T{0}),
- C(T{0}, T::Highest(), T{0}),
- C(Negate(T{0}), ST{64}, Negate(T{0})),
- C(Negate(T{0}), ST{65}, Negate(T{0})),
- C(Negate(T{0}), ST{65}, Negate(T{0})),
- C(Negate(T{0}), ST{10000}, Negate(T{0})),
- C(Negate(T{0}), T::Highest(), Negate(T{0})),
+ C(T{0}, ST{64}, T{0}), //
+ C(T{0}, ST{65}, T{0}), //
+ C(T{0}, ST{65}, T{0}), //
+ C(T{0}, ST{10000}, T{0}), //
+ C(T{0}, ST{u32::Highest()}, T{0}), //
+ C(Negate(T{0}), ST{64}, Negate(T{0})), //
+ C(Negate(T{0}), ST{65}, Negate(T{0})), //
+ C(Negate(T{0}), ST{65}, Negate(T{0})), //
+ C(Negate(T{0}), ST{10000}, Negate(T{0})), //
+ C(Negate(T{0}), ST{u32::Highest()}, Negate(T{0})), //
});
// Cases that are fine for signed values (no sign change), but would overflow unsigned values.
@@ -898,9 +898,29 @@
// AInt left shift negative value -> error
TEST_F(ResolverConstEvalTest, BinaryAbstractShiftLeftByNegativeValue_Error) {
- GlobalConst("c", Shl(Source{{1, 1}}, Expr(1_a), Expr(-1_a)));
+ GlobalConst("c", Shl(Expr(1_a), Expr(Source{{1, 1}}, -1_a)));
EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(), "1:1 error: cannot shift left by a negative value");
+ EXPECT_EQ(r()->error(), "1:1 error: value -1 cannot be represented as 'u32'");
+}
+
+// AInt left shift by AInt or u32 always results in an AInt
+TEST_F(ResolverConstEvalTest, BinaryAbstractShiftLeftRemainsAbstract) {
+ auto* expr1 = Shl(Expr(1_a), Expr(1_u));
+ GlobalConst("c1", expr1);
+
+ auto* expr2 = Shl(Expr(1_a), Expr(1_a));
+ GlobalConst("c2", expr2);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem1 = Sem().Get(expr1);
+ ASSERT_NE(sem1, nullptr);
+ auto* sem2 = Sem().Get(expr2);
+ ASSERT_NE(sem2, nullptr);
+
+ auto aint_ty = create<sem::AbstractInt>();
+ EXPECT_EQ(sem1->Type(), aint_ty);
+ EXPECT_EQ(sem2->Type(), aint_ty);
}
// i32/u32 left shift by >= 32 -> error
diff --git a/src/tint/resolver/const_eval_builtin_test.cc b/src/tint/resolver/const_eval_builtin_test.cc
index 86223ba..3c275cb 100644
--- a/src/tint/resolver/const_eval_builtin_test.cc
+++ b/src/tint/resolver/const_eval_builtin_test.cc
@@ -90,9 +90,10 @@
auto* expected_expr = expected->Expr(*this);
GlobalConst("E", expected_expr);
- EXPECT_TRUE(r()->Resolve()) << r()->error();
+ ASSERT_TRUE(r()->Resolve()) << r()->error();
auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
const sem::Constant* value = sem->ConstantValue();
ASSERT_NE(value, nullptr);
EXPECT_TYPE(value->Type(), sem->Type());
@@ -145,6 +146,35 @@
C({1.0_a, 0_a}, kPiOver2<AFloat>),
})));
+static std::vector<Case> AnyCases() {
+ return {
+ C({Val(true)}, Val(true)),
+ C({Val(false)}, Val(false)),
+
+ C({Vec(true, true)}, Val(true)),
+ C({Vec(true, false)}, Val(true)),
+ C({Vec(false, true)}, Val(true)),
+ C({Vec(false, false)}, Val(false)),
+
+ C({Vec(true, true, true)}, Val(true)),
+ C({Vec(false, true, true)}, Val(true)),
+ C({Vec(true, false, true)}, Val(true)),
+ C({Vec(true, true, false)}, Val(true)),
+ C({Vec(false, false, false)}, Val(false)),
+
+ C({Vec(true, true, true, true)}, Val(true)),
+ C({Vec(false, true, true, true)}, Val(true)),
+ C({Vec(true, false, true, true)}, Val(true)),
+ C({Vec(true, true, false, true)}, Val(true)),
+ C({Vec(true, true, true, false)}, Val(true)),
+ C({Vec(false, false, false, false)}, Val(false)),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Any,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kAny), testing::ValuesIn(AnyCases())));
+
template <typename T, bool finite_only>
std::vector<Case> Atan2Cases() {
std::vector<Case> cases = {
@@ -169,46 +199,44 @@
C({Vec(T(1.0), T(1.0)), Vec(T(0.0), -T(0.0))}, Vec(kPiOver2<T>, kPiOver2<T>)).FloatComp(),
};
- if constexpr (!finite_only) {
- std::vector<Case> non_finite_cases = {
- // If y is +/-INF and x is finite, +/-PI/2 is returned
- C({T::Inf(), T(0.0)}, kPiOver2<T>).PosOrNeg().FloatComp(),
- C({-T::Inf(), T(0.0)}, kPiOver2<T>).PosOrNeg().FloatComp(),
+ ConcatIntoIf<!finite_only>( //
+ cases, std::vector<Case>{
+ // If y is +/-INF and x is finite, +/-PI/2 is returned
+ C({T::Inf(), T(0.0)}, kPiOver2<T>).PosOrNeg().FloatComp(),
+ C({-T::Inf(), T(0.0)}, kPiOver2<T>).PosOrNeg().FloatComp(),
- // If y is +/-INF and x is -INF, +/-3PI/4 is returned
- C({T::Inf(), -T::Inf()}, k3PiOver4<T>).PosOrNeg().FloatComp(),
- C({-T::Inf(), -T::Inf()}, k3PiOver4<T>).PosOrNeg().FloatComp(),
+ // If y is +/-INF and x is -INF, +/-3PI/4 is returned
+ C({T::Inf(), -T::Inf()}, k3PiOver4<T>).PosOrNeg().FloatComp(),
+ C({-T::Inf(), -T::Inf()}, k3PiOver4<T>).PosOrNeg().FloatComp(),
- // If y is +/-INF and x is +INF, +/-PI/4 is returned
- C({T::Inf(), T::Inf()}, kPiOver4<T>).PosOrNeg().FloatComp(),
- C({-T::Inf(), T::Inf()}, kPiOver4<T>).PosOrNeg().FloatComp(),
+ // If y is +/-INF and x is +INF, +/-PI/4 is returned
+ C({T::Inf(), T::Inf()}, kPiOver4<T>).PosOrNeg().FloatComp(),
+ C({-T::Inf(), T::Inf()}, kPiOver4<T>).PosOrNeg().FloatComp(),
- // If x is -INF and y is finite and positive, +PI is returned
- C({T(0.0), -T::Inf()}, kPi<T>).FloatComp(),
+ // If x is -INF and y is finite and positive, +PI is returned
+ C({T(0.0), -T::Inf()}, kPi<T>).FloatComp(),
- // If x is -INF and y is finite and negative, -PI is returned
- C({-T(0.0), -T::Inf()}, -kPi<T>).FloatComp(),
+ // If x is -INF and y is finite and negative, -PI is returned
+ C({-T(0.0), -T::Inf()}, -kPi<T>).FloatComp(),
- // If x is +INF and y is finite and positive, +0 is returned
- C({T(0.0), T::Inf()}, T(0.0)),
+ // If x is +INF and y is finite and positive, +0 is returned
+ C({T(0.0), T::Inf()}, T(0.0)),
- // If x is +INF and y is finite and negative, -0 is returned
- C({-T(0.0), T::Inf()}, -T(0.0)),
+ // If x is +INF and y is finite and negative, -0 is returned
+ C({-T(0.0), T::Inf()}, -T(0.0)),
- // If either x is NaN or y is NaN, NaN is returned
- C({T::NaN(), T(0.0)}, T::NaN()),
- C({T(0.0), T::NaN()}, T::NaN()),
- C({T::NaN(), T::NaN()}, T::NaN()),
+ // If either x is NaN or y is NaN, NaN is returned
+ C({T::NaN(), T(0.0)}, T::NaN()),
+ C({T(0.0), T::NaN()}, T::NaN()),
+ C({T::NaN(), T::NaN()}, T::NaN()),
- // Vector tests
- C({Vec(T::Inf(), -T::Inf(), T::Inf(), -T::Inf()), //
- Vec(T(0.0), T(0.0), -T::Inf(), -T::Inf())}, //
- Vec(kPiOver2<T>, kPiOver2<T>, k3PiOver4<T>, k3PiOver4<T>))
- .PosOrNeg()
- .FloatComp(),
- };
- cases = Concat(cases, non_finite_cases);
- }
+ // Vector tests
+ C({Vec(T::Inf(), -T::Inf(), T::Inf(), -T::Inf()), //
+ Vec(T(0.0), T(0.0), -T::Inf(), -T::Inf())}, //
+ Vec(kPiOver2<T>, kPiOver2<T>, k3PiOver4<T>, k3PiOver4<T>))
+ .PosOrNeg()
+ .FloatComp(),
+ });
return cases;
}
@@ -220,6 +248,212 @@
Atan2Cases<f32, false>(),
Atan2Cases<f16, false>()))));
+template <typename T, bool finite_only>
+std::vector<Case> AtanCases() {
+ std::vector<Case> cases = {
+ C({T(1.0)}, kPiOver4<T>).FloatComp(),
+ C({-T(1.0)}, -kPiOver4<T>).FloatComp(),
+
+ // If i is +/-0, +/-0 is returned
+ C({T(0.0)}, T(0.0)).PosOrNeg(),
+
+ // Vector tests
+ C({Vec(T(0.0), T(1.0), -T(1.0))}, Vec(T(0.0), kPiOver4<T>, -kPiOver4<T>)).FloatComp(),
+ };
+
+ ConcatIntoIf<!finite_only>( //
+ cases, std::vector<Case>{
+ // If i is +/-INF, +/-PI/2 is returned
+ C({T::Inf()}, kPiOver2<T>).PosOrNeg().FloatComp(),
+ C({-T::Inf()}, -kPiOver2<T>).FloatComp(),
+
+ // If i is NaN, NaN is returned
+ C({T::NaN()}, T::NaN()),
+
+ // Vector tests
+ C({Vec(T::Inf(), -T::Inf(), T::Inf(), -T::Inf())}, //
+ Vec(kPiOver2<T>, -kPiOver2<T>, kPiOver2<T>, -kPiOver2<T>))
+ .FloatComp(),
+ });
+
+ return cases;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Atan,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kAtan),
+ testing::ValuesIn(Concat(AtanCases<AFloat, true>(), //
+ AtanCases<f32, false>(),
+ AtanCases<f16, false>()))));
+
+template <typename T, bool finite_only>
+std::vector<Case> AtanhCases() {
+ std::vector<Case> cases = {
+ // If i is +/-0, +/-0 is returned
+ C({T(0.0)}, T(0.0)).PosOrNeg(),
+
+ C({T(0.9)}, T(1.4722193)).FloatComp(),
+
+ // Vector tests
+ C({Vec(T(0.0), T(0.9), -T(0.9))}, Vec(T(0.0), T(1.4722193), -T(1.4722193))).FloatComp(),
+ };
+
+ ConcatIntoIf<!finite_only>( //
+ cases, std::vector<Case>{
+ // If i is NaN, NaN is returned
+ C({T::NaN()}, T::NaN()),
+
+ // Vector tests
+ C({Vec(T::NaN(), T::NaN())}, Vec(T::NaN(), T::NaN())).FloatComp(),
+ });
+
+ return cases;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Atanh,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kAtanh),
+ testing::ValuesIn(Concat(AtanhCases<AFloat, true>(), //
+ AtanhCases<f32, false>(),
+ AtanhCases<f16, false>()))));
+
+TEST_F(ResolverConstEvalBuiltinTest, Atanh_OutsideRange_Positive) {
+ auto* expr = Call(Source{{12, 24}}, "atanh", Expr(1.0_a));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: atanh must be called with a value in the range (-1, 1)");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Atanh_OutsideRange_Negative) {
+ auto* expr = Call(Source{{12, 24}}, "atanh", Negation(1.0_a));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: atanh must be called with a value in the range (-1, 1)");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Atanh_OutsideRange_Positive_INF) {
+ auto* expr = Call(Source{{12, 24}}, "atanh", Expr(f32::Inf()));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: atanh must be called with a value in the range (-1, 1)");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Atanh_OutsideRange_Negative_INF) {
+ auto* expr = Call(Source{{12, 24}}, "atanh", Negation(f32::Inf()));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: atanh must be called with a value in the range (-1, 1)");
+}
+
+template <typename T, bool finite_only>
+std::vector<Case> AsinCases() {
+ std::vector<Case> cases = {
+ // If i is +/-0, +/-0 is returned
+ C({T(0.0)}, T(0.0)),
+ C({-T(0.0)}, -T(0.0)),
+
+ C({T(1.0)}, kPiOver2<T>).FloatComp(),
+ C({-T(1.0)}, -kPiOver2<T>).FloatComp(),
+
+ // Vector tests
+ C({Vec(T(0.0), T(1.0), -T(1.0))}, Vec(T(0.0), kPiOver2<T>, -kPiOver2<T>)).FloatComp(),
+ };
+
+ ConcatIntoIf<!finite_only>( //
+ cases, std::vector<Case>{
+ // If i is NaN, NaN is returned
+ C({T::NaN()}, T::NaN()),
+
+ // Vector tests
+ C({Vec(T::NaN(), T::NaN())}, Vec(T::NaN(), T::NaN())).FloatComp(),
+ });
+
+ return cases;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Asin,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kAsin),
+ testing::ValuesIn(Concat(AsinCases<AFloat, true>(), //
+ AsinCases<f32, false>(),
+ AsinCases<f16, false>()))));
+
+TEST_F(ResolverConstEvalBuiltinTest, Asin_OutsideRange_Positive) {
+ auto* expr = Call(Source{{12, 24}}, "asin", Expr(1.1_a));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: asin must be called with a value in the range [-1, 1]");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Asin_OutsideRange_Negative) {
+ auto* expr = Call(Source{{12, 24}}, "asin", Negation(1.1_a));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: asin must be called with a value in the range [-1, 1]");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Asin_OutsideRange_Positive_INF) {
+ auto* expr = Call(Source{{12, 24}}, "asin", Expr(f32::Inf()));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: asin must be called with a value in the range [-1, 1]");
+}
+
+TEST_F(ResolverConstEvalBuiltinTest, Asin_OutsideRange_Negative_INF) {
+ auto* expr = Call(Source{{12, 24}}, "asin", Negation(f32::Inf()));
+
+ GlobalConst("C", expr);
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: asin must be called with a value in the range [-1, 1]");
+}
+
+template <typename T, bool finite_only>
+std::vector<Case> AsinhCases() {
+ std::vector<Case> cases = {
+ // If i is +/-0, +/-0 is returned
+ C({T(0.0)}, T(0.0)),
+ C({-T(0.0)}, -T(0.0)),
+
+ C({T(0.9)}, T(0.80886693565278)).FloatComp(),
+ C({-T(2.0)}, -T(1.4436354751788)).FloatComp(),
+
+ // Vector tests
+ C({Vec(T(0.0), T(0.9), -T(2.0))}, //
+ Vec(T(0.0), T(0.8088669356278), -T(1.4436354751788)))
+ .FloatComp(),
+ };
+
+ ConcatIntoIf<!finite_only>( //
+ cases, std::vector<Case>{
+ // If i is +/- INF, +/-INF is returned
+ C({T::Inf()}, T::Inf()),
+ C({-T::Inf()}, -T::Inf()),
+
+ // If i is NaN, NaN is returned
+ C({T::NaN()}, T::NaN()),
+
+ // Vector tests
+ C({Vec(T::Inf(), T::NaN(), -T::Inf())}, //
+ Vec(T::Inf(), T::NaN(), -T::Inf())),
+ });
+
+ return cases;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Asinh,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kAsinh),
+ testing::ValuesIn(Concat(AsinhCases<AFloat, true>(), //
+ AsinhCases<f32, false>(),
+ AsinhCases<f16, false>()))));
+
template <typename T>
std::vector<Case> ClampCases() {
return {
@@ -256,6 +490,255 @@
ClampCases<f16>()))));
template <typename T>
+std::vector<Case> CountLeadingZerosCases() {
+ using B = BitValues<T>;
+ return {
+ C({B::Lsh(1, 31)}, T(0)), //
+ C({B::Lsh(1, 30)}, T(1)), //
+ C({B::Lsh(1, 29)}, T(2)), //
+ C({B::Lsh(1, 28)}, T(3)),
+ //...
+ C({B::Lsh(1, 3)}, T(28)), //
+ C({B::Lsh(1, 2)}, T(29)), //
+ C({B::Lsh(1, 1)}, T(30)), //
+ C({B::Lsh(1, 0)}, T(31)),
+
+ C({T(0b1111'0000'1111'0000'1111'0000'1111'0000)}, T(0)),
+ C({T(0b0111'1000'0111'1000'0111'1000'0111'1000)}, T(1)),
+ C({T(0b0011'1100'0011'1100'0011'1100'0011'1100)}, T(2)),
+ C({T(0b0001'1110'0001'1110'0001'1110'0001'1110)}, T(3)),
+ //...
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0111)}, T(29)),
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0011)}, T(30)),
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0001)}, T(31)),
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0000)}, T(32)),
+
+ // Same as above, but remove leading 0
+ C({T(0b1111'1000'0111'1000'0111'1000'0111'1000)}, T(0)),
+ C({T(0b1011'1100'0011'1100'0011'1100'0011'1100)}, T(0)),
+ C({T(0b1001'1110'0001'1110'0001'1110'0001'1110)}, T(0)),
+ //...
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0111)}, T(0)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0011)}, T(0)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0001)}, T(0)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0000)}, T(0)),
+
+ // Vector tests
+ C({Vec(B::Lsh(1, 31), B::Lsh(1, 30), B::Lsh(1, 29))}, Vec(T(0), T(1), T(2))),
+ C({Vec(B::Lsh(1, 2), B::Lsh(1, 1), B::Lsh(1, 0))}, Vec(T(29), T(30), T(31))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ CountLeadingZeros,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kCountLeadingZeros),
+ testing::ValuesIn(Concat(CountLeadingZerosCases<i32>(), //
+ CountLeadingZerosCases<u32>()))));
+
+template <typename T>
+std::vector<Case> CountTrailingZerosCases() {
+ using B = BitValues<T>;
+ return {
+ C({B::Lsh(1, 31)}, T(31)), //
+ C({B::Lsh(1, 30)}, T(30)), //
+ C({B::Lsh(1, 29)}, T(29)), //
+ C({B::Lsh(1, 28)}, T(28)),
+ //...
+ C({B::Lsh(1, 3)}, T(3)), //
+ C({B::Lsh(1, 2)}, T(2)), //
+ C({B::Lsh(1, 1)}, T(1)), //
+ C({B::Lsh(1, 0)}, T(0)),
+
+ C({T(0b0000'1111'0000'1111'0000'1111'0000'1111)}, T(0)),
+ C({T(0b0001'1110'0001'1110'0001'1110'0001'1110)}, T(1)),
+ C({T(0b0011'1100'0011'1100'0011'1100'0011'1100)}, T(2)),
+ C({T(0b0111'1000'0111'1000'0111'1000'0111'1000)}, T(3)),
+ //...
+ C({T(0b1110'0000'0000'0000'0000'0000'0000'0000)}, T(29)),
+ C({T(0b1100'0000'0000'0000'0000'0000'0000'0000)}, T(30)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0000)}, T(31)),
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0000)}, T(32)),
+
+ //// Same as above, but remove trailing 0
+ C({T(0b0001'1110'0001'1110'0001'1110'0001'1111)}, T(0)),
+ C({T(0b0011'1100'0011'1100'0011'1100'0011'1101)}, T(0)),
+ C({T(0b0111'1000'0111'1000'0111'1000'0111'1001)}, T(0)),
+ //...
+ C({T(0b1110'0000'0000'0000'0000'0000'0000'0001)}, T(0)),
+ C({T(0b1100'0000'0000'0000'0000'0000'0000'0001)}, T(0)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0001)}, T(0)),
+ C({T(0b0000'0000'0000'0000'0000'0000'0000'0001)}, T(0)),
+
+ // Vector tests
+ C({Vec(B::Lsh(1, 31), B::Lsh(1, 30), B::Lsh(1, 29))}, Vec(T(31), T(30), T(29))),
+ C({Vec(B::Lsh(1, 2), B::Lsh(1, 1), B::Lsh(1, 0))}, Vec(T(2), T(1), T(0))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ CountTrailingZeros,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kCountTrailingZeros),
+ testing::ValuesIn(Concat(CountTrailingZerosCases<i32>(), //
+ CountTrailingZerosCases<u32>()))));
+
+template <typename T>
+std::vector<Case> CountOneBitsCases() {
+ using B = BitValues<T>;
+ return {
+ C({T(0)}, T(0)), //
+
+ C({B::Lsh(1, 31)}, T(1)), //
+ C({B::Lsh(1, 30)}, T(1)), //
+ C({B::Lsh(1, 29)}, T(1)), //
+ C({B::Lsh(1, 28)}, T(1)),
+ //...
+ C({B::Lsh(1, 3)}, T(1)), //
+ C({B::Lsh(1, 2)}, T(1)), //
+ C({B::Lsh(1, 1)}, T(1)), //
+ C({B::Lsh(1, 0)}, T(1)),
+
+ C({T(0b1010'1010'1010'1010'1010'1010'1010'1010)}, T(16)),
+ C({T(0b0000'1111'0000'1111'0000'1111'0000'1111)}, T(16)),
+ C({T(0b0101'0000'0000'0000'0000'0000'0000'0101)}, T(4)),
+
+ // Vector tests
+ C({Vec(B::Lsh(1, 31), B::Lsh(1, 30), B::Lsh(1, 29))}, Vec(T(1), T(1), T(1))),
+ C({Vec(B::Lsh(1, 2), B::Lsh(1, 1), B::Lsh(1, 0))}, Vec(T(1), T(1), T(1))),
+
+ C({Vec(T(0b1010'1010'1010'1010'1010'1010'1010'1010),
+ T(0b0000'1111'0000'1111'0000'1111'0000'1111),
+ T(0b0101'0000'0000'0000'0000'0000'0000'0101))},
+ Vec(T(16), T(16), T(4))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ CountOneBits,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kCountOneBits),
+ testing::ValuesIn(Concat(CountOneBitsCases<i32>(), //
+ CountOneBitsCases<u32>()))));
+
+template <typename T>
+std::vector<Case> FirstLeadingBitCases() {
+ using B = BitValues<T>;
+ auto r = std::vector<Case>{
+ // Both signed and unsigned return T(-1) for input 0
+ C({T(0)}, T(-1)),
+
+ C({B::Lsh(1, 30)}, T(30)), //
+ C({B::Lsh(1, 29)}, T(29)), //
+ C({B::Lsh(1, 28)}, T(28)),
+ //...
+ C({B::Lsh(1, 3)}, T(3)), //
+ C({B::Lsh(1, 2)}, T(2)), //
+ C({B::Lsh(1, 1)}, T(1)), //
+ C({B::Lsh(1, 0)}, T(0)),
+
+ C({T(0b0000'0000'0100'1000'1000'1000'0000'0000)}, T(22)),
+ C({T(0b0000'0000'0000'0100'1000'1000'0000'0000)}, T(18)),
+
+ // Vector tests
+ C({Vec(B::Lsh(1, 30), B::Lsh(1, 29), B::Lsh(1, 28))}, Vec(T(30), T(29), T(28))),
+ C({Vec(B::Lsh(1, 2), B::Lsh(1, 1), B::Lsh(1, 0))}, Vec(T(2), T(1), T(0))),
+ };
+
+ ConcatIntoIf<IsUnsignedIntegral<T>>( //
+ r, std::vector<Case>{
+ C({B::Lsh(1, 31)}, T(31)),
+
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1110)}, T(31)),
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1100)}, T(31)),
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1000)}, T(31)),
+ //...
+ C({T(0b1110'0000'0000'0000'0000'0000'0000'0000)}, T(31)),
+ C({T(0b1100'0000'0000'0000'0000'0000'0000'0000)}, T(31)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0000)}, T(31)),
+ });
+
+ ConcatIntoIf<IsSignedIntegral<T>>( //
+ r, std::vector<Case>{
+ // Signed returns -1 for input -1
+ C({T(-1)}, T(-1)),
+
+ C({B::Lsh(1, 31)}, T(30)),
+
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1110)}, T(0)),
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1100)}, T(1)),
+ C({T(0b1111'1111'1111'1111'1111'1111'1111'1000)}, T(2)),
+ //...
+ C({T(0b1110'0000'0000'0000'0000'0000'0000'0000)}, T(28)),
+ C({T(0b1100'0000'0000'0000'0000'0000'0000'0000)}, T(29)),
+ C({T(0b1000'0000'0000'0000'0000'0000'0000'0000)}, T(30)),
+ });
+
+ return r;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ FirstLeadingBit,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kFirstLeadingBit),
+ testing::ValuesIn(Concat(FirstLeadingBitCases<i32>(), //
+ FirstLeadingBitCases<u32>()))));
+
+template <typename T>
+std::vector<Case> FirstTrailingBitCases() {
+ using B = BitValues<T>;
+ auto r = std::vector<Case>{
+ C({T(0)}, T(-1)),
+
+ C({B::Lsh(1, 31)}, T(31)), //
+ C({B::Lsh(1, 30)}, T(30)), //
+ C({B::Lsh(1, 29)}, T(29)), //
+ C({B::Lsh(1, 28)}, T(28)),
+ //...
+ C({B::Lsh(1, 3)}, T(3)), //
+ C({B::Lsh(1, 2)}, T(2)), //
+ C({B::Lsh(1, 1)}, T(1)), //
+ C({B::Lsh(1, 0)}, T(0)),
+
+ C({T(0b0000'0000'0100'1000'1000'1000'0000'0000)}, T(11)),
+ C({T(0b0000'0100'1000'1000'1000'0000'0000'0000)}, T(15)),
+
+ // Vector tests
+ C({Vec(B::Lsh(1, 31), B::Lsh(1, 30), B::Lsh(1, 29))}, Vec(T(31), T(30), T(29))),
+ C({Vec(B::Lsh(1, 2), B::Lsh(1, 1), B::Lsh(1, 0))}, Vec(T(2), T(1), T(0))),
+ };
+
+ return r;
+}
+INSTANTIATE_TEST_SUITE_P( //
+ FirstTrailingBit,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kFirstTrailingBit),
+ testing::ValuesIn(Concat(FirstTrailingBitCases<i32>(), //
+ FirstTrailingBitCases<u32>()))));
+
+template <typename T>
+std::vector<Case> SaturateCases() {
+ return {
+ C({T(0)}, T(0)),
+ C({T(1)}, T(1)),
+ C({T::Lowest()}, T(0)),
+ C({T::Highest()}, T(1)),
+
+ // Vector tests
+ C({Vec(T(0), T(0))}, //
+ Vec(T(0), T(0))), //
+ C({Vec(T(1), T(1))}, //
+ Vec(T(1), T(1))), //
+ C({Vec(T::Lowest(), T(0), T::Highest())}, //
+ Vec(T(0), T(0), T(1))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Saturate,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kSaturate),
+ testing::ValuesIn(Concat(SaturateCases<AFloat>(), //
+ SaturateCases<f32>(),
+ SaturateCases<f16>()))));
+
+template <typename T>
std::vector<Case> SelectCases() {
return {
C({Val(T{1}), Val(T{2}), Val(false)}, Val(T{1})),
@@ -301,5 +784,63 @@
SelectCases<f16>(),
SelectBoolCases()))));
+template <typename T>
+std::vector<Case> SignCases() {
+ return {
+ C({-T(1)}, -T(1)),
+ C({-T(0.5)}, -T(1)),
+ C({T(0)}, T(0)),
+ C({-T(0)}, T(0)),
+ C({T(0.5)}, T(1)),
+ C({T(1)}, T(1)),
+
+ C({T::Highest()}, T(1.0)),
+ C({T::Lowest()}, -T(1.0)),
+
+ // Vector tests
+ C({Vec(-T(0.5), T(0), T(0.5))}, Vec(-T(1.0), T(0.0), T(1.0))),
+ C({Vec(T::Highest(), T::Lowest())}, Vec(T(1.0), -T(1.0))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Sign,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kSign),
+ testing::ValuesIn(Concat(SignCases<AFloat>(), //
+ SignCases<f32>(),
+ SignCases<f16>()))));
+
+template <typename T>
+std::vector<Case> StepCases() {
+ return {
+ C({T(0), T(0)}, T(1.0)),
+ C({T(0), T(0.5)}, T(1.0)),
+ C({T(0.5), T(0)}, T(0.0)),
+ C({T(1), T(0.5)}, T(0.0)),
+ C({T(0.5), T(1)}, T(1.0)),
+ C({T(1.5), T(1)}, T(0.0)),
+ C({T(1), T(1.5)}, T(1.0)),
+ C({T(-1), T(1)}, T(1.0)),
+ C({T(-1), T(1)}, T(1.0)),
+ C({T(1), T(-1)}, T(0.0)),
+ C({T(-1), T(-1.5)}, T(0.0)),
+ C({T(-1.5), T(-1)}, T(1.0)),
+ C({T::Highest(), T::Lowest()}, T(0.0)),
+ C({T::Lowest(), T::Highest()}, T(1.0)),
+
+ // Vector tests
+ C({Vec(T(0), T(0)), Vec(T(0), T(0))}, Vec(T(1.0), T(1.0))),
+ C({Vec(T(-1), T(1)), Vec(T(0), T(0))}, Vec(T(1.0), T(0.0))),
+ C({Vec(T::Highest(), T::Lowest()), Vec(T::Lowest(), T::Highest())}, Vec(T(0.0), T(1.0))),
+ };
+}
+INSTANTIATE_TEST_SUITE_P( //
+ Step,
+ ResolverConstEvalBuiltinTest,
+ testing::Combine(testing::Values(sem::BuiltinType::kStep),
+ testing::ValuesIn(Concat(StepCases<AFloat>(), //
+ StepCases<f32>(),
+ StepCases<f16>()))));
+
} // namespace
} // namespace tint::resolver
diff --git a/src/tint/resolver/const_eval_test.h b/src/tint/resolver/const_eval_test.h
index 1915c05..2f000f8 100644
--- a/src/tint/resolver/const_eval_test.h
+++ b/src/tint/resolver/const_eval_test.h
@@ -236,6 +236,8 @@
struct BitValues {
/// The unwrapped number type
using T = UnwrapNumber<NumberT>;
+ /// The unsigned unwrapped number type
+ using UT = std::make_unsigned_t<T>;
/// Details
struct detail {
/// Unsigned type of `T`
@@ -281,7 +283,7 @@
/// @returns the shifted value
template <typename U, typename V>
static constexpr NumberT Lsh(U val, V shiftBy) {
- return NumberT{static_cast<T>(val) << static_cast<T>(shiftBy)};
+ return NumberT{static_cast<T>(static_cast<UT>(val) << static_cast<UT>(shiftBy))};
}
};
diff --git a/src/tint/resolver/dependency_graph.cc b/src/tint/resolver/dependency_graph.cc
index b6001c1..5a21c55 100644
--- a/src/tint/resolver/dependency_graph.cc
+++ b/src/tint/resolver/dependency_graph.cc
@@ -194,6 +194,7 @@
[&](const ast::Function* func) {
Declare(func->symbol, func);
TraverseAttributes(func->attributes);
+ TraverseAttributes(func->return_type_attributes);
TraverseFunction(func);
},
[&](const ast::Variable* var) {
diff --git a/src/tint/resolver/dependency_graph_test.cc b/src/tint/resolver/dependency_graph_test.cc
index ae314b8..311c9cc 100644
--- a/src/tint/resolver/dependency_graph_test.cc
+++ b/src/tint/resolver/dependency_graph_test.cc
@@ -1270,7 +1270,9 @@
Return(V), //
Break(), //
Discard(), //
- }); //
+ },
+ utils::Empty, // function attributes
+ utils::Vector{Location(V)}); // return attributes
// Exercise type traversal
GlobalVar(Sym(), ty.atomic(T));
GlobalVar(Sym(), ty.bool_());
diff --git a/src/tint/resolver/intrinsic_table.cc b/src/tint/resolver/intrinsic_table.cc
index 314e619..7545f48 100644
--- a/src/tint/resolver/intrinsic_table.cc
+++ b/src/tint/resolver/intrinsic_table.cc
@@ -58,7 +58,7 @@
/// A special type that matches all TypeMatchers
class Any final : public Castable<Any, sem::Type> {
public:
- Any() = default;
+ Any() : Base(sem::TypeFlags{}) {}
~Any() override = default;
// Stub implementations for sem::Type conformance.
@@ -995,17 +995,22 @@
sem::EvaluationStage earliest_eval_stage,
const Source& source) override;
- UnaryOperator Lookup(ast::UnaryOp op, const sem::Type* arg, const Source& source) override;
+ UnaryOperator Lookup(ast::UnaryOp op,
+ const sem::Type* arg,
+ sem::EvaluationStage earliest_eval_stage,
+ const Source& source) override;
BinaryOperator Lookup(ast::BinaryOp op,
const sem::Type* lhs,
const sem::Type* rhs,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source,
bool is_compound) override;
InitOrConv Lookup(InitConvIntrinsic type,
const sem::Type* template_arg,
utils::VectorRef<const sem::Type*> args,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source) override;
private:
@@ -1209,6 +1214,7 @@
IntrinsicTable::UnaryOperator Impl::Lookup(ast::UnaryOp op,
const sem::Type* arg,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source) {
auto [intrinsic_index, intrinsic_name] = [&]() -> std::pair<size_t, const char*> {
switch (op) {
@@ -1240,7 +1246,7 @@
// Resolve the intrinsic overload
auto match = MatchIntrinsic(kUnaryOperators[intrinsic_index], intrinsic_name, args,
- sem::EvaluationStage::kConstant, TemplateState{}, on_no_match);
+ earliest_eval_stage, TemplateState{}, on_no_match);
if (!match.overload) {
return {};
}
@@ -1255,6 +1261,7 @@
IntrinsicTable::BinaryOperator Impl::Lookup(ast::BinaryOp op,
const sem::Type* lhs,
const sem::Type* rhs,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source,
bool is_compound) {
auto [intrinsic_index, intrinsic_name] = [&]() -> std::pair<size_t, const char*> {
@@ -1317,7 +1324,7 @@
// Resolve the intrinsic overload
auto match = MatchIntrinsic(kBinaryOperators[intrinsic_index], intrinsic_name, args,
- sem::EvaluationStage::kConstant, TemplateState{}, on_no_match);
+ earliest_eval_stage, TemplateState{}, on_no_match);
if (!match.overload) {
return {};
}
@@ -1333,6 +1340,7 @@
IntrinsicTable::InitOrConv Impl::Lookup(InitConvIntrinsic type,
const sem::Type* template_arg,
utils::VectorRef<const sem::Type*> args,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source) {
auto name = str(type);
@@ -1372,7 +1380,7 @@
// Resolve the intrinsic overload
auto match = MatchIntrinsic(kInitializersAndConverters[static_cast<size_t>(type)], name, args,
- sem::EvaluationStage::kConstant, templates, on_no_match);
+ earliest_eval_stage, templates, on_no_match);
if (!match.overload) {
return {};
}
@@ -1641,10 +1649,25 @@
const char* intrinsic_name) const {
TemplateState templates;
+ // TODO(crbug.com/tint/1730): Use input evaluation stage to output only relevant overloads.
auto earliest_eval_stage = sem::EvaluationStage::kConstant;
ss << intrinsic_name;
- if (overload->flags.Contains(OverloadFlag::kIsConverter) && overload->template_types) {
+
+ bool print_template_type = false;
+ if (overload->num_template_types > 0) {
+ if (overload->flags.Contains(OverloadFlag::kIsConverter)) {
+ // Print for conversions
+ // e.g. vec3<T>(vec3<U>) -> vec3<f32>
+ print_template_type = true;
+ } else if ((overload->num_parameters == 0) &&
+ overload->flags.Contains(OverloadFlag::kIsInitializer)) {
+ // Print for initializers with no params
+ // e.g. vec2<T>() -> vec2<T>
+ print_template_type = true;
+ }
+ }
+ if (print_template_type) {
ss << "<";
ss << overload->template_types[0].name;
ss << ">";
diff --git a/src/tint/resolver/intrinsic_table.h b/src/tint/resolver/intrinsic_table.h
index bea1e3c..a873df9 100644
--- a/src/tint/resolver/intrinsic_table.h
+++ b/src/tint/resolver/intrinsic_table.h
@@ -87,7 +87,7 @@
/// @param earliest_eval_stage the the earliest evaluation stage that a call to
/// the builtin can be made. This can alter the overloads considered.
/// For example, if the earliest evaluation stage is
- /// `sem::EvaluationStage::kRuntime`, then only concrete argument types
+ /// `sem::EvaluationStage::kRuntime`, then only overloads with concrete argument types
/// will be considered, as all abstract-numerics will have been materialized
/// after shader creation time (sem::EvaluationStage::kConstant).
/// @param source the source of the builtin call
@@ -101,10 +101,19 @@
/// diagnostic if the operator was not found.
/// @param op the unary operator
/// @param arg the type of the expression passed to the operator
+ /// @param earliest_eval_stage the the earliest evaluation stage that a call to
+ /// the unary operator can be made. This can alter the overloads considered.
+ /// For example, if the earliest evaluation stage is
+ /// `sem::EvaluationStage::kRuntime`, then only overloads with concrete argument types
+ /// will be considered, as all abstract-numerics will have been materialized
+ /// after shader creation time (sem::EvaluationStage::kConstant).
/// @param source the source of the operator call
/// @return the operator call target signature. If the operator was not found
/// UnaryOperator::result will be nullptr.
- virtual UnaryOperator Lookup(ast::UnaryOp op, const sem::Type* arg, const Source& source) = 0;
+ virtual UnaryOperator Lookup(ast::UnaryOp op,
+ const sem::Type* arg,
+ sem::EvaluationStage earliest_eval_stage,
+ const Source& source) = 0;
/// Lookup looks for the binary op overload with the given signature, raising an error
/// diagnostic if the operator was not found.
@@ -112,12 +121,19 @@
/// @param lhs the LHS value type passed to the operator
/// @param rhs the RHS value type passed to the operator
/// @param source the source of the operator call
+ /// @param earliest_eval_stage the the earliest evaluation stage that a call to
+ /// the binary operator can be made. This can alter the overloads considered.
+ /// For example, if the earliest evaluation stage is
+ /// `sem::EvaluationStage::kRuntime`, then only overloads with concrete argument types
+ /// will be considered, as all abstract-numerics will have been materialized
+ /// after shader creation time (sem::EvaluationStage::kConstant).
/// @param is_compound true if the binary operator is being used as a compound assignment
/// @return the operator call target signature. If the operator was not found
/// BinaryOperator::result will be nullptr.
virtual BinaryOperator Lookup(ast::BinaryOp op,
const sem::Type* lhs,
const sem::Type* rhs,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source,
bool is_compound) = 0;
@@ -126,11 +142,19 @@
/// @param type the type being constructed or converted
/// @param template_arg the optional template argument
/// @param args the argument types passed to the initializer / conversion call
+ /// @param earliest_eval_stage the the earliest evaluation stage that a call to
+ /// the initializer or conversion can be made. This can alter the overloads considered.
+ /// For example, if the earliest evaluation stage is
+ /// `sem::EvaluationStage::kRuntime`, then only overloads with concrete argument types
+ /// will be considered, as all abstract-numerics will have been materialized
+ /// after shader creation time (sem::EvaluationStage::kConstant).
+
/// @param source the source of the call
/// @return a sem::TypeInitializer, sem::TypeConversion or nullptr if nothing matched
virtual InitOrConv Lookup(InitConvIntrinsic type,
const sem::Type* template_arg,
utils::VectorRef<const sem::Type*> args,
+ sem::EvaluationStage earliest_eval_stage,
const Source& source) = 0;
};
diff --git a/src/tint/resolver/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl
index 268e332..c6d3ad4 100644
--- a/src/tint/resolver/intrinsic_table.inl
+++ b/src/tint/resolver/intrinsic_table.inl
@@ -2559,6 +2559,8 @@
private:
TemplateTypeMatcher template_type_0_{0};
TemplateTypeMatcher template_type_1_{1};
+ TemplateTypeMatcher template_type_2_{2};
+ TemplateTypeMatcher template_type_3_{3};
TemplateNumberMatcher template_number_0_{0};
TemplateNumberMatcher template_number_1_{1};
TemplateNumberMatcher template_number_2_{2};
@@ -2645,76 +2647,78 @@
~Matchers();
/// The template types, types, and type matchers
- TypeMatcher const* const type[69] = {
+ TypeMatcher const* const type[71] = {
/* [0] */ &template_type_0_,
/* [1] */ &template_type_1_,
- /* [2] */ &Bool_,
- /* [3] */ &Ia_,
- /* [4] */ &Fa_,
- /* [5] */ &I32_,
- /* [6] */ &U32_,
- /* [7] */ &F32_,
- /* [8] */ &F16_,
- /* [9] */ &Vec2_,
- /* [10] */ &Vec3_,
- /* [11] */ &Vec4_,
- /* [12] */ &Mat2X2_,
- /* [13] */ &Mat2X3_,
- /* [14] */ &Mat2X4_,
- /* [15] */ &Mat3X2_,
- /* [16] */ &Mat3X3_,
- /* [17] */ &Mat3X4_,
- /* [18] */ &Mat4X2_,
- /* [19] */ &Mat4X3_,
- /* [20] */ &Mat4X4_,
- /* [21] */ &Vec_,
- /* [22] */ &Mat_,
- /* [23] */ &Ptr_,
- /* [24] */ &Atomic_,
- /* [25] */ &Array_,
- /* [26] */ &Sampler_,
- /* [27] */ &SamplerComparison_,
- /* [28] */ &Texture1D_,
- /* [29] */ &Texture2D_,
- /* [30] */ &Texture2DArray_,
- /* [31] */ &Texture3D_,
- /* [32] */ &TextureCube_,
- /* [33] */ &TextureCubeArray_,
- /* [34] */ &TextureMultisampled2D_,
- /* [35] */ &TextureDepth2D_,
- /* [36] */ &TextureDepth2DArray_,
- /* [37] */ &TextureDepthCube_,
- /* [38] */ &TextureDepthCubeArray_,
- /* [39] */ &TextureDepthMultisampled2D_,
- /* [40] */ &TextureStorage1D_,
- /* [41] */ &TextureStorage2D_,
- /* [42] */ &TextureStorage2DArray_,
- /* [43] */ &TextureStorage3D_,
- /* [44] */ &TextureExternal_,
- /* [45] */ &ModfResult_,
- /* [46] */ &ModfResultVec_,
- /* [47] */ &FrexpResult_,
- /* [48] */ &FrexpResultVec_,
- /* [49] */ &AtomicCompareExchangeResult_,
- /* [50] */ &Scalar_,
- /* [51] */ &ConcreteScalar_,
- /* [52] */ &ScalarNoF32_,
- /* [53] */ &ScalarNoF16_,
- /* [54] */ &ScalarNoI32_,
- /* [55] */ &ScalarNoU32_,
- /* [56] */ &ScalarNoBool_,
- /* [57] */ &FiaFiu32F16_,
- /* [58] */ &FiaFi32F16_,
- /* [59] */ &FiaFiu32_,
- /* [60] */ &FaF32_,
- /* [61] */ &FaF32F16_,
- /* [62] */ &IaIu32_,
- /* [63] */ &Fiu32F16_,
- /* [64] */ &Fiu32_,
- /* [65] */ &Fi32F16_,
- /* [66] */ &Fi32_,
- /* [67] */ &F32F16_,
- /* [68] */ &Iu32_,
+ /* [2] */ &template_type_2_,
+ /* [3] */ &template_type_3_,
+ /* [4] */ &Bool_,
+ /* [5] */ &Ia_,
+ /* [6] */ &Fa_,
+ /* [7] */ &I32_,
+ /* [8] */ &U32_,
+ /* [9] */ &F32_,
+ /* [10] */ &F16_,
+ /* [11] */ &Vec2_,
+ /* [12] */ &Vec3_,
+ /* [13] */ &Vec4_,
+ /* [14] */ &Mat2X2_,
+ /* [15] */ &Mat2X3_,
+ /* [16] */ &Mat2X4_,
+ /* [17] */ &Mat3X2_,
+ /* [18] */ &Mat3X3_,
+ /* [19] */ &Mat3X4_,
+ /* [20] */ &Mat4X2_,
+ /* [21] */ &Mat4X3_,
+ /* [22] */ &Mat4X4_,
+ /* [23] */ &Vec_,
+ /* [24] */ &Mat_,
+ /* [25] */ &Ptr_,
+ /* [26] */ &Atomic_,
+ /* [27] */ &Array_,
+ /* [28] */ &Sampler_,
+ /* [29] */ &SamplerComparison_,
+ /* [30] */ &Texture1D_,
+ /* [31] */ &Texture2D_,
+ /* [32] */ &Texture2DArray_,
+ /* [33] */ &Texture3D_,
+ /* [34] */ &TextureCube_,
+ /* [35] */ &TextureCubeArray_,
+ /* [36] */ &TextureMultisampled2D_,
+ /* [37] */ &TextureDepth2D_,
+ /* [38] */ &TextureDepth2DArray_,
+ /* [39] */ &TextureDepthCube_,
+ /* [40] */ &TextureDepthCubeArray_,
+ /* [41] */ &TextureDepthMultisampled2D_,
+ /* [42] */ &TextureStorage1D_,
+ /* [43] */ &TextureStorage2D_,
+ /* [44] */ &TextureStorage2DArray_,
+ /* [45] */ &TextureStorage3D_,
+ /* [46] */ &TextureExternal_,
+ /* [47] */ &ModfResult_,
+ /* [48] */ &ModfResultVec_,
+ /* [49] */ &FrexpResult_,
+ /* [50] */ &FrexpResultVec_,
+ /* [51] */ &AtomicCompareExchangeResult_,
+ /* [52] */ &Scalar_,
+ /* [53] */ &ConcreteScalar_,
+ /* [54] */ &ScalarNoF32_,
+ /* [55] */ &ScalarNoF16_,
+ /* [56] */ &ScalarNoI32_,
+ /* [57] */ &ScalarNoU32_,
+ /* [58] */ &ScalarNoBool_,
+ /* [59] */ &FiaFiu32F16_,
+ /* [60] */ &FiaFi32F16_,
+ /* [61] */ &FiaFiu32_,
+ /* [62] */ &FaF32_,
+ /* [63] */ &FaF32F16_,
+ /* [64] */ &IaIu32_,
+ /* [65] */ &Fiu32F16_,
+ /* [66] */ &Fiu32_,
+ /* [67] */ &Fi32F16_,
+ /* [68] */ &Fi32_,
+ /* [69] */ &F32F16_,
+ /* [70] */ &Iu32_,
};
/// The template numbers, and number matchers
@@ -2737,247 +2741,244 @@
Matchers::~Matchers() = default;
constexpr MatcherIndex kMatcherIndices[] = {
- /* [0] */ 23,
+ /* [0] */ 25,
/* [1] */ 0,
- /* [2] */ 24,
+ /* [2] */ 26,
/* [3] */ 0,
/* [4] */ 7,
- /* [5] */ 23,
+ /* [5] */ 25,
/* [6] */ 10,
- /* [7] */ 25,
+ /* [7] */ 27,
/* [8] */ 0,
/* [9] */ 0,
- /* [10] */ 22,
- /* [11] */ 1,
- /* [12] */ 2,
+ /* [10] */ 24,
+ /* [11] */ 0,
+ /* [12] */ 1,
/* [13] */ 0,
- /* [14] */ 22,
- /* [15] */ 1,
+ /* [14] */ 24,
+ /* [15] */ 0,
/* [16] */ 0,
/* [17] */ 0,
- /* [18] */ 22,
+ /* [18] */ 24,
/* [19] */ 0,
- /* [20] */ 1,
+ /* [20] */ 2,
/* [21] */ 0,
- /* [22] */ 22,
- /* [23] */ 0,
+ /* [22] */ 24,
+ /* [23] */ 1,
/* [24] */ 0,
/* [25] */ 0,
- /* [26] */ 22,
- /* [27] */ 0,
+ /* [26] */ 24,
+ /* [27] */ 1,
/* [28] */ 2,
/* [29] */ 0,
- /* [30] */ 21,
+ /* [30] */ 23,
/* [31] */ 0,
/* [32] */ 0,
- /* [33] */ 21,
- /* [34] */ 0,
- /* [35] */ 2,
- /* [36] */ 21,
+ /* [33] */ 45,
+ /* [34] */ 5,
+ /* [35] */ 6,
+ /* [36] */ 23,
/* [37] */ 0,
- /* [38] */ 7,
- /* [39] */ 21,
- /* [40] */ 1,
- /* [41] */ 0,
- /* [42] */ 21,
- /* [43] */ 0,
+ /* [38] */ 4,
+ /* [39] */ 44,
+ /* [40] */ 5,
+ /* [41] */ 6,
+ /* [42] */ 43,
+ /* [43] */ 5,
/* [44] */ 6,
- /* [45] */ 48,
+ /* [45] */ 44,
/* [46] */ 0,
- /* [47] */ 0,
- /* [48] */ 21,
- /* [49] */ 0,
- /* [50] */ 3,
- /* [51] */ 21,
- /* [52] */ 0,
- /* [53] */ 5,
- /* [54] */ 43,
- /* [55] */ 5,
+ /* [47] */ 1,
+ /* [48] */ 42,
+ /* [49] */ 5,
+ /* [50] */ 6,
+ /* [51] */ 45,
+ /* [52] */ 4,
+ /* [53] */ 6,
+ /* [54] */ 44,
+ /* [55] */ 4,
/* [56] */ 6,
- /* [57] */ 42,
- /* [58] */ 5,
+ /* [57] */ 43,
+ /* [58] */ 4,
/* [59] */ 6,
- /* [60] */ 41,
- /* [61] */ 5,
- /* [62] */ 6,
- /* [63] */ 40,
- /* [64] */ 5,
+ /* [60] */ 23,
+ /* [61] */ 0,
+ /* [62] */ 9,
+ /* [63] */ 42,
+ /* [64] */ 4,
/* [65] */ 6,
- /* [66] */ 43,
- /* [67] */ 4,
+ /* [66] */ 45,
+ /* [67] */ 3,
/* [68] */ 6,
- /* [69] */ 42,
- /* [70] */ 4,
- /* [71] */ 6,
- /* [72] */ 41,
- /* [73] */ 4,
+ /* [69] */ 23,
+ /* [70] */ 1,
+ /* [71] */ 0,
+ /* [72] */ 44,
+ /* [73] */ 3,
/* [74] */ 6,
- /* [75] */ 40,
- /* [76] */ 4,
+ /* [75] */ 43,
+ /* [76] */ 3,
/* [77] */ 6,
- /* [78] */ 43,
- /* [79] */ 3,
- /* [80] */ 6,
- /* [81] */ 42,
- /* [82] */ 3,
- /* [83] */ 6,
- /* [84] */ 41,
- /* [85] */ 3,
- /* [86] */ 6,
- /* [87] */ 40,
- /* [88] */ 3,
- /* [89] */ 6,
- /* [90] */ 42,
+ /* [78] */ 50,
+ /* [79] */ 0,
+ /* [80] */ 0,
+ /* [81] */ 45,
+ /* [82] */ 0,
+ /* [83] */ 1,
+ /* [84] */ 43,
+ /* [85] */ 0,
+ /* [86] */ 1,
+ /* [87] */ 42,
+ /* [88] */ 0,
+ /* [89] */ 1,
+ /* [90] */ 23,
/* [91] */ 0,
- /* [92] */ 1,
- /* [93] */ 43,
+ /* [92] */ 7,
+ /* [93] */ 23,
/* [94] */ 0,
- /* [95] */ 1,
- /* [96] */ 41,
+ /* [95] */ 8,
+ /* [96] */ 48,
/* [97] */ 0,
- /* [98] */ 1,
- /* [99] */ 40,
- /* [100] */ 0,
- /* [101] */ 1,
- /* [102] */ 46,
- /* [103] */ 0,
- /* [104] */ 0,
- /* [105] */ 9,
- /* [106] */ 7,
+ /* [98] */ 0,
+ /* [99] */ 42,
+ /* [100] */ 3,
+ /* [101] */ 6,
+ /* [102] */ 12,
+ /* [103] */ 9,
+ /* [104] */ 12,
+ /* [105] */ 1,
+ /* [106] */ 12,
/* [107] */ 10,
- /* [108] */ 7,
- /* [109] */ 20,
- /* [110] */ 7,
- /* [111] */ 20,
- /* [112] */ 8,
- /* [113] */ 20,
- /* [114] */ 0,
- /* [115] */ 11,
- /* [116] */ 0,
- /* [117] */ 19,
- /* [118] */ 7,
- /* [119] */ 19,
- /* [120] */ 8,
- /* [121] */ 19,
- /* [122] */ 0,
- /* [123] */ 10,
- /* [124] */ 0,
- /* [125] */ 18,
- /* [126] */ 7,
- /* [127] */ 18,
- /* [128] */ 8,
- /* [129] */ 18,
- /* [130] */ 0,
- /* [131] */ 9,
- /* [132] */ 0,
- /* [133] */ 11,
- /* [134] */ 7,
- /* [135] */ 17,
- /* [136] */ 7,
- /* [137] */ 17,
- /* [138] */ 8,
- /* [139] */ 17,
- /* [140] */ 0,
- /* [141] */ 28,
- /* [142] */ 0,
- /* [143] */ 29,
- /* [144] */ 0,
- /* [145] */ 9,
- /* [146] */ 5,
- /* [147] */ 30,
- /* [148] */ 0,
- /* [149] */ 16,
- /* [150] */ 7,
- /* [151] */ 31,
- /* [152] */ 0,
- /* [153] */ 10,
- /* [154] */ 5,
- /* [155] */ 16,
- /* [156] */ 8,
- /* [157] */ 32,
- /* [158] */ 0,
- /* [159] */ 33,
- /* [160] */ 0,
- /* [161] */ 34,
- /* [162] */ 0,
- /* [163] */ 16,
- /* [164] */ 0,
- /* [165] */ 15,
- /* [166] */ 7,
- /* [167] */ 15,
- /* [168] */ 8,
- /* [169] */ 15,
- /* [170] */ 0,
- /* [171] */ 45,
- /* [172] */ 0,
- /* [173] */ 14,
- /* [174] */ 7,
- /* [175] */ 14,
- /* [176] */ 8,
- /* [177] */ 14,
- /* [178] */ 0,
- /* [179] */ 13,
- /* [180] */ 7,
- /* [181] */ 13,
- /* [182] */ 8,
- /* [183] */ 13,
- /* [184] */ 0,
- /* [185] */ 12,
- /* [186] */ 7,
- /* [187] */ 12,
- /* [188] */ 8,
- /* [189] */ 12,
- /* [190] */ 0,
- /* [191] */ 11,
- /* [192] */ 2,
- /* [193] */ 11,
- /* [194] */ 1,
- /* [195] */ 11,
- /* [196] */ 6,
- /* [197] */ 11,
- /* [198] */ 5,
- /* [199] */ 11,
- /* [200] */ 8,
- /* [201] */ 10,
- /* [202] */ 2,
- /* [203] */ 10,
- /* [204] */ 1,
+ /* [108] */ 12,
+ /* [109] */ 7,
+ /* [110] */ 12,
+ /* [111] */ 0,
+ /* [112] */ 11,
+ /* [113] */ 0,
+ /* [114] */ 12,
+ /* [115] */ 8,
+ /* [116] */ 12,
+ /* [117] */ 4,
+ /* [118] */ 13,
+ /* [119] */ 0,
+ /* [120] */ 11,
+ /* [121] */ 4,
+ /* [122] */ 11,
+ /* [123] */ 1,
+ /* [124] */ 11,
+ /* [125] */ 8,
+ /* [126] */ 11,
+ /* [127] */ 7,
+ /* [128] */ 13,
+ /* [129] */ 9,
+ /* [130] */ 11,
+ /* [131] */ 10,
+ /* [132] */ 11,
+ /* [133] */ 9,
+ /* [134] */ 47,
+ /* [135] */ 0,
+ /* [136] */ 30,
+ /* [137] */ 0,
+ /* [138] */ 31,
+ /* [139] */ 0,
+ /* [140] */ 13,
+ /* [141] */ 1,
+ /* [142] */ 32,
+ /* [143] */ 0,
+ /* [144] */ 33,
+ /* [145] */ 0,
+ /* [146] */ 13,
+ /* [147] */ 10,
+ /* [148] */ 34,
+ /* [149] */ 0,
+ /* [150] */ 35,
+ /* [151] */ 0,
+ /* [152] */ 13,
+ /* [153] */ 7,
+ /* [154] */ 36,
+ /* [155] */ 0,
+ /* [156] */ 13,
+ /* [157] */ 8,
+ /* [158] */ 13,
+ /* [159] */ 4,
+ /* [160] */ 14,
+ /* [161] */ 0,
+ /* [162] */ 22,
+ /* [163] */ 9,
+ /* [164] */ 14,
+ /* [165] */ 9,
+ /* [166] */ 14,
+ /* [167] */ 10,
+ /* [168] */ 15,
+ /* [169] */ 0,
+ /* [170] */ 15,
+ /* [171] */ 9,
+ /* [172] */ 49,
+ /* [173] */ 0,
+ /* [174] */ 15,
+ /* [175] */ 10,
+ /* [176] */ 16,
+ /* [177] */ 0,
+ /* [178] */ 16,
+ /* [179] */ 9,
+ /* [180] */ 16,
+ /* [181] */ 10,
+ /* [182] */ 17,
+ /* [183] */ 0,
+ /* [184] */ 17,
+ /* [185] */ 9,
+ /* [186] */ 17,
+ /* [187] */ 10,
+ /* [188] */ 18,
+ /* [189] */ 0,
+ /* [190] */ 18,
+ /* [191] */ 9,
+ /* [192] */ 18,
+ /* [193] */ 10,
+ /* [194] */ 19,
+ /* [195] */ 0,
+ /* [196] */ 19,
+ /* [197] */ 9,
+ /* [198] */ 19,
+ /* [199] */ 10,
+ /* [200] */ 20,
+ /* [201] */ 0,
+ /* [202] */ 20,
+ /* [203] */ 9,
+ /* [204] */ 20,
/* [205] */ 10,
- /* [206] */ 6,
- /* [207] */ 10,
- /* [208] */ 8,
- /* [209] */ 28,
- /* [210] */ 7,
- /* [211] */ 29,
- /* [212] */ 7,
- /* [213] */ 30,
- /* [214] */ 7,
+ /* [206] */ 21,
+ /* [207] */ 0,
+ /* [208] */ 30,
+ /* [209] */ 9,
+ /* [210] */ 51,
+ /* [211] */ 0,
+ /* [212] */ 31,
+ /* [213] */ 9,
+ /* [214] */ 32,
/* [215] */ 9,
- /* [216] */ 2,
+ /* [216] */ 33,
/* [217] */ 9,
- /* [218] */ 1,
- /* [219] */ 31,
- /* [220] */ 7,
- /* [221] */ 9,
- /* [222] */ 6,
- /* [223] */ 32,
- /* [224] */ 7,
- /* [225] */ 33,
- /* [226] */ 7,
- /* [227] */ 9,
- /* [228] */ 8,
- /* [229] */ 47,
- /* [230] */ 0,
- /* [231] */ 49,
- /* [232] */ 0,
- /* [233] */ 26,
- /* [234] */ 27,
- /* [235] */ 38,
- /* [236] */ 37,
- /* [237] */ 36,
- /* [238] */ 35,
- /* [239] */ 44,
- /* [240] */ 39,
+ /* [218] */ 21,
+ /* [219] */ 9,
+ /* [220] */ 21,
+ /* [221] */ 10,
+ /* [222] */ 34,
+ /* [223] */ 9,
+ /* [224] */ 35,
+ /* [225] */ 9,
+ /* [226] */ 22,
+ /* [227] */ 0,
+ /* [228] */ 22,
+ /* [229] */ 10,
+ /* [230] */ 28,
+ /* [231] */ 29,
+ /* [232] */ 40,
+ /* [233] */ 39,
+ /* [234] */ 38,
+ /* [235] */ 37,
+ /* [236] */ 46,
+ /* [237] */ 41,
};
// Assert that the MatcherIndex is big enough to index all the matchers, plus
@@ -3315,247 +3316,247 @@
{
/* [65] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [66] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [67] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [68] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [69] */
/* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [70] */
/* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [71] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [72] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [73] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [74] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [75] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [76] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [77] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [78] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [79] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [80] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [81] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [82] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [83] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [84] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [85] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [86] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [87] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [88] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [89] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [90] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [91] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [92] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [93] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [94] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [95] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[108],
},
{
/* [96] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [97] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [98] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [99] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [100] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [101] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [102] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [103] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [104] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [105] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [106] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [107] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [108] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [109] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [110] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [111] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [112] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [113] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [114] */
@@ -3590,1117 +3591,1117 @@
{
/* [120] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [121] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [122] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [123] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [124] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [125] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [126] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [127] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [128] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [129] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [130] */
/* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [131] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [132] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [133] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [134] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [135] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [136] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [137] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [138] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[224],
},
{
/* [139] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [140] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [141] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [142] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [143] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [144] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [145] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [146] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [147] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [148] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [149] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [150] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [151] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [152] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [153] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [154] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [155] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [156] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [157] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [158] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [159] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [160] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [161] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [162] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [163] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [164] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [165] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [166] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [167] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [168] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [169] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [170] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [171] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [172] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [173] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [174] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[108],
},
{
/* [175] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [176] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [177] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [178] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [179] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [180] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [181] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [182] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [183] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [184] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [185] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [186] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [187] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [188] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [189] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [190] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [191] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [192] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [193] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [194] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [195] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [196] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [197] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [198] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [199] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [200] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [201] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[150],
},
{
/* [202] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [203] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [204] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [205] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[224],
},
{
/* [206] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [207] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [208] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [209] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [210] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [211] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [212] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [213] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [214] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[108],
},
{
/* [215] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [216] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [217] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [218] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [219] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [220] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [221] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [222] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [223] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [224] */
/* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [225] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [226] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [227] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [228] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [229] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [230] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [231] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [232] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [233] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [234] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [235] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[224],
},
{
/* [236] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [237] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [238] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [239] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [240] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [241] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [242] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [243] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [244] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [245] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [246] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [247] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [248] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [249] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [250] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [251] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [252] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [253] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [254] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [255] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [256] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [257] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [258] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [259] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [260] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [261] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [262] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [263] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [264] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [265] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [266] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [267] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [268] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [269] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [270] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [271] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [272] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [273] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [274] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [275] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [276] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [277] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [278] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [279] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [280] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[222],
},
{
/* [281] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [282] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [283] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [284] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [285] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [286] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [287] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [288] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [289] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [290] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [291] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [292] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [293] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [294] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [295] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[214],
},
{
/* [296] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [297] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [298] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [299] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [300] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [301] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [302] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [303] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [304] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [305] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [306] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [307] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [308] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [309] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [310] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [311] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
- },
- {
- /* [312] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
- },
- {
- /* [313] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
- },
- {
- /* [314] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
- },
- {
- /* [315] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
- },
- {
- /* [316] */
- /* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [317] */
+ /* [312] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[231],
+ },
+ {
+ /* [313] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
+ },
+ {
+ /* [314] */
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
+ },
+ {
+ /* [315] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
+ },
+ {
+ /* [316] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
+ },
+ {
+ /* [317] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [318] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [319] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [320] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [321] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [322] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[108],
},
{
/* [323] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[224],
},
{
/* [324] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [325] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [326] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [327] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [328] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[157],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [329] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [330] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [331] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [332] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [333] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [334] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [335] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[81],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [336] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [337] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [338] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [339] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [340] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [341] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [342] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [343] */
@@ -4710,297 +4711,297 @@
{
/* [344] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [345] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [346] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[126],
},
{
/* [347] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [348] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [349] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [350] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [351] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [352] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[148],
},
{
/* [353] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [354] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [355] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kX,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [356] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kY,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [357] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kZ,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [358] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kW,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [359] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
- },
- {
- /* [360] */
- /* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[234],
},
{
- /* [361] */
+ /* [360] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[112],
+ },
+ {
+ /* [361] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [362] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [363] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[39],
},
{
/* [364] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [365] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [366] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[156],
},
{
/* [367] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[69],
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [368] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [369] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [370] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [371] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [372] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [373] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [374] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [375] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [376] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [377] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [378] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [379] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[222],
},
{
/* [380] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [381] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [382] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [383] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[216],
},
{
/* [384] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [385] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [386] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [387] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [388] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [389] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [390] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [391] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[57],
+ /* matcher indices */ &kMatcherIndices[222],
},
{
/* [392] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [393] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [394] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [395] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [396] */
- /* usage */ ParameterUsage::kY,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [397] */
- /* usage */ ParameterUsage::kZ,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [398] */
- /* usage */ ParameterUsage::kW,
+ /* usage */ ParameterUsage::kArrayIndex,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [399] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [400] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [401] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [402] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [403] */
@@ -5010,97 +5011,97 @@
{
/* [404] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [405] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [406] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [407] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [408] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [409] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [410] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [411] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [412] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [413] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [414] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [415] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[72],
},
{
/* [416] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [417] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [418] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [419] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [420] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [421] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [422] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [423] */
@@ -5115,12 +5116,12 @@
{
/* [425] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [426] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [427] */
@@ -5135,137 +5136,137 @@
{
/* [429] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [430] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [431] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[54],
},
{
/* [432] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [433] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [434] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[152],
},
{
/* [435] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [436] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [437] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [438] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[67],
},
{
/* [439] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [440] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [441] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [442] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [443] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [444] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[231],
},
{
/* [445] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [446] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [447] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[240],
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [448] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [449] */
- /* usage */ ParameterUsage::kSampleIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [450] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [451] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [452] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [453] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [454] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [455] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [456] */
@@ -5280,97 +5281,97 @@
{
/* [458] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [459] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[161],
- },
- {
- /* [460] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [461] */
- /* usage */ ParameterUsage::kSampleIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [462] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[151],
- },
- {
- /* [463] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
- },
- {
- /* [464] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [465] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
- },
- {
- /* [466] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [467] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [468] */
/* usage */ ParameterUsage::kX,
/* matcher indices */ &kMatcherIndices[1],
},
{
- /* [469] */
+ /* [460] */
/* usage */ ParameterUsage::kY,
/* matcher indices */ &kMatcherIndices[1],
},
{
- /* [470] */
+ /* [461] */
+ /* usage */ ParameterUsage::kZw,
+ /* matcher indices */ &kMatcherIndices[112],
+ },
+ {
+ /* [462] */
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [463] */
+ /* usage */ ParameterUsage::kYz,
+ /* matcher indices */ &kMatcherIndices[112],
+ },
+ {
+ /* [464] */
+ /* usage */ ParameterUsage::kW,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [465] */
+ /* usage */ ParameterUsage::kXy,
+ /* matcher indices */ &kMatcherIndices[112],
+ },
+ {
+ /* [466] */
/* usage */ ParameterUsage::kZ,
/* matcher indices */ &kMatcherIndices[1],
},
{
- /* [471] */
+ /* [467] */
+ /* usage */ ParameterUsage::kW,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [468] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [469] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
+ },
+ {
+ /* [470] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
+ },
+ {
+ /* [471] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [472] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [473] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [474] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[141],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [475] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [476] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [477] */
@@ -5420,182 +5421,182 @@
{
/* [486] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [487] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [488] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [489] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[54],
+ /* matcher indices */ &kMatcherIndices[222],
},
{
/* [490] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [491] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [492] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[60],
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [493] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kY,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [494] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
- },
- {
- /* [495] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[63],
- },
- {
- /* [496] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [497] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
- },
- {
- /* [498] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
- },
- {
- /* [499] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [500] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [501] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [502] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [503] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [504] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
- },
- {
- /* [505] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [506] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [507] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [508] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [509] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [510] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
- },
- {
- /* [511] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [512] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [513] */
- /* usage */ ParameterUsage::kXy,
- /* matcher indices */ &kMatcherIndices[131],
- },
- {
- /* [514] */
/* usage */ ParameterUsage::kZ,
/* matcher indices */ &kMatcherIndices[1],
},
{
- /* [515] */
- /* usage */ ParameterUsage::kW,
+ /* [495] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[216],
+ },
+ {
+ /* [496] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
+ },
+ {
+ /* [497] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
+ },
+ {
+ /* [498] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[212],
+ },
+ {
+ /* [499] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
+ },
+ {
+ /* [500] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
+ },
+ {
+ /* [501] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[208],
+ },
+ {
+ /* [502] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
+ },
+ {
+ /* [503] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[62],
+ },
+ {
+ /* [504] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
+ },
+ {
+ /* [505] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
+ },
+ {
+ /* [506] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[118],
+ },
+ {
+ /* [507] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [508] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
+ },
+ {
+ /* [509] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[102],
+ },
+ {
+ /* [510] */
+ /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
+ /* [511] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[95],
+ },
+ {
+ /* [512] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[95],
+ },
+ {
+ /* [513] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
+ },
+ {
+ /* [514] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[95],
+ },
+ {
+ /* [515] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[95],
+ },
+ {
/* [516] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[66],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [517] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [518] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [519] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[72],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [520] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [521] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [522] */
@@ -5629,108 +5630,108 @@
},
{
/* [528] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[209],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [529] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [530] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [531] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [532] */
- /* usage */ ParameterUsage::kYz,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [533] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [534] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[75],
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [535] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [536] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [537] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[212],
},
{
/* [538] */
- /* usage */ ParameterUsage::kY,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [539] */
- /* usage */ ParameterUsage::kZw,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [540] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[78],
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [541] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[230],
},
{
/* [542] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [543] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[99],
},
{
/* [544] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [545] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [546] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[75],
},
{
/* [547] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [548] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [549] */
@@ -5745,7 +5746,7 @@
{
/* [551] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [552] */
@@ -5760,97 +5761,97 @@
{
/* [554] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [555] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[66],
},
{
/* [556] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [557] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [558] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[63],
},
{
/* [559] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [560] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[152],
},
{
/* [561] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[57],
},
{
/* [562] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [563] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[152],
},
{
/* [564] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[51],
},
{
/* [565] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [566] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[152],
},
{
/* [567] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[48],
},
{
/* [568] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [569] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[156],
},
{
/* [570] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[84],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [571] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [572] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kSampleIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [573] */
@@ -5885,232 +5886,232 @@
{
/* [579] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[42],
},
{
/* [580] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [581] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[156],
},
{
/* [582] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [583] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [584] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [585] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[87],
+ /* matcher indices */ &kMatcherIndices[33],
},
{
/* [586] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[108],
},
{
/* [587] */
/* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* matcher indices */ &kMatcherIndices[156],
},
{
/* [588] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* matcher indices */ &kMatcherIndices[136],
},
{
/* [589] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [590] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [591] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[154],
},
{
/* [592] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [593] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampleIndex,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [594] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* matcher indices */ &kMatcherIndices[144],
},
{
/* [595] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [596] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [597] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [598] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [599] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[69],
},
{
/* [600] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [601] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [602] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [603] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [604] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [605] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [606] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [607] */
- /* usage */ ParameterUsage::kX,
+ /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [608] */
- /* usage */ ParameterUsage::kZyw,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [609] */
- /* usage */ ParameterUsage::kXyz,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [610] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [611] */
- /* usage */ ParameterUsage::kXy,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [612] */
- /* usage */ ParameterUsage::kZw,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [613] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[18],
},
{
/* [614] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[22],
},
{
/* [615] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [616] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [617] */
- /* usage */ ParameterUsage::kX,
/* matcher indices */ &kMatcherIndices[1],
},
{
+ /* [617] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
+ },
+ {
/* [618] */
- /* usage */ ParameterUsage::kYz,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [619] */
- /* usage */ ParameterUsage::kXy,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [620] */
- /* usage */ ParameterUsage::kZ,
+ /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [621] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [622] */
- /* usage */ ParameterUsage::kY,
+ /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [623] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[141],
+ /* matcher indices */ &kMatcherIndices[136],
},
{
/* [624] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [625] */
@@ -6120,107 +6121,107 @@
{
/* [626] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[42],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [627] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [628] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [629] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [630] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[90],
},
{
/* [631] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [632] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [633] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [634] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[48],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [635] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[151],
+ /* matcher indices */ &kMatcherIndices[144],
},
{
/* [636] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [637] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [638] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[50],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [639] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[157],
+ /* matcher indices */ &kMatcherIndices[148],
},
{
/* [640] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [641] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [642] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[42],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [643] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
+ /* matcher indices */ &kMatcherIndices[150],
},
{
/* [644] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [645] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [646] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [647] */
@@ -6230,17 +6231,17 @@
{
/* [648] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [649] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [650] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [651] */
@@ -6250,62 +6251,62 @@
{
/* [652] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [653] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [654] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [655] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [656] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [657] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [658] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [659] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [660] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [661] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [662] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [663] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [664] */
@@ -6315,22 +6316,22 @@
{
/* [665] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [666] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [667] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [668] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [669] */
@@ -6355,12 +6356,12 @@
{
/* [673] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [674] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [675] */
@@ -6375,32 +6376,32 @@
{
/* [677] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [678] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [679] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [680] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [681] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [682] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [683] */
@@ -6420,37 +6421,37 @@
{
/* [686] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [687] */
- /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
+ /* [687] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
+ },
+ {
/* [688] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kLevel,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [689] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [690] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [691] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [692] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [693] */
@@ -6470,37 +6471,37 @@
{
/* [696] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [697] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [698] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [699] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [700] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [701] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [702] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [703] */
@@ -6515,7 +6516,7 @@
{
/* [705] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [706] */
@@ -6525,7 +6526,7 @@
{
/* [707] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [708] */
@@ -6560,7 +6561,7 @@
{
/* [714] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [715] */
@@ -6570,82 +6571,82 @@
{
/* [716] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [717] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [718] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [719] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [720] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [721] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[26],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [722] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[14],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [723] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[39],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [724] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [725] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [726] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [727] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [728] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [729] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [730] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [731] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [732] */
@@ -6660,67 +6661,67 @@
{
/* [734] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [735] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [736] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [737] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [738] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[93],
},
{
/* [739] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [740] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [741] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [742] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[93],
},
{
/* [743] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [744] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [745] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [746] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [747] */
@@ -6740,32 +6741,32 @@
{
/* [750] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [751] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [752] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[93],
},
{
/* [753] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [754] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kY,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [755] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [756] */
@@ -6785,22 +6786,22 @@
{
/* [759] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [760] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [761] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kXy,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [762] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kZ,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [763] */
@@ -6814,28 +6815,28 @@
},
{
/* [765] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [766] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kYz,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [767] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [768] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [769] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [770] */
@@ -6845,32 +6846,32 @@
{
/* [771] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [772] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [773] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [774] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [775] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [776] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [777] */
@@ -6880,22 +6881,22 @@
{
/* [778] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [779] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [780] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [781] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [782] */
@@ -6904,88 +6905,88 @@
},
{
/* [783] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kXy,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [784] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kZw,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [785] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kXyz,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [786] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kW,
/* matcher indices */ &kMatcherIndices[1],
},
{
/* [787] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [788] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kZyw,
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [789] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [790] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [791] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [792] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [793] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [794] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[51],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [795] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [796] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [797] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [798] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [799] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [800] */
@@ -6995,7 +6996,7 @@
{
/* [801] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [802] */
@@ -7015,202 +7016,202 @@
{
/* [805] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [806] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [807] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [808] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [809] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [810] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [811] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [812] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[150],
},
{
/* [813] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[148],
},
{
/* [814] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[144],
},
{
/* [815] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [816] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [817] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[136],
},
{
/* [818] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[45],
},
{
/* [819] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [820] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [821] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[150],
},
{
/* [822] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [823] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [824] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[81],
},
{
/* [825] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[45],
},
{
/* [826] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[84],
},
{
/* [827] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[87],
},
{
/* [828] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [829] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[232],
},
{
/* [830] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [831] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [832] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [833] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[154],
},
{
/* [834] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[150],
},
{
/* [835] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[148],
},
{
/* [836] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[144],
},
{
/* [837] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[142],
},
{
/* [838] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[138],
},
{
/* [839] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[136],
},
{
/* [840] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [841] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[22],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [842] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [843] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [844] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [845] */
@@ -7225,32 +7226,32 @@
{
/* [847] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[10],
},
{
/* [848] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [849] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [850] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [851] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [852] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[162],
},
{
/* [853] */
@@ -7315,12 +7316,12 @@
{
/* [865] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [866] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [867] */
@@ -7335,12 +7336,12 @@
{
/* [869] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [870] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [871] */
@@ -7365,137 +7366,137 @@
{
/* [875] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [876] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [877] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[133],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [878] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[133],
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [879] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[128],
},
{
/* [880] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [881] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [882] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[240],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[132],
},
{
/* [883] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[161],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [884] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [885] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [886] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [887] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [888] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [889] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[157],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [890] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[151],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [891] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [892] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [893] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[141],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [894] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[90],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [895] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [896] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [897] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [898] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [899] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [900] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [901] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [902] */
@@ -7550,112 +7551,112 @@
{
/* [912] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[111],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [913] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [914] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [915] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [916] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [917] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[93],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [918] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[90],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [919] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[96],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[228],
},
{
/* [920] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[99],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [921] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[240],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [922] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [923] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [924] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [925] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[60],
},
{
/* [926] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[161],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [927] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[14],
},
{
/* [928] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[157],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [929] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[151],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [930] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [931] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [932] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[109],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [933] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [934] */
@@ -7665,12 +7666,12 @@
{
/* [935] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[226],
},
{
/* [936] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[95],
},
{
/* [937] */
@@ -7680,12 +7681,12 @@
{
/* [938] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[220],
},
{
/* [939] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* matcher indices */ &kMatcherIndices[62],
},
{
/* [940] */
@@ -7695,12 +7696,12 @@
{
/* [941] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[113],
+ /* matcher indices */ &kMatcherIndices[218],
},
{
/* [942] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[112],
+ /* matcher indices */ &kMatcherIndices[6],
},
{
/* [943] */
@@ -7710,12 +7711,12 @@
{
/* [944] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[119],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [945] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [946] */
@@ -7725,12 +7726,12 @@
{
/* [947] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[117],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [948] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* matcher indices */ &kMatcherIndices[112],
},
{
/* [949] */
@@ -7739,98 +7740,98 @@
},
{
/* [950] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[141],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [951] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [952] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [953] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [954] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [955] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[122],
},
{
/* [956] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[206],
},
{
/* [957] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [958] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [959] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [960] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [961] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [962] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [963] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [964] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [965] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [966] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[104],
},
{
/* [967] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[121],
+ /* matcher indices */ &kMatcherIndices[204],
},
{
/* [968] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* matcher indices */ &kMatcherIndices[118],
},
{
/* [969] */
@@ -7840,32 +7841,32 @@
{
/* [970] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [971] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [972] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [973] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [974] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [975] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [976] */
@@ -7875,42 +7876,42 @@
{
/* [977] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [978] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[140],
},
{
/* [979] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[140],
},
{
/* [980] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[140],
},
{
/* [981] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[140],
},
{
/* [982] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[127],
+ /* matcher indices */ &kMatcherIndices[202],
},
{
/* [983] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[189],
+ /* matcher indices */ &kMatcherIndices[160],
},
{
/* [984] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [985] */
@@ -7920,57 +7921,57 @@
{
/* [986] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[185],
+ /* matcher indices */ &kMatcherIndices[164],
},
{
/* [987] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[187],
+ /* matcher indices */ &kMatcherIndices[166],
},
{
/* [988] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[125],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[154],
},
{
/* [989] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[183],
+ /* matcher indices */ &kMatcherIndices[168],
},
{
/* [990] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [991] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [992] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[179],
+ /* matcher indices */ &kMatcherIndices[170],
},
{
/* [993] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[181],
+ /* matcher indices */ &kMatcherIndices[174],
},
{
/* [994] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [995] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[177],
+ /* matcher indices */ &kMatcherIndices[176],
},
{
/* [996] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[38],
},
{
/* [997] */
@@ -7980,97 +7981,97 @@
{
/* [998] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[173],
+ /* matcher indices */ &kMatcherIndices[178],
},
{
/* [999] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[175],
+ /* matcher indices */ &kMatcherIndices[180],
},
{
/* [1000] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[200],
},
{
/* [1001] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[169],
+ /* matcher indices */ &kMatcherIndices[182],
},
{
/* [1002] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [1003] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [1004] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[165],
+ /* matcher indices */ &kMatcherIndices[184],
},
{
/* [1005] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[167],
+ /* matcher indices */ &kMatcherIndices[186],
},
{
/* [1006] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[129],
+ /* matcher indices */ &kMatcherIndices[198],
},
{
/* [1007] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[163],
+ /* matcher indices */ &kMatcherIndices[188],
},
{
/* [1008] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[5],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [1009] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [1010] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[149],
+ /* matcher indices */ &kMatcherIndices[190],
},
{
/* [1011] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[155],
+ /* matcher indices */ &kMatcherIndices[192],
},
{
/* [1012] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[137],
+ /* matcher indices */ &kMatcherIndices[196],
},
{
/* [1013] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[139],
+ /* matcher indices */ &kMatcherIndices[194],
},
{
/* [1014] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[5],
},
{
/* [1015] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [1016] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[135],
+ /* matcher indices */ &kMatcherIndices[140],
},
};
@@ -8078,138 +8079,193 @@
{
/* [0] */
/* name */ "T",
- /* matcher index */ 7,
+ /* matcher index */ 66,
},
{
/* [1] */
- /* name */ "U",
- /* matcher index */ 52,
+ /* name */ "C",
+ /* matcher index */ 70,
},
{
/* [2] */
- /* name */ "T",
- /* matcher index */ 2,
+ /* name */ "A",
+ /* matcher index */ 70,
},
{
/* [3] */
- /* name */ "U",
- /* matcher index */ 56,
+ /* name */ "L",
+ /* matcher index */ 70,
},
{
/* [4] */
/* name */ "T",
- /* matcher index */ 6,
+ /* matcher index */ 66,
},
{
/* [5] */
- /* name */ "U",
- /* matcher index */ 55,
+ /* name */ "C",
+ /* matcher index */ 70,
},
{
/* [6] */
- /* name */ "T",
- /* matcher index */ 5,
+ /* name */ "S",
+ /* matcher index */ 70,
},
{
/* [7] */
- /* name */ "U",
- /* matcher index */ 54,
+ /* name */ "T",
+ /* matcher index */ 66,
},
{
/* [8] */
- /* name */ "T",
- /* matcher index */ 8,
+ /* name */ "C",
+ /* matcher index */ 70,
},
{
/* [9] */
- /* name */ "U",
- /* matcher index */ 53,
+ /* name */ "L",
+ /* matcher index */ 70,
},
{
/* [10] */
/* name */ "T",
- /* matcher index */ 50,
+ /* matcher index */ 66,
},
{
/* [11] */
- /* name */ "T",
- /* matcher index */ 57,
+ /* name */ "L",
+ /* matcher index */ 70,
},
{
/* [12] */
/* name */ "T",
- /* matcher index */ 61,
+ /* matcher index */ 9,
},
{
/* [13] */
- /* name */ "T",
- /* matcher index */ 67,
+ /* name */ "U",
+ /* matcher index */ 54,
},
{
/* [14] */
/* name */ "T",
- /* matcher index */ 68,
+ /* matcher index */ 10,
},
{
/* [15] */
- /* name */ "T",
- /* matcher index */ 63,
+ /* name */ "U",
+ /* matcher index */ 55,
},
{
/* [16] */
/* name */ "T",
- /* matcher index */ 64,
+ /* matcher index */ 7,
},
{
/* [17] */
- /* name */ "T",
- /* matcher index */ 51,
+ /* name */ "U",
+ /* matcher index */ 56,
},
{
/* [18] */
/* name */ "T",
- /* matcher index */ kNoMatcher,
+ /* matcher index */ 8,
},
{
/* [19] */
- /* name */ "T",
- /* matcher index */ 56,
+ /* name */ "U",
+ /* matcher index */ 57,
},
{
/* [20] */
/* name */ "T",
- /* matcher index */ 53,
+ /* matcher index */ 4,
},
{
/* [21] */
- /* name */ "T",
- /* matcher index */ 52,
+ /* name */ "U",
+ /* matcher index */ 58,
},
{
/* [22] */
/* name */ "T",
- /* matcher index */ 55,
+ /* matcher index */ 65,
},
{
/* [23] */
/* name */ "T",
- /* matcher index */ 54,
+ /* matcher index */ 69,
},
{
/* [24] */
/* name */ "T",
- /* matcher index */ 3,
+ /* matcher index */ 63,
},
{
/* [25] */
/* name */ "T",
- /* matcher index */ 62,
+ /* matcher index */ 70,
},
{
/* [26] */
/* name */ "T",
+ /* matcher index */ 52,
+ },
+ {
+ /* [27] */
+ /* name */ "T",
+ /* matcher index */ 53,
+ },
+ {
+ /* [28] */
+ /* name */ "T",
+ /* matcher index */ 59,
+ },
+ {
+ /* [29] */
+ /* name */ "T",
/* matcher index */ 58,
},
+ {
+ /* [30] */
+ /* name */ "T",
+ /* matcher index */ 55,
+ },
+ {
+ /* [31] */
+ /* name */ "T",
+ /* matcher index */ 54,
+ },
+ {
+ /* [32] */
+ /* name */ "T",
+ /* matcher index */ 57,
+ },
+ {
+ /* [33] */
+ /* name */ "T",
+ /* matcher index */ kNoMatcher,
+ },
+ {
+ /* [34] */
+ /* name */ "T",
+ /* matcher index */ 56,
+ },
+ {
+ /* [35] */
+ /* name */ "T",
+ /* matcher index */ 5,
+ },
+ {
+ /* [36] */
+ /* name */ "T",
+ /* matcher index */ 64,
+ },
+ {
+ /* [37] */
+ /* name */ "T",
+ /* matcher index */ 60,
+ },
};
constexpr TemplateNumberInfo kTemplateNumbers[] = {
@@ -8240,20 +8296,20 @@
},
{
/* [5] */
- /* name */ "N",
- /* matcher index */ kNoMatcher,
- },
- {
- /* [6] */
/* name */ "M",
/* matcher index */ kNoMatcher,
},
{
- /* [7] */
+ /* [6] */
/* name */ "N",
/* matcher index */ kNoMatcher,
},
{
+ /* [7] */
+ /* name */ "M",
+ /* matcher index */ kNoMatcher,
+ },
+ {
/* [8] */
/* name */ "A",
/* matcher index */ kNoMatcher,
@@ -8271,22 +8327,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[950],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[839],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [1] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[623],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8295,22 +8351,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[931],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[838],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [3] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[627],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8319,22 +8375,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[930],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[837],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [5] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[631],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8343,22 +8399,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[929],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* parameters */ &kParameters[836],
+ /* return matcher indices */ &kMatcherIndices[114],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [7] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[635],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* return matcher indices */ &kMatcherIndices[114],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8367,22 +8423,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[928],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[835],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [9] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[639],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8391,22 +8447,22 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[927],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[834],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [11] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[643],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8415,10 +8471,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[926],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[833],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8427,22 +8483,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[925],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[832],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [14] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[649],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[687],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8451,22 +8507,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[924],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[831],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [16] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[653],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8475,22 +8531,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[923],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[830],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [18] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[657],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8499,22 +8555,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[808],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[829],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [20] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[661],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[605],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8523,10 +8579,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[921],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[828],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8535,10 +8591,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[920],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[827],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8547,10 +8603,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[919],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[826],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8559,10 +8615,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[918],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[825],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8571,10 +8627,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[917],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* parameters */ &kParameters[824],
+ /* return matcher indices */ &kMatcherIndices[114],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8583,83 +8639,83 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[915],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[823],
+ /* return matcher indices */ &kMatcherIndices[124],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [27] */
- /* num parameters */ 3,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[528],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[299],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [28] */
- /* num parameters */ 3,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[450],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[290],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [29] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[363],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[230],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [30] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[371],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[102],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [31] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[150],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[371],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [32] */
- /* num parameters */ 3,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[510],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[170],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -8667,107 +8723,107 @@
/* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[375],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[379],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [34] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[504],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[205],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [35] */
/* num parameters */ 4,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[379],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[387],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [36] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[498],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[215],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [37] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[383],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[240],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [38] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[295],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[96],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [39] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[3],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[185],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[407],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [40] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[486],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[285],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [41] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[403],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[534],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kIsDeprecated),
/* const eval */ nullptr,
},
{
@@ -8775,10 +8831,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[27],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -8787,10 +8843,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[968],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -8799,10 +8855,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[969],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecSplat,
},
@@ -8811,10 +8867,10 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[395],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[355],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitS,
},
@@ -8823,10 +8879,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[513],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[465],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8835,10 +8891,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[531],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[462],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8847,10 +8903,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[537],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[459],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8859,10 +8915,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[611],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[783],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8871,10 +8927,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[609],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[785],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8883,10 +8939,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[607],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[787],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8895,10 +8951,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[977],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[1016],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8907,10 +8963,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[978],
- /* return matcher indices */ &kMatcherIndices[199],
+ /* return matcher indices */ &kMatcherIndices[146],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8919,10 +8975,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[6],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[979],
- /* return matcher indices */ &kMatcherIndices[197],
+ /* return matcher indices */ &kMatcherIndices[152],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8931,10 +8987,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[980],
- /* return matcher indices */ &kMatcherIndices[195],
+ /* return matcher indices */ &kMatcherIndices[156],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8943,83 +8999,83 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
+ /* template types */ &kTemplateTypes[20],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[981],
- /* return matcher indices */ &kMatcherIndices[191],
+ /* return matcher indices */ &kMatcherIndices[158],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
/* [57] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[351],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[501],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [58] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[255],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[498],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [59] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[260],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[307],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [60] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[84],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[295],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [61] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[323],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[195],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [62] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[270],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[495],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
@@ -9027,394 +9083,394 @@
/* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[315],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[319],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [64] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[275],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[489],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [65] */
/* num parameters */ 4,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[307],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[323],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [66] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[280],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[486],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [67] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[290],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[335],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [68] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[102],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[347],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [69] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[419],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[165],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [70] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[285],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[468],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [71] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[594],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kIsDeprecated),
+ /* parameters */ &kParameters[395],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [72] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[585],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[367],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [73] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[570],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[155],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [74] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 3,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[335],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[265],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [75] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 3,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[540],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[144],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [76] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[534],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[351],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [77] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 3,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[519],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[200],
+ /* return matcher indices */ &kMatcherIndices[118],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [78] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[367],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[531],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [79] */
- /* num parameters */ 3,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[516],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[343],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [80] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[495],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[339],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [81] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[492],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[175],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [82] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[391],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[507],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [83] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[489],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[331],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [84] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[387],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[543],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [85] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[230],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[546],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [86] */
- /* num parameters */ 5,
- /* num template types */ 1,
+ /* num parameters */ 4,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[240],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[415],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [87] */
- /* num parameters */ 6,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[90],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[555],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [88] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[327],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[558],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [89] */
- /* num parameters */ 5,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[205],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[561],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [90] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[579],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[431],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [91] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[331],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[564],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [92] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[339],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[567],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [93] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[265],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[579],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [94] */
- /* num parameters */ 3,
- /* num template types */ 0,
+ /* num parameters */ 4,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[561],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[363],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [95] */
- /* num parameters */ 4,
+ /* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[343],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[585],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9423,10 +9479,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[27],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -9435,10 +9491,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[957],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -9447,10 +9503,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[958],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[902],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecSplat,
},
@@ -9459,10 +9515,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[468],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[492],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitS,
},
@@ -9471,10 +9527,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[619],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[761],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -9483,10 +9539,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[617],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[765],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -9495,10 +9551,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[962],
- /* return matcher indices */ &kMatcherIndices[107],
+ /* return matcher indices */ &kMatcherIndices[102],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9507,10 +9563,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[963],
- /* return matcher indices */ &kMatcherIndices[207],
+ /* return matcher indices */ &kMatcherIndices[106],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9519,10 +9575,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[6],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[964],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* return matcher indices */ &kMatcherIndices[108],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9531,10 +9587,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[965],
- /* return matcher indices */ &kMatcherIndices[205],
+ /* return matcher indices */ &kMatcherIndices[114],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9543,10 +9599,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
+ /* template types */ &kTemplateTypes[20],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[966],
- /* return matcher indices */ &kMatcherIndices[201],
+ /* return matcher indices */ &kMatcherIndices[116],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9555,10 +9611,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[893],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[817],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9567,10 +9623,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[892],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[816],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9579,10 +9635,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[891],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[815],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9591,10 +9647,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[890],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[814],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9603,10 +9659,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[889],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[813],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9615,10 +9671,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[888],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[812],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9627,10 +9683,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[887],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[811],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9639,10 +9695,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[886],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[810],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9651,10 +9707,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[885],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[809],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9663,682 +9719,682 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[884],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[808],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [117] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[474],
- /* return matcher indices */ &kMatcherIndices[115],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [118] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[471],
- /* return matcher indices */ &kMatcherIndices[115],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [119] */
- /* num parameters */ 4,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[411],
- /* return matcher indices */ &kMatcherIndices[115],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [120] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[462],
- /* return matcher indices */ &kMatcherIndices[115],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [121] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[459],
- /* return matcher indices */ &kMatcherIndices[115],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [122] */
- /* num parameters */ 3,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[453],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [123] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[443],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [124] */
- /* num parameters */ 3,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[447],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [125] */
- /* num parameters */ 2,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[791],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [126] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[737],
+ /* parameters */ &kParameters[763],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [127] */
+ /* [118] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[735],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[775],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [128] */
+ /* [119] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[733],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[777],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [129] */
+ /* [120] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[731],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[801],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [130] */
+ /* [121] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[729],
- /* return matcher indices */ &kMatcherIndices[18],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[797],
+ /* return matcher indices */ &kMatcherIndices[10],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [131] */
+ /* [122] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[727],
- /* return matcher indices */ &kMatcherIndices[18],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[799],
+ /* return matcher indices */ &kMatcherIndices[10],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiply,
},
{
- /* [132] */
+ /* [123] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[1],
- /* parameters */ &kParameters[725],
- /* return matcher indices */ &kMatcherIndices[39],
+ /* parameters */ &kParameters[597],
+ /* return matcher indices */ &kMatcherIndices[69],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiplyMatVec,
},
{
- /* [133] */
+ /* [124] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[1],
- /* parameters */ &kParameters[723],
+ /* parameters */ &kParameters[599],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiplyVecMat,
},
{
- /* [134] */
+ /* [125] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 3,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[0],
- /* parameters */ &kParameters[721],
- /* return matcher indices */ &kMatcherIndices[10],
+ /* parameters */ &kParameters[613],
+ /* return matcher indices */ &kMatcherIndices[26],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMultiplyMatMat,
},
{
- /* [135] */
+ /* [126] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[27],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[131],
+ /* return matcher indices */ &kMatcherIndices[112],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
{
- /* [136] */
+ /* [127] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[948],
- /* return matcher indices */ &kMatcherIndices[131],
+ /* return matcher indices */ &kMatcherIndices[112],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
- /* [137] */
+ /* [128] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[949],
- /* return matcher indices */ &kMatcherIndices[131],
+ /* return matcher indices */ &kMatcherIndices[112],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecSplat,
},
{
- /* [138] */
+ /* [129] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[621],
- /* return matcher indices */ &kMatcherIndices[131],
+ /* parameters */ &kParameters[753],
+ /* return matcher indices */ &kMatcherIndices[112],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitS,
},
{
- /* [139] */
+ /* [130] */
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[951],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* return matcher indices */ &kMatcherIndices[132],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
- /* [140] */
+ /* [131] */
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[952],
+ /* return matcher indices */ &kMatcherIndices[130],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [132] */
+ /* num parameters */ 1,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[16],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[953],
+ /* return matcher indices */ &kMatcherIndices[126],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [133] */
+ /* num parameters */ 1,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[18],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[954],
+ /* return matcher indices */ &kMatcherIndices[124],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [134] */
+ /* num parameters */ 1,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[20],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[955],
+ /* return matcher indices */ &kMatcherIndices[120],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [135] */
+ /* num parameters */ 3,
+ /* num template types */ 3,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[7],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[588],
+ /* return matcher indices */ &kMatcherIndices[118],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [136] */
+ /* num parameters */ 3,
+ /* num template types */ 3,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[7],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[447],
+ /* return matcher indices */ &kMatcherIndices[118],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [137] */
+ /* num parameters */ 4,
+ /* num template types */ 4,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[0],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[435],
+ /* return matcher indices */ &kMatcherIndices[118],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [138] */
+ /* num parameters */ 3,
+ /* num template types */ 3,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[7],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[594],
+ /* return matcher indices */ &kMatcherIndices[118],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [139] */
+ /* num parameters */ 3,
+ /* num template types */ 3,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[4],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[591],
+ /* return matcher indices */ &kMatcherIndices[118],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [140] */
+ /* num parameters */ 3,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
/* template types */ &kTemplateTypes[8],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[952],
- /* return matcher indices */ &kMatcherIndices[227],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[582],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [141] */
- /* num parameters */ 1,
- /* num template types */ 2,
+ /* num parameters */ 4,
+ /* num template types */ 3,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[6],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[953],
- /* return matcher indices */ &kMatcherIndices[145],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[359],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [142] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
+ /* template types */ &kTemplateTypes[5],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[954],
- /* return matcher indices */ &kMatcherIndices[221],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[570],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [143] */
- /* num parameters */ 1,
- /* num template types */ 2,
+ /* num parameters */ 2,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[955],
- /* return matcher indices */ &kMatcherIndices[215],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[609],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [144] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[215],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[375],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [145] */
- /* num parameters */ 6,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[132],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[190],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [146] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[120],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[150],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [147] */
- /* num parameters */ 7,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[65],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[132],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [148] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[235],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[383],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [149] */
- /* num parameters */ 6,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[108],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[210],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [150] */
- /* num parameters */ 5,
+ /* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[245],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[391],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [151] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 5,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[96],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[235],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [152] */
- /* num parameters */ 4,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[407],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[250],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [153] */
- /* num parameters */ 5,
+ /* num parameters */ 6,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[160],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[72],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [154] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[225],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[78],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [155] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 7,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[78],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[65],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [156] */
- /* num parameters */ 4,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[435],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[270],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [157] */
- /* num parameters */ 5,
+ /* num parameters */ 6,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[165],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[90],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [158] */
- /* num parameters */ 4,
+ /* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[439],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[280],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [159] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[170],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[138],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [160] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[415],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [161] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[195],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [162] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[200],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [163] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[138],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [164] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[399],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [165] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[210],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [166] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[163],
+ /* return matcher indices */ &kMatcherIndices[182],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
{
- /* [167] */
+ /* [161] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1007],
- /* return matcher indices */ &kMatcherIndices[163],
+ /* parameters */ &kParameters[1001],
+ /* return matcher indices */ &kMatcherIndices[182],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
- /* [168] */
- /* num parameters */ 9,
+ /* [162] */
+ /* num parameters */ 6,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[40],
- /* return matcher indices */ &kMatcherIndices[163],
+ /* parameters */ &kParameters[114],
+ /* return matcher indices */ &kMatcherIndices[182],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
- /* [169] */
+ /* [163] */
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[564],
- /* return matcher indices */ &kMatcherIndices[163],
+ /* parameters */ &kParameters[453],
+ /* return matcher indices */ &kMatcherIndices[182],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
{
- /* [170] */
+ /* [164] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1010],
- /* return matcher indices */ &kMatcherIndices[155],
+ /* parameters */ &kParameters[1004],
+ /* return matcher indices */ &kMatcherIndices[186],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
- /* [171] */
+ /* [165] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1011],
- /* return matcher indices */ &kMatcherIndices[149],
+ /* parameters */ &kParameters[1005],
+ /* return matcher indices */ &kMatcherIndices[184],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
+ /* [166] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[443],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [167] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[225],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [168] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[255],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [169] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[108],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [170] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[303],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [171] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[245],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
/* [172] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* return matcher indices */ &kMatcherIndices[176],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10347,34 +10403,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[941],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[995],
+ /* return matcher indices */ &kMatcherIndices[176],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
/* [174] */
- /* num parameters */ 16,
+ /* num parameters */ 8,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[0],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[57],
+ /* return matcher indices */ &kMatcherIndices[176],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [175] */
- /* num parameters */ 4,
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[303],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[795],
+ /* return matcher indices */ &kMatcherIndices[176],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10383,10 +10439,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[932],
- /* return matcher indices */ &kMatcherIndices[111],
+ /* parameters */ &kParameters[998],
+ /* return matcher indices */ &kMatcherIndices[180],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10395,238 +10451,238 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[912],
- /* return matcher indices */ &kMatcherIndices[109],
+ /* parameters */ &kParameters[999],
+ /* return matcher indices */ &kMatcherIndices[178],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
/* [178] */
- /* num parameters */ 0,
- /* num template types */ 1,
+ /* num parameters */ 4,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[121],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Zero,
+ /* parameters */ &kParameters[403],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [179] */
- /* num parameters */ 1,
- /* num template types */ 1,
+ /* num parameters */ 5,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[967],
- /* return matcher indices */ &kMatcherIndices[121],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Identity,
+ /* parameters */ &kParameters[260],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [180] */
- /* num parameters */ 12,
+ /* num parameters */ 5,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[28],
- /* return matcher indices */ &kMatcherIndices[121],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::MatInitS,
+ /* parameters */ &kParameters[275],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [181] */
- /* num parameters */ 4,
+ /* num parameters */ 6,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[311],
- /* return matcher indices */ &kMatcherIndices[121],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::MatInitV,
+ /* parameters */ &kParameters[120],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [182] */
- /* num parameters */ 1,
- /* num template types */ 1,
+ /* num parameters */ 4,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[947],
- /* return matcher indices */ &kMatcherIndices[119],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[411],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [183] */
- /* num parameters */ 1,
+ /* num parameters */ 5,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[944],
- /* return matcher indices */ &kMatcherIndices[117],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[160],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [184] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[347],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [185] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[250],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [186] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[155],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [187] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[126],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [188] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[359],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [189] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[220],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [190] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* return matcher indices */ &kMatcherIndices[226],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
{
- /* [191] */
+ /* [185] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1006],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[935],
+ /* return matcher indices */ &kMatcherIndices[226],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
- /* [192] */
- /* num parameters */ 8,
+ /* [186] */
+ /* num parameters */ 16,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[57],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[0],
+ /* return matcher indices */ &kMatcherIndices[226],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
- /* [193] */
+ /* [187] */
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[319],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[419],
+ /* return matcher indices */ &kMatcherIndices[226],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
{
- /* [194] */
+ /* [188] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[988],
- /* return matcher indices */ &kMatcherIndices[127],
+ /* parameters */ &kParameters[852],
+ /* return matcher indices */ &kMatcherIndices[228],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
- /* [195] */
+ /* [189] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[982],
- /* return matcher indices */ &kMatcherIndices[125],
+ /* parameters */ &kParameters[919],
+ /* return matcher indices */ &kMatcherIndices[162],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
+ /* [190] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[327],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [191] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[180],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [192] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[185],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [193] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[126],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [194] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[311],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [195] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[220],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
/* [196] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* return matcher indices */ &kMatcherIndices[206],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10635,10 +10691,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1013],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* parameters */ &kParameters[956],
+ /* return matcher indices */ &kMatcherIndices[206],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -10647,22 +10703,22 @@
/* num parameters */ 12,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[16],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* return matcher indices */ &kMatcherIndices[206],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [199] */
- /* num parameters */ 3,
+ /* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[582],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* parameters */ &kParameters[315],
+ /* return matcher indices */ &kMatcherIndices[206],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10671,10 +10727,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1016],
- /* return matcher indices */ &kMatcherIndices[137],
+ /* parameters */ &kParameters[941],
+ /* return matcher indices */ &kMatcherIndices[220],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10683,94 +10739,94 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1012],
- /* return matcher indices */ &kMatcherIndices[135],
+ /* parameters */ &kParameters[938],
+ /* return matcher indices */ &kMatcherIndices[218],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
/* [202] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[299],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[1017],
+ /* return matcher indices */ &kMatcherIndices[168],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Zero,
},
{
/* [203] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 1,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[175],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[989],
+ /* return matcher indices */ &kMatcherIndices[168],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Identity,
},
{
/* [204] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 6,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[180],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[84],
+ /* return matcher indices */ &kMatcherIndices[168],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::MatInitS,
},
{
/* [205] */
- /* num parameters */ 6,
- /* num template types */ 0,
+ /* num parameters */ 2,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[144],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[793],
+ /* return matcher indices */ &kMatcherIndices[168],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::MatInitV,
},
{
/* [206] */
- /* num parameters */ 4,
- /* num template types */ 0,
+ /* num parameters */ 1,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[431],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[992],
+ /* return matcher indices */ &kMatcherIndices[174],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
},
{
/* [207] */
- /* num parameters */ 5,
- /* num template types */ 0,
+ /* num parameters */ 1,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[190],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[993],
+ /* return matcher indices */ &kMatcherIndices[170],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
},
{
/* [208] */
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* return matcher indices */ &kMatcherIndices[160],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10779,34 +10835,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1001],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[983],
+ /* return matcher indices */ &kMatcherIndices[160],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
/* [210] */
- /* num parameters */ 6,
+ /* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[72],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[399],
+ /* return matcher indices */ &kMatcherIndices[160],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [211] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[543],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[791],
+ /* return matcher indices */ &kMatcherIndices[160],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10815,10 +10871,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1004],
- /* return matcher indices */ &kMatcherIndices[167],
+ /* parameters */ &kParameters[986],
+ /* return matcher indices */ &kMatcherIndices[166],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10827,10 +10883,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1005],
- /* return matcher indices */ &kMatcherIndices[165],
+ /* parameters */ &kParameters[987],
+ /* return matcher indices */ &kMatcherIndices[164],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10839,10 +10895,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* return matcher indices */ &kMatcherIndices[194],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10851,34 +10907,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[995],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[1013],
+ /* return matcher indices */ &kMatcherIndices[194],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
/* [216] */
- /* num parameters */ 8,
+ /* num parameters */ 12,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[49],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[28],
+ /* return matcher indices */ &kMatcherIndices[194],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [217] */
- /* num parameters */ 2,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[601],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[504],
+ /* return matcher indices */ &kMatcherIndices[194],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10887,10 +10943,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[998],
- /* return matcher indices */ &kMatcherIndices[175],
+ /* parameters */ &kParameters[1012],
+ /* return matcher indices */ &kMatcherIndices[198],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10899,10 +10955,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[999],
- /* return matcher indices */ &kMatcherIndices[173],
+ /* parameters */ &kParameters[1006],
+ /* return matcher indices */ &kMatcherIndices[196],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10911,10 +10967,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* return matcher indices */ &kMatcherIndices[188],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10923,34 +10979,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[989],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[1007],
+ /* return matcher indices */ &kMatcherIndices[188],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
/* [222] */
- /* num parameters */ 6,
+ /* num parameters */ 9,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[114],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[40],
+ /* return matcher indices */ &kMatcherIndices[188],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [223] */
- /* num parameters */ 2,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[603],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[450],
+ /* return matcher indices */ &kMatcherIndices[188],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10959,10 +11015,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[992],
- /* return matcher indices */ &kMatcherIndices[181],
+ /* parameters */ &kParameters[1010],
+ /* return matcher indices */ &kMatcherIndices[192],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10971,10 +11027,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[993],
- /* return matcher indices */ &kMatcherIndices[179],
+ /* parameters */ &kParameters[1011],
+ /* return matcher indices */ &kMatcherIndices[190],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10983,10 +11039,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* return matcher indices */ &kMatcherIndices[200],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10995,34 +11051,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[983],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[1000],
+ /* return matcher indices */ &kMatcherIndices[200],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
{
/* [228] */
- /* num parameters */ 4,
+ /* num parameters */ 8,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[355],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[49],
+ /* return matcher indices */ &kMatcherIndices[200],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitS,
},
{
/* [229] */
- /* num parameters */ 2,
+ /* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[605],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[439],
+ /* return matcher indices */ &kMatcherIndices[200],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -11031,10 +11087,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[986],
- /* return matcher indices */ &kMatcherIndices[187],
+ /* parameters */ &kParameters[982],
+ /* return matcher indices */ &kMatcherIndices[204],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11043,10 +11099,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[12],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[987],
- /* return matcher indices */ &kMatcherIndices[185],
+ /* parameters */ &kParameters[967],
+ /* return matcher indices */ &kMatcherIndices[202],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11055,9 +11111,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[763],
+ /* parameters */ &kParameters[669],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpPlus,
@@ -11067,9 +11123,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[761],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[671],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpPlus,
@@ -11079,9 +11135,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[759],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[685],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpPlus,
@@ -11091,9 +11147,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[757],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[695],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpPlus,
@@ -11103,10 +11159,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[751],
- /* return matcher indices */ &kMatcherIndices[18],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[701],
+ /* return matcher indices */ &kMatcherIndices[10],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpPlus,
},
@@ -11115,9 +11171,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[749],
+ /* parameters */ &kParameters[745],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMinus,
@@ -11127,9 +11183,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[745],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[747],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMinus,
@@ -11139,9 +11195,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[743],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[755],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMinus,
@@ -11151,9 +11207,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[741],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[757],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMinus,
@@ -11163,10 +11219,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[739],
- /* return matcher indices */ &kMatcherIndices[18],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[759],
+ /* return matcher indices */ &kMatcherIndices[10],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpMinus,
},
@@ -11175,10 +11231,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[898],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[822],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11187,10 +11243,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[897],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[821],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11199,10 +11255,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[896],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[820],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11211,10 +11267,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[895],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[819],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11223,10 +11279,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[894],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[818],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11235,105 +11291,105 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[699],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[679],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpAnd,
+ /* const eval */ &ConstEval::OpOr,
},
{
/* [248] */
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[697],
- /* return matcher indices */ &kMatcherIndices[33],
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[681],
+ /* return matcher indices */ &kMatcherIndices[36],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpAnd,
+ /* const eval */ &ConstEval::OpOr,
},
{
/* [249] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[25],
+ /* template types */ &kTemplateTypes[36],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[695],
+ /* parameters */ &kParameters[683],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpAnd,
+ /* const eval */ &ConstEval::OpOr,
},
{
/* [250] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[36],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[693],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpAnd,
+ /* const eval */ &ConstEval::OpOr,
},
{
/* [251] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[711],
+ /* parameters */ &kParameters[725],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::OpShiftLeft,
},
{
/* [252] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[709],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[737],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::OpShiftLeft,
},
{
/* [253] */
/* num parameters */ 2,
/* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[707],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[35],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[739],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::OpShiftLeft,
},
{
/* [254] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[705],
+ /* template types */ &kTemplateTypes[35],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[741],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::OpShiftLeft,
},
{
/* [255] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[719],
+ /* parameters */ &kParameters[619],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpDivide,
@@ -11343,9 +11399,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[717],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[625],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpDivide,
@@ -11355,9 +11411,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[715],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[647],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpDivide,
@@ -11367,9 +11423,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[713],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[651],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpDivide,
@@ -11377,144 +11433,144 @@
{
/* [259] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[22],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[691],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[655],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpOr,
+ /* const eval */ nullptr,
},
{
/* [260] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[689],
- /* return matcher indices */ &kMatcherIndices[33],
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[659],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpOr,
+ /* const eval */ nullptr,
},
{
/* [261] */
/* num parameters */ 2,
/* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[687],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[661],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpOr,
+ /* const eval */ nullptr,
},
{
/* [262] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[685],
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[663],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpOr,
+ /* const eval */ nullptr,
},
{
/* [263] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[645],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* parameters */ &kParameters[667],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpShiftLeft,
+ /* const eval */ &ConstEval::OpAnd,
},
{
/* [264] */
/* num parameters */ 2,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[641],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[673],
+ /* return matcher indices */ &kMatcherIndices[36],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpShiftLeft,
+ /* const eval */ &ConstEval::OpAnd,
},
{
/* [265] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[24],
+ /* template types */ &kTemplateTypes[36],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[637],
+ /* parameters */ &kParameters[675],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpShiftLeft,
+ /* const eval */ &ConstEval::OpAnd,
},
{
/* [266] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[24],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[633],
+ /* template types */ &kTemplateTypes[36],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[677],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpShiftLeft,
+ /* const eval */ &ConstEval::OpAnd,
},
{
/* [267] */
- /* num parameters */ 3,
- /* num template types */ 1,
+ /* num parameters */ 0,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[477],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[1017],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Zero,
},
{
/* [268] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[480],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[945],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Identity,
},
{
/* [269] */
- /* num parameters */ 3,
+ /* num parameters */ 1,
/* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[483],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[29],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[946],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
},
{
/* [270] */
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[6],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11523,10 +11579,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[942],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[6],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11535,10 +11591,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[20],
+ /* template types */ &kTemplateTypes[30],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[943],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[6],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11547,10 +11603,10 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* return matcher indices */ &kMatcherIndices[62],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11559,10 +11615,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[945],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[939],
+ /* return matcher indices */ &kMatcherIndices[62],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11571,58 +11627,58 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[19],
+ /* template types */ &kTemplateTypes[31],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[946],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[940],
+ /* return matcher indices */ &kMatcherIndices[62],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
{
/* [276] */
- /* num parameters */ 0,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[53],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Zero,
+ /* parameters */ &kParameters[456],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::select_bool,
},
{
/* [277] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[933],
- /* return matcher indices */ &kMatcherIndices[53],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Identity,
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[26],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[549],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::select_bool,
},
{
/* [278] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[23],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[934],
- /* return matcher indices */ &kMatcherIndices[53],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[26],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[552],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::select_boolvec,
},
{
/* [279] */
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11631,10 +11687,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[936],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11643,10 +11699,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[22],
+ /* template types */ &kTemplateTypes[32],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[937],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11655,7 +11711,7 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
/* return matcher indices */ &kMatcherIndices[4],
@@ -11667,9 +11723,9 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[939],
+ /* parameters */ &kParameters[933],
/* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
@@ -11679,9 +11735,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[21],
+ /* template types */ &kTemplateTypes[34],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[940],
+ /* parameters */ &kParameters[934],
/* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
@@ -11691,70 +11747,70 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[546],
+ /* parameters */ &kParameters[477],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::select_bool,
+ /* const eval */ nullptr,
},
{
/* [286] */
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[549],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[480],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::select_bool,
+ /* const eval */ nullptr,
},
{
/* [287] */
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[552],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[483],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::select_boolvec,
+ /* const eval */ nullptr,
},
{
/* [288] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[913],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[869],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpNot,
},
{
/* [289] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[914],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[870],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpNot,
},
{
/* [290] */
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[827],
- /* return matcher indices */ &kMatcherIndices[4],
+ /* parameters */ &kParameters[899],
+ /* return matcher indices */ &kMatcherIndices[62],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
@@ -11763,35 +11819,35 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[826],
- /* return matcher indices */ &kMatcherIndices[36],
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[898],
+ /* return matcher indices */ &kMatcherIndices[60],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [292] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[836],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[901],
+ /* return matcher indices */ &kMatcherIndices[172],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [293] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[837],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[900],
+ /* return matcher indices */ &kMatcherIndices[78],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -11799,10 +11855,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[838],
- /* return matcher indices */ &kMatcherIndices[4],
+ /* parameters */ &kParameters[895],
+ /* return matcher indices */ &kMatcherIndices[62],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
@@ -11811,10 +11867,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[839],
- /* return matcher indices */ &kMatcherIndices[36],
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[894],
+ /* return matcher indices */ &kMatcherIndices[60],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
@@ -11823,7 +11879,7 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[423],
/* return matcher indices */ &kMatcherIndices[1],
@@ -11835,8 +11891,8 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[427],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
@@ -11847,9 +11903,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[840],
+ /* parameters */ &kParameters[893],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11859,9 +11915,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[844],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[892],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11871,9 +11927,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[795],
+ /* parameters */ &kParameters[607],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11883,9 +11939,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[793],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[629],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11895,9 +11951,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[856],
+ /* parameters */ &kParameters[891],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11907,9 +11963,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[858],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[890],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11919,9 +11975,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[859],
+ /* parameters */ &kParameters[889],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11931,9 +11987,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[860],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[888],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11943,9 +11999,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[861],
+ /* parameters */ &kParameters[887],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11955,9 +12011,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[862],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[886],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11967,9 +12023,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[22],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[779],
+ /* parameters */ &kParameters[773],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11979,9 +12035,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[777],
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[771],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -11991,9 +12047,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[22],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[775],
+ /* parameters */ &kParameters[769],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12003,9 +12059,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[773],
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[767],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12015,10 +12071,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[811],
- /* return matcher indices */ &kMatcherIndices[229],
+ /* parameters */ &kParameters[904],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12027,10 +12083,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[810],
- /* return matcher indices */ &kMatcherIndices[45],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[903],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12039,10 +12095,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[863],
- /* return matcher indices */ &kMatcherIndices[171],
+ /* parameters */ &kParameters[885],
+ /* return matcher indices */ &kMatcherIndices[134],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12051,33 +12107,33 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[864],
- /* return matcher indices */ &kMatcherIndices[102],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[884],
+ /* return matcher indices */ &kMatcherIndices[96],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [316] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[938],
+ /* parameters */ &kParameters[519],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [317] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[956],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[522],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12085,95 +12141,95 @@
{
/* [318] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[960],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[897],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [319] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[994],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[896],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [320] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1000],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[906],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [321] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1015],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[905],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [322] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1014],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[910],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::firstLeadingBit,
},
{
/* [323] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1009],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[909],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::firstLeadingBit,
},
{
/* [324] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1003],
+ /* parameters */ &kParameters[510],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [325] */
- /* num parameters */ 1,
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1002],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[513],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12183,9 +12239,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[996],
+ /* parameters */ &kParameters[912],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12195,9 +12251,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[990],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[911],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12207,9 +12263,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[755],
+ /* parameters */ &kParameters[691],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12219,9 +12275,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[753],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[689],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12231,9 +12287,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[879],
+ /* parameters */ &kParameters[877],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12243,9 +12299,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[880],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[876],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12255,9 +12311,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[984],
+ /* parameters */ &kParameters[875],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12267,45 +12323,45 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[973],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[913],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [334] */
- /* num parameters */ 2,
- /* num template types */ 1,
+ /* num parameters */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[613],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::atan2,
+ /* parameters */ &kParameters[915],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [335] */
- /* num parameters */ 2,
- /* num template types */ 1,
+ /* num parameters */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[615],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::atan2,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[914],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
},
{
/* [336] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[881],
+ /* parameters */ &kParameters[867],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12315,9 +12371,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[899],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[866],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12327,9 +12383,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[900],
+ /* parameters */ &kParameters[865],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12339,9 +12395,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[901],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[864],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12351,47 +12407,47 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[902],
+ /* parameters */ &kParameters[863],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::saturate,
},
{
/* [341] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[903],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[862],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::saturate,
},
{
/* [342] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[813],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[917],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [343] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[812],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[916],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
@@ -12399,33 +12455,33 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[904],
+ /* parameters */ &kParameters[861],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::sign,
},
{
/* [345] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[905],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[860],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::sign,
},
{
/* [346] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[906],
+ /* parameters */ &kParameters[859],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12435,9 +12491,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[907],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[858],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12447,9 +12503,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[908],
+ /* parameters */ &kParameters[856],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12459,9 +12515,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[909],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[855],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12471,7 +12527,7 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[573],
/* return matcher indices */ &kMatcherIndices[1],
@@ -12483,8 +12539,8 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[576],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
@@ -12495,9 +12551,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[910],
+ /* parameters */ &kParameters[854],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12507,9 +12563,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[911],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[853],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12519,71 +12575,71 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[683],
+ /* parameters */ &kParameters[603],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::step,
},
{
/* [355] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[681],
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[601],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::step,
},
{
/* [356] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[970],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[920],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [357] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[959],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[918],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [358] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[916],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[922],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [359] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[935],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[921],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
@@ -12591,9 +12647,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[869],
+ /* parameters */ &kParameters[849],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12603,9 +12659,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[997],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[848],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12613,25 +12669,25 @@
{
/* [362] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[867],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[924],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
/* [363] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[855],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[923],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
@@ -12639,9 +12695,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[985],
+ /* parameters */ &kParameters[846],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12651,178 +12707,178 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[976],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [366] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[456],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::clamp,
- },
- {
- /* [367] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[522],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::clamp,
- },
- {
- /* [368] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[854],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [369] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[853],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [370] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[852],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [371] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[851],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [372] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[850],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [373] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[849],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [374] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[848],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [375] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[847],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [376] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[846],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [377] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[845],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [378] */
- /* num parameters */ 3,
+ /* [366] */
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[507],
+ /* parameters */ &kParameters[749],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [367] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[751],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [368] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[926],
+ /* return matcher indices */ &kMatcherIndices[62],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [369] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[925],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [370] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[721],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpGreaterThanEqual,
+ },
+ {
+ /* [371] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[723],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpGreaterThanEqual,
+ },
+ {
+ /* [372] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[717],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpLessThanEqual,
+ },
+ {
+ /* [373] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[719],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpLessThanEqual,
+ },
+ {
+ /* [374] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[713],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpGreaterThan,
+ },
+ {
+ /* [375] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[715],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpGreaterThan,
+ },
+ {
+ /* [376] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[711],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpLessThan,
+ },
+ {
+ /* [377] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[789],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpLessThan,
+ },
+ {
+ /* [378] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[735],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [379] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[501],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[733],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12831,9 +12887,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[815],
+ /* parameters */ &kParameters[929],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12843,9 +12899,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[814],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[928],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12855,9 +12911,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[22],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[817],
+ /* parameters */ &kParameters[1015],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12867,9 +12923,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[816],
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[1009],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12879,58 +12935,58 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[819],
+ /* parameters */ &kParameters[931],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::countTrailingZeros,
},
{
/* [385] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[818],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[930],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::countTrailingZeros,
},
{
/* [386] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[629],
+ /* parameters */ &kParameters[944],
/* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::countOneBits,
},
{
/* [387] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[625],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[932],
/* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::countOneBits,
},
{
/* [388] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[883],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[988],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12939,45 +12995,45 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[882],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[807],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [390] */
- /* num parameters */ 3,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[567],
+ /* parameters */ &kParameters[950],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::countLeadingZeros,
},
{
/* [391] */
- /* num parameters */ 3,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[558],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[947],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::countLeadingZeros,
},
{
/* [392] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[821],
+ /* parameters */ &kParameters[959],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -12987,107 +13043,107 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[820],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[958],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [394] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[26],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[707],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpNotEqual,
+ },
+ {
+ /* [395] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[26],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[709],
+ /* return matcher indices */ &kMatcherIndices[36],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpNotEqual,
+ },
+ {
+ /* [396] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[823],
+ /* parameters */ &kParameters[961],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [395] */
+ /* [397] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[822],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[960],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [396] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[825],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [397] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[824],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
/* [398] */
- /* num parameters */ 1,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[809],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[471],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::clamp,
},
{
/* [399] */
- /* num parameters */ 1,
- /* num template types */ 0,
+ /* num parameters */ 3,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[922],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[474],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::clamp,
},
{
/* [400] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[829],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[971],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [401] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[828],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[970],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -13095,10 +13151,10 @@
/* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[591],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[537],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13107,307 +13163,283 @@
/* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[588],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[540],
+ /* return matcher indices */ &kMatcherIndices[128],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [404] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[831],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[973],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atanh,
},
{
/* [405] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[830],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[972],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atanh,
},
{
/* [406] */
- /* num parameters */ 1,
- /* num template types */ 0,
+ /* num parameters */ 2,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[833],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* parameters */ &kParameters[781],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atan2,
},
{
/* [407] */
- /* num parameters */ 1,
- /* num template types */ 0,
+ /* num parameters */ 2,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[832],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[779],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atan2,
},
{
/* [408] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[651],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[703],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpGreaterThanEqual,
+ /* const eval */ &ConstEval::OpEqual,
},
{
/* [409] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[647],
- /* return matcher indices */ &kMatcherIndices[33],
+ /* template types */ &kTemplateTypes[26],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[705],
+ /* return matcher indices */ &kMatcherIndices[36],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpGreaterThanEqual,
+ /* const eval */ &ConstEval::OpEqual,
},
{
/* [410] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[659],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpLessThanEqual,
+ /* parameters */ &kParameters[975],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atan,
},
{
/* [411] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[655],
- /* return matcher indices */ &kMatcherIndices[33],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpLessThanEqual,
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[974],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::atan,
},
{
/* [412] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[665],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpGreaterThan,
+ /* parameters */ &kParameters[977],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::asinh,
},
{
/* [413] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[663],
- /* return matcher indices */ &kMatcherIndices[33],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpGreaterThan,
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[976],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::asinh,
},
{
/* [414] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[36],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[669],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[805],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpLessThan,
+ /* const eval */ &ConstEval::OpXor,
},
{
/* [415] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[667],
- /* return matcher indices */ &kMatcherIndices[33],
+ /* template types */ &kTemplateTypes[36],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[665],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpLessThan,
+ /* const eval */ &ConstEval::OpXor,
},
{
/* [416] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[597],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpNotEqual,
+ /* parameters */ &kParameters[985],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::asin,
},
{
/* [417] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[671],
- /* return matcher indices */ &kMatcherIndices[33],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpNotEqual,
+ /* template types */ &kTemplateTypes[24],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[984],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::asin,
},
{
/* [418] */
- /* num parameters */ 2,
- /* num template types */ 1,
+ /* num parameters */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[675],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpEqual,
+ /* parameters */ &kParameters[991],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::any,
},
{
/* [419] */
- /* num parameters */ 2,
- /* num template types */ 1,
+ /* num parameters */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[673],
- /* return matcher indices */ &kMatcherIndices[33],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpEqual,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[990],
+ /* return matcher indices */ &kMatcherIndices[38],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::any,
},
{
/* [420] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[843],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* parameters */ &kParameters[996],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [421] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[842],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[994],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [422] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[25],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[703],
+ /* parameters */ &kParameters[1002],
/* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpXor,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [423] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[701],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[997],
/* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpXor,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [424] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[799],
+ /* parameters */ &kParameters[1008],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [425] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[801],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[1003],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [426] */
/* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[835],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [427] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[834],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [428] */
- /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[26],
+ /* template types */ &kTemplateTypes[37],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[873],
/* return matcher indices */ &kMatcherIndices[1],
@@ -13415,23 +13447,23 @@
/* const eval */ &ConstEval::OpUnaryMinus,
},
{
- /* [429] */
+ /* [427] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[26],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[37],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[874],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpUnaryMinus,
},
{
- /* [430] */
+ /* [428] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[25],
+ /* template types */ &kTemplateTypes[36],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[871],
/* return matcher indices */ &kMatcherIndices[1],
@@ -13439,63 +13471,87 @@
/* const eval */ &ConstEval::OpComplement,
},
{
- /* [431] */
+ /* [429] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[36],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[872],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::OpComplement,
},
{
+ /* [430] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[851],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [431] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[850],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
/* [432] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[807],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpNot,
+ /* parameters */ &kParameters[908],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::firstTrailingBit,
},
{
/* [433] */
/* num parameters */ 1,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[870],
- /* return matcher indices */ &kMatcherIndices[33],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpNot,
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[907],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::firstTrailingBit,
},
{
/* [434] */
- /* num parameters */ 2,
- /* num template types */ 1,
+ /* num parameters */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[797],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[843],
+ /* return matcher indices */ &kMatcherIndices[132],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [435] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[866],
- /* return matcher indices */ &kMatcherIndices[44],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[9],
+ /* parameters */ &kParameters[649],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -13503,35 +13559,35 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[765],
+ /* parameters */ &kParameters[645],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [437] */
- /* num parameters */ 1,
+ /* num parameters */ 2,
/* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[18],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[868],
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[9],
+ /* parameters */ &kParameters[641],
/* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Identity,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [438] */
/* num parameters */ 2,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[805],
- /* return matcher indices */ &kMatcherIndices[53],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[9],
+ /* parameters */ &kParameters[637],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -13539,11 +13595,11 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[803],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[9],
+ /* parameters */ &kParameters[633],
/* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -13551,9 +13607,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[767],
+ /* parameters */ &kParameters[621],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -13563,23 +13619,23 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[769],
+ /* parameters */ &kParameters[617],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [442] */
- /* num parameters */ 1,
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[841],
+ /* template types */ &kTemplateTypes[25],
+ /* template numbers */ &kTemplateNumbers[9],
+ /* parameters */ &kParameters[615],
/* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -13587,10 +13643,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[771],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* parameters */ &kParameters[611],
+ /* return matcher indices */ nullptr,
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13599,10 +13655,10 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[679],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[697],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13611,79 +13667,19 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[677],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[699],
+ /* return matcher indices */ &kMatcherIndices[38],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [446] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[781],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [447] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[783],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [448] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[785],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [449] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[787],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [450] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[789],
- /* return matcher indices */ nullptr,
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [451] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
/* parameters */ &kParameters[857],
/* return matcher indices */ &kMatcherIndices[1],
@@ -13691,38 +13687,98 @@
/* const eval */ nullptr,
},
{
- /* [452] */
- /* num parameters */ 2,
+ /* [447] */
+ /* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[599],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* parameters */ &kParameters[880],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [453] */
+ /* [448] */
+ /* num parameters */ 0,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1017],
+ /* return matcher indices */ nullptr,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [449] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[840],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [450] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[841],
+ /* return matcher indices */ &kMatcherIndices[128],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [451] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[842],
+ /* return matcher indices */ &kMatcherIndices[132],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [452] */
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[25],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[465],
- /* return matcher indices */ &kMatcherIndices[231],
+ /* parameters */ &kParameters[528],
+ /* return matcher indices */ &kMatcherIndices[210],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
+ /* [453] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[844],
+ /* return matcher indices */ &kMatcherIndices[132],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
/* [454] */
/* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[961],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* num template types */ 1,
+ /* num template numbers */ 2,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[5],
+ /* parameters */ &kParameters[847],
+ /* return matcher indices */ &kMatcherIndices[22],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13731,7 +13787,7 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
/* return matcher indices */ nullptr,
@@ -13740,25 +13796,25 @@
},
{
/* [456] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[971],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[525],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [457] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[972],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[803],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13767,10 +13823,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[974],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* parameters */ &kParameters[878],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13779,45 +13835,45 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[975],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* parameters */ &kParameters[879],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [460] */
/* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 2,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[6],
- /* parameters */ &kParameters[991],
- /* return matcher indices */ &kMatcherIndices[14],
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[881],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [461] */
- /* num parameters */ 0,
+ /* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ nullptr,
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[882],
+ /* return matcher indices */ &kMatcherIndices[95],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [462] */
- /* num parameters */ 3,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[525],
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[883],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
@@ -13826,83 +13882,83 @@
/* [463] */
/* num parameters */ 2,
/* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[747],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[743],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [464] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[878],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[516],
+ /* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [465] */
- /* num parameters */ 1,
+ /* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[38],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[877],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* parameters */ &kParameters[727],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [466] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[18],
- /* template numbers */ &kTemplateNumbers[8],
- /* parameters */ &kParameters[1008],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* num parameters */ 2,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[38],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[729],
+ /* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [467] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[876],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[22],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[731],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [468] */
/* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[875],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[23],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[927],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [469] */
- /* num parameters */ 3,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[555],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* template types */ &kTemplateTypes[33],
+ /* template numbers */ &kTemplateNumbers[8],
+ /* parameters */ &kParameters[1014],
+ /* return matcher indices */ &kMatcherIndices[95],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13910,13 +13966,13 @@
/* [470] */
/* num parameters */ 1,
/* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[865],
- /* return matcher indices */ &kMatcherIndices[30],
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[33],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[868],
+ /* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
+ /* const eval */ &ConstEval::Identity,
},
};
@@ -13926,294 +13982,294 @@
/* fn abs<T : fiu32_f16>(T) -> T */
/* fn abs<N : num, T : fiu32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[358],
+ /* overloads */ &kOverloads[382],
},
{
/* [1] */
/* fn acos<T : f32_f16>(T) -> T */
/* fn acos<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[316],
+ /* overloads */ &kOverloads[424],
},
{
/* [2] */
/* fn acosh<T : f32_f16>(T) -> T */
/* fn acosh<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[318],
+ /* overloads */ &kOverloads[422],
},
{
/* [3] */
/* fn all(bool) -> bool */
/* fn all<N : num>(vec<N, bool>) -> bool */
/* num overloads */ 2,
- /* overloads */ &kOverloads[320],
+ /* overloads */ &kOverloads[420],
},
{
/* [4] */
/* fn any(bool) -> bool */
/* fn any<N : num>(vec<N, bool>) -> bool */
/* num overloads */ 2,
- /* overloads */ &kOverloads[322],
+ /* overloads */ &kOverloads[418],
},
{
/* [5] */
/* fn arrayLength<T, A : access>(ptr<storage, array<T>, A>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[466],
+ /* overloads */ &kOverloads[469],
},
{
/* [6] */
- /* fn asin<T : f32_f16>(T) -> T */
- /* fn asin<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
+ /* fn asin<T : fa_f32_f16>(@test_value(0.479425538604) T) -> T */
+ /* fn asin<N : num, T : fa_f32_f16>(@test_value(0.479425538604) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[324],
+ /* overloads */ &kOverloads[416],
},
{
/* [7] */
- /* fn asinh<T : f32_f16>(T) -> T */
- /* fn asinh<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
+ /* fn asinh<T : fa_f32_f16>(T) -> T */
+ /* fn asinh<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[326],
+ /* overloads */ &kOverloads[412],
},
{
/* [8] */
- /* fn atan<T : f32_f16>(T) -> T */
- /* fn atan<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
+ /* fn atan<T : fa_f32_f16>(T) -> T */
+ /* fn atan<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[332],
+ /* overloads */ &kOverloads[410],
},
{
/* [9] */
/* fn atan2<T : fa_f32_f16>(T, T) -> T */
/* fn atan2<T : fa_f32_f16, N : num>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[334],
+ /* overloads */ &kOverloads[406],
},
{
/* [10] */
- /* fn atanh<T : f32_f16>(T) -> T */
- /* fn atanh<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
+ /* fn atanh<T : fa_f32_f16>(@test_value(0.5) T) -> T */
+ /* fn atanh<N : num, T : fa_f32_f16>(@test_value(0.5) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[356],
+ /* overloads */ &kOverloads[404],
},
{
/* [11] */
/* fn ceil<T : f32_f16>(T) -> T */
/* fn ceil<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[362],
+ /* overloads */ &kOverloads[400],
},
{
/* [12] */
/* fn clamp<T : fia_fiu32_f16>(T, T, T) -> T */
/* fn clamp<T : fia_fiu32_f16, N : num>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[366],
+ /* overloads */ &kOverloads[398],
},
{
/* [13] */
/* fn cos<T : f32_f16>(T) -> T */
/* fn cos<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[368],
+ /* overloads */ &kOverloads[396],
},
{
/* [14] */
/* fn cosh<T : f32_f16>(T) -> T */
/* fn cosh<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[370],
+ /* overloads */ &kOverloads[392],
},
{
/* [15] */
/* fn countLeadingZeros<T : iu32>(T) -> T */
/* fn countLeadingZeros<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[372],
+ /* overloads */ &kOverloads[390],
},
{
/* [16] */
/* fn countOneBits<T : iu32>(T) -> T */
/* fn countOneBits<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[374],
+ /* overloads */ &kOverloads[386],
},
{
/* [17] */
/* fn countTrailingZeros<T : iu32>(T) -> T */
/* fn countTrailingZeros<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[376],
+ /* overloads */ &kOverloads[384],
},
{
/* [18] */
/* fn cross<T : f32_f16>(vec3<T>, vec3<T>) -> vec3<T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[434],
+ /* overloads */ &kOverloads[463],
},
{
/* [19] */
/* fn degrees<T : f32_f16>(T) -> T */
/* fn degrees<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[420],
+ /* overloads */ &kOverloads[380],
},
{
/* [20] */
/* fn determinant<N : num, T : f32_f16>(mat<N, N, T>) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[442],
+ /* overloads */ &kOverloads[468],
},
{
/* [21] */
/* fn distance<T : f32_f16>(T, T) -> T */
/* fn distance<N : num, T : f32_f16>(vec<N, T>, vec<N, T>) -> T */
/* num overloads */ 2,
- /* overloads */ &kOverloads[424],
+ /* overloads */ &kOverloads[378],
},
{
/* [22] */
/* fn dot<N : num, T : fiu32_f16>(vec<N, T>, vec<N, T>) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[439],
+ /* overloads */ &kOverloads[467],
},
{
/* [23] */
/* fn dot4I8Packed(u32, u32) -> i32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[438],
+ /* overloads */ &kOverloads[466],
},
{
/* [24] */
/* fn dot4U8Packed(u32, u32) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[452],
+ /* overloads */ &kOverloads[465],
},
{
/* [25] */
/* fn dpdx(f32) -> f32 */
/* fn dpdx<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[426],
+ /* overloads */ &kOverloads[368],
},
{
/* [26] */
/* fn dpdxCoarse(f32) -> f32 */
/* fn dpdxCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[406],
+ /* overloads */ &kOverloads[362],
},
{
/* [27] */
/* fn dpdxFine(f32) -> f32 */
/* fn dpdxFine<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[404],
+ /* overloads */ &kOverloads[358],
},
{
/* [28] */
/* fn dpdy(f32) -> f32 */
/* fn dpdy<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[400],
+ /* overloads */ &kOverloads[356],
},
{
/* [29] */
/* fn dpdyCoarse(f32) -> f32 */
/* fn dpdyCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[290],
+ /* overloads */ &kOverloads[342],
},
{
/* [30] */
/* fn dpdyFine(f32) -> f32 */
/* fn dpdyFine<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[396],
+ /* overloads */ &kOverloads[334],
},
{
/* [31] */
/* fn exp<T : f32_f16>(T) -> T */
/* fn exp<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[394],
+ /* overloads */ &kOverloads[332],
},
{
/* [32] */
/* fn exp2<T : f32_f16>(T) -> T */
/* fn exp2<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[392],
+ /* overloads */ &kOverloads[326],
},
{
/* [33] */
/* fn extractBits<T : iu32>(T, u32, u32) -> T */
/* fn extractBits<N : num, T : iu32>(vec<N, T>, u32, u32) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[390],
+ /* overloads */ &kOverloads[324],
},
{
/* [34] */
/* fn faceForward<N : num, T : f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[469],
+ /* overloads */ &kOverloads[464],
},
{
/* [35] */
/* fn firstLeadingBit<T : iu32>(T) -> T */
/* fn firstLeadingBit<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[384],
+ /* overloads */ &kOverloads[322],
},
{
/* [36] */
/* fn firstTrailingBit<T : iu32>(T) -> T */
/* fn firstTrailingBit<N : num, T : iu32>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[382],
+ /* overloads */ &kOverloads[432],
},
{
/* [37] */
/* fn floor<T : f32_f16>(T) -> T */
/* fn floor<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[380],
+ /* overloads */ &kOverloads[320],
},
{
/* [38] */
/* fn fma<T : f32_f16>(T, T, T) -> T */
/* fn fma<N : num, T : f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[378],
+ /* overloads */ &kOverloads[316],
},
{
/* [39] */
/* fn fract<T : f32_f16>(T) -> T */
/* fn fract<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[342],
+ /* overloads */ &kOverloads[312],
},
{
/* [40] */
/* fn frexp<T : f32_f16>(T) -> __frexp_result<T> */
/* fn frexp<N : num, T : f32_f16>(vec<N, T>) -> __frexp_result_vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[312],
+ /* overloads */ &kOverloads[292],
},
{
/* [41] */
/* fn fwidth(f32) -> f32 */
/* fn fwidth<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[398],
+ /* overloads */ &kOverloads[290],
},
{
/* [42] */
/* fn fwidthCoarse(f32) -> f32 */
/* fn fwidthCoarse<N : num>(vec<N, f32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[292],
+ /* overloads */ &kOverloads[318],
},
{
/* [43] */
@@ -14284,7 +14340,7 @@
/* fn mix<N : num, T : f32_f16>(vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */
/* fn mix<N : num, T : f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> */
/* num overloads */ 3,
- /* overloads */ &kOverloads[267],
+ /* overloads */ &kOverloads[285],
},
{
/* [53] */
@@ -14297,37 +14353,37 @@
/* [54] */
/* fn normalize<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[470],
+ /* overloads */ &kOverloads[462],
},
{
/* [55] */
/* fn pack2x16float(vec2<f32>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[435],
+ /* overloads */ &kOverloads[461],
},
{
/* [56] */
/* fn pack2x16snorm(vec2<f32>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[468],
+ /* overloads */ &kOverloads[460],
},
{
/* [57] */
/* fn pack2x16unorm(vec2<f32>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[467],
+ /* overloads */ &kOverloads[447],
},
{
/* [58] */
/* fn pack4x8snorm(vec4<f32>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[465],
+ /* overloads */ &kOverloads[459],
},
{
/* [59] */
/* fn pack4x8unorm(vec4<f32>) -> u32 */
/* num overloads */ 1,
- /* overloads */ &kOverloads[464],
+ /* overloads */ &kOverloads[458],
},
{
/* [60] */
@@ -14347,13 +14403,13 @@
/* [62] */
/* fn reflect<N : num, T : f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[463],
+ /* overloads */ &kOverloads[457],
},
{
/* [63] */
/* fn refract<N : num, T : f32_f16>(vec<N, T>, vec<N, T>, T) -> vec<N, T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[462],
+ /* overloads */ &kOverloads[456],
},
{
/* [64] */
@@ -14371,8 +14427,8 @@
},
{
/* [66] */
- /* fn saturate<T : f32_f16>(T) -> T */
- /* fn saturate<T : f32_f16, N : num>(vec<N, T>) -> vec<N, T> */
+ /* fn saturate<T : fa_f32_f16>(@test_value(2) T) -> T */
+ /* fn saturate<T : fa_f32_f16, N : num>(@test_value(2) vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ &kOverloads[340],
},
@@ -14382,12 +14438,12 @@
/* fn select<T : scalar, N : num>(vec<N, T>, vec<N, T>, bool) -> vec<N, T> */
/* fn select<N : num, T : scalar>(vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
/* num overloads */ 3,
- /* overloads */ &kOverloads[285],
+ /* overloads */ &kOverloads[276],
},
{
/* [68] */
- /* fn sign<T : f32_f16>(T) -> T */
- /* fn sign<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
+ /* fn sign<T : fa_f32_f16>(T) -> T */
+ /* fn sign<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ &kOverloads[344],
},
@@ -14421,8 +14477,8 @@
},
{
/* [73] */
- /* fn step<T : f32_f16>(T, T) -> T */
- /* fn step<N : num, T : f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
+ /* fn step<T : fa_f32_f16>(T, T) -> T */
+ /* fn step<N : num, T : fa_f32_f16>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
/* overloads */ &kOverloads[354],
},
@@ -14430,14 +14486,14 @@
/* [74] */
/* fn storageBarrier() */
/* num overloads */ 1,
- /* overloads */ &kOverloads[461],
+ /* overloads */ &kOverloads[455],
},
{
/* [75] */
/* fn tan<T : f32_f16>(T) -> T */
/* fn tan<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[288],
+ /* overloads */ &kOverloads[430],
},
{
/* [76] */
@@ -14450,7 +14506,7 @@
/* [77] */
/* fn transpose<M : num, N : num, T : f32_f16>(mat<M, N, T>) -> mat<N, M, T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[460],
+ /* overloads */ &kOverloads[454],
},
{
/* [78] */
@@ -14463,127 +14519,127 @@
/* [79] */
/* fn unpack2x16float(u32) -> vec2<f32> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[459],
+ /* overloads */ &kOverloads[453],
},
{
/* [80] */
/* fn unpack2x16snorm(u32) -> vec2<f32> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[458],
+ /* overloads */ &kOverloads[434],
},
{
/* [81] */
/* fn unpack2x16unorm(u32) -> vec2<f32> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[457],
+ /* overloads */ &kOverloads[451],
},
{
/* [82] */
/* fn unpack4x8snorm(u32) -> vec4<f32> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[456],
+ /* overloads */ &kOverloads[450],
},
{
/* [83] */
/* fn unpack4x8unorm(u32) -> vec4<f32> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[454],
+ /* overloads */ &kOverloads[449],
},
{
/* [84] */
/* fn workgroupBarrier() */
/* num overloads */ 1,
- /* overloads */ &kOverloads[455],
+ /* overloads */ &kOverloads[448],
},
{
/* [85] */
- /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> i32 */
- /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>, level: i32) -> i32 */
- /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>, level: i32) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>, level: i32) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>) -> vec3<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>, level: i32) -> vec3<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>, level: i32) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>, level: i32) -> vec2<i32> */
- /* fn textureDimensions<T : fiu32>(texture: texture_multisampled_2d<T>) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_2d) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32> */
- /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_1d<F, A>) -> i32 */
- /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_2d<F, A>) -> vec2<i32> */
- /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_2d_array<F, A>) -> vec2<i32> */
- /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_3d<F, A>) -> vec3<i32> */
- /* fn textureDimensions(texture: texture_external) -> vec2<i32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_1d<T>) -> u32 */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_1d<T>, level: L) -> u32 */
+ /* fn textureDimensions<T : fiu32>(texture: texture_2d<T>) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_2d<T>, level: L) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_2d_array<T>) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_2d_array<T>, level: L) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_3d<T>) -> vec3<u32> */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_3d<T>, level: L) -> vec3<u32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_cube<T>) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_cube<T>, level: L) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_cube_array<T>) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32, L : iu32>(texture: texture_cube_array<T>, level: L) -> vec2<u32> */
+ /* fn textureDimensions<T : fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32> */
+ /* fn textureDimensions(texture: texture_depth_2d) -> vec2<u32> */
+ /* fn textureDimensions<L : iu32>(texture: texture_depth_2d, level: L) -> vec2<u32> */
+ /* fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32> */
+ /* fn textureDimensions<L : iu32>(texture: texture_depth_2d_array, level: L) -> vec2<u32> */
+ /* fn textureDimensions(texture: texture_depth_cube) -> vec2<u32> */
+ /* fn textureDimensions<L : iu32>(texture: texture_depth_cube, level: L) -> vec2<u32> */
+ /* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32> */
+ /* fn textureDimensions<L : iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32> */
+ /* fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32> */
+ /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_1d<F, A>) -> u32 */
+ /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_2d<F, A>) -> vec2<u32> */
+ /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_2d_array<F, A>) -> vec2<u32> */
+ /* fn textureDimensions<F : texel_format, A : write>(texture: texture_storage_3d<F, A>) -> vec3<u32> */
+ /* fn textureDimensions(texture: texture_external) -> vec2<u32> */
/* num overloads */ 27,
/* overloads */ &kOverloads[0],
},
{
/* [86] */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T> */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T> */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<T> */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
- /* fn textureGather<T : fiu32>(@const component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32, A : iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32, A : iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32, A : iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T> */
/* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
- /* fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureGather<A : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> */
+ /* fn textureGather<A : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
- /* fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
+ /* fn textureGather<A : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> */
/* num overloads */ 12,
- /* overloads */ &kOverloads[84],
+ /* overloads */ &kOverloads[72],
},
{
/* [87] */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
/* fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
- /* fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureGatherCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32> */
+ /* fn textureGatherCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> */
- /* fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> */
+ /* fn textureGatherCompare<A : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[184],
+ /* overloads */ &kOverloads[190],
},
{
/* [88] */
- /* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
- /* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
- /* fn textureNumLayers(texture: texture_depth_2d_array) -> i32 */
- /* fn textureNumLayers(texture: texture_depth_cube_array) -> i32 */
- /* fn textureNumLayers<F : texel_format, A : write>(texture: texture_storage_2d_array<F, A>) -> i32 */
+ /* fn textureNumLayers<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
+ /* fn textureNumLayers<T : fiu32>(texture: texture_cube_array<T>) -> u32 */
+ /* fn textureNumLayers(texture: texture_depth_2d_array) -> u32 */
+ /* fn textureNumLayers(texture: texture_depth_cube_array) -> u32 */
+ /* fn textureNumLayers<F : texel_format, A : write>(texture: texture_storage_2d_array<F, A>) -> u32 */
/* num overloads */ 5,
/* overloads */ &kOverloads[242],
},
{
/* [89] */
- /* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> i32 */
- /* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> i32 */
- /* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> i32 */
- /* fn textureNumLevels<T : fiu32>(texture: texture_3d<T>) -> i32 */
- /* fn textureNumLevels<T : fiu32>(texture: texture_cube<T>) -> i32 */
- /* fn textureNumLevels<T : fiu32>(texture: texture_cube_array<T>) -> i32 */
- /* fn textureNumLevels(texture: texture_depth_2d) -> i32 */
- /* fn textureNumLevels(texture: texture_depth_2d_array) -> i32 */
- /* fn textureNumLevels(texture: texture_depth_cube) -> i32 */
- /* fn textureNumLevels(texture: texture_depth_cube_array) -> i32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_1d<T>) -> u32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_2d<T>) -> u32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_2d_array<T>) -> u32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_3d<T>) -> u32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_cube<T>) -> u32 */
+ /* fn textureNumLevels<T : fiu32>(texture: texture_cube_array<T>) -> u32 */
+ /* fn textureNumLevels(texture: texture_depth_2d) -> u32 */
+ /* fn textureNumLevels(texture: texture_depth_2d_array) -> u32 */
+ /* fn textureNumLevels(texture: texture_depth_cube) -> u32 */
+ /* fn textureNumLevels(texture: texture_depth_cube_array) -> u32 */
/* num overloads */ 10,
/* overloads */ &kOverloads[107],
},
{
/* [90] */
- /* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> i32 */
- /* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32 */
+ /* fn textureNumSamples<T : fiu32>(texture: texture_multisampled_2d<T>) -> u32 */
+ /* fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32 */
/* num overloads */ 2,
/* overloads */ &kOverloads[388],
},
@@ -14592,88 +14648,88 @@
/* fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> */
- /* fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureSample<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32> */
+ /* fn textureSample<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
/* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> */
/* fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
- /* fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> */
+ /* fn textureSample<A : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32> */
/* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 */
/* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32 */
- /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32 */
- /* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSample<A : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32 */
+ /* fn textureSample<A : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32 */
/* fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 */
- /* fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32 */
+ /* fn textureSample<A : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32 */
/* num overloads */ 15,
- /* overloads */ &kOverloads[27],
+ /* overloads */ &kOverloads[57],
},
{
/* [92] */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32> */
- /* fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureSampleBias<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32> */
+ /* fn textureSampleBias<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32> */
/* fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
- /* fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32> */
+ /* fn textureSampleBias<A : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32> */
/* num overloads */ 8,
- /* overloads */ &kOverloads[152],
+ /* overloads */ &kOverloads[144],
},
{
/* [93] */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
- /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
- /* fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompare<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
- /* fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompare<A : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32 */
/* num overloads */ 6,
- /* overloads */ &kOverloads[202],
+ /* overloads */ &kOverloads[178],
},
{
/* [94] */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 */
/* fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
- /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 */
- /* fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleCompareLevel<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompareLevel<A : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32 */
/* fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 */
- /* fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompareLevel<A : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32 */
/* num overloads */ 6,
- /* overloads */ &kOverloads[160],
+ /* overloads */ &kOverloads[166],
},
{
/* [95] */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
- /* fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureSampleGrad<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
+ /* fn textureSampleGrad<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> */
/* fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
- /* fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
+ /* fn textureSampleGrad<A : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> */
/* num overloads */ 8,
- /* overloads */ &kOverloads[144],
+ /* overloads */ &kOverloads[152],
},
{
/* [96] */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32> */
- /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32> */
- /* fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, @const offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureSampleLevel<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32> */
+ /* fn textureSampleLevel<A : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32> */
/* fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
- /* fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32> */
- /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32 */
- /* fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, @const offset: vec2<i32>) -> f32 */
- /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32 */
- /* fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, @const offset: vec2<i32>) -> f32 */
- /* fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32 */
- /* fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32 */
+ /* fn textureSampleLevel<A : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32> */
+ /* fn textureSampleLevel<L : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32 */
+ /* fn textureSampleLevel<L : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32 */
+ /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleLevel<L : iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32 */
+ /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32 */
/* fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* num overloads */ 15,
- /* overloads */ &kOverloads[57],
+ /* overloads */ &kOverloads[27],
},
{
/* [97] */
@@ -14684,106 +14740,106 @@
},
{
/* [98] */
- /* fn textureStore(texture: texture_storage_1d<f32_texel_format, write>, coords: i32, value: vec4<f32>) */
- /* fn textureStore(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<i32>, value: vec4<f32>) */
- /* fn textureStore(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) */
- /* fn textureStore(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<i32>, value: vec4<f32>) */
- /* fn textureStore(texture: texture_storage_1d<i32_texel_format, write>, coords: i32, value: vec4<i32>) */
- /* fn textureStore(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<i32>, value: vec4<i32>) */
- /* fn textureStore(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) */
- /* fn textureStore(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<i32>, value: vec4<i32>) */
- /* fn textureStore(texture: texture_storage_1d<u32_texel_format, write>, coords: i32, value: vec4<u32>) */
- /* fn textureStore(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<i32>, value: vec4<u32>) */
- /* fn textureStore(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>) */
+ /* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<C>, value: vec4<f32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_1d<i32_texel_format, write>, coords: C, value: vec4<i32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<C>, value: vec4<i32>) */
+ /* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<i32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<C>, value: vec4<i32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_1d<u32_texel_format, write>, coords: C, value: vec4<u32>) */
+ /* fn textureStore<C : iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>) */
+ /* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<u32>) */
/* fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>) */
/* num overloads */ 12,
- /* overloads */ &kOverloads[72],
+ /* overloads */ &kOverloads[84],
},
{
/* [99] */
- /* fn textureLoad<T : fiu32>(texture: texture_1d<T>, coords: i32, level: i32) -> vec4<T> */
- /* fn textureLoad<T : fiu32>(texture: texture_2d<T>, coords: vec2<i32>, level: i32) -> vec4<T> */
- /* fn textureLoad<T : fiu32>(texture: texture_2d_array<T>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<T> */
- /* fn textureLoad<T : fiu32>(texture: texture_3d<T>, coords: vec3<i32>, level: i32) -> vec4<T> */
- /* fn textureLoad<T : fiu32>(texture: texture_multisampled_2d<T>, coords: vec2<i32>, sample_index: i32) -> vec4<T> */
- /* fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32 */
- /* fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32 */
- /* fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32 */
- /* fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32> */
+ /* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32, A : iu32, L : iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32, L : iu32>(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32, S : iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T> */
+ /* fn textureLoad<C : iu32, L : iu32>(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32 */
+ /* fn textureLoad<C : iu32, A : iu32, L : iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32 */
+ /* fn textureLoad<C : iu32, S : iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32 */
+ /* fn textureLoad<C : iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32> */
/* num overloads */ 9,
- /* overloads */ &kOverloads[117],
+ /* overloads */ &kOverloads[135],
},
{
/* [100] */
/* fn atomicLoad<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[451],
+ /* overloads */ &kOverloads[446],
},
{
/* [101] */
/* fn atomicStore<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) */
/* num overloads */ 1,
- /* overloads */ &kOverloads[450],
+ /* overloads */ &kOverloads[443],
},
{
/* [102] */
/* fn atomicAdd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[449],
+ /* overloads */ &kOverloads[442],
},
{
/* [103] */
/* fn atomicSub<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[448],
+ /* overloads */ &kOverloads[441],
},
{
/* [104] */
/* fn atomicMax<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[447],
+ /* overloads */ &kOverloads[440],
},
{
/* [105] */
/* fn atomicMin<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[446],
+ /* overloads */ &kOverloads[439],
},
{
/* [106] */
/* fn atomicAnd<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[443],
+ /* overloads */ &kOverloads[438],
},
{
/* [107] */
/* fn atomicOr<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[441],
+ /* overloads */ &kOverloads[437],
},
{
/* [108] */
/* fn atomicXor<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[440],
+ /* overloads */ &kOverloads[436],
},
{
/* [109] */
/* fn atomicExchange<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[436],
+ /* overloads */ &kOverloads[435],
},
{
/* [110] */
/* fn atomicCompareExchangeWeak<T : iu32, S : workgroup_or_storage>(ptr<S, atomic<T>, read_write>, T, T) -> __atomic_compare_exchange_result<T> */
/* num overloads */ 1,
- /* overloads */ &kOverloads[453],
+ /* overloads */ &kOverloads[452],
},
{
/* [111] */
/* fn _tint_materialize<T>(T) -> T */
/* num overloads */ 1,
- /* overloads */ &kOverloads[437],
+ /* overloads */ &kOverloads[470],
},
};
@@ -14793,21 +14849,21 @@
/* op !(bool) -> bool */
/* op !<N : num>(vec<N, bool>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[432],
+ /* overloads */ &kOverloads[288],
},
{
/* [1] */
/* op ~<T : ia_iu32>(T) -> T */
/* op ~<T : ia_iu32, N : num>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[430],
+ /* overloads */ &kOverloads[428],
},
{
/* [2] */
/* op -<T : fia_fi32_f16>(T) -> T */
/* op -<T : fia_fi32_f16, N : num>(vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[428],
+ /* overloads */ &kOverloads[426],
},
};
constexpr uint8_t kUnaryOperatorNot = 0;
@@ -14847,7 +14903,7 @@
/* op *<T : fa_f32_f16, C : num, R : num>(vec<R, T>, mat<C, R, T>) -> vec<C, T> */
/* op *<T : fa_f32_f16, K : num, C : num, R : num>(mat<K, R, T>, mat<C, K, T>) -> mat<C, R, T> */
/* num overloads */ 9,
- /* overloads */ &kOverloads[126],
+ /* overloads */ &kOverloads[117],
},
{
/* [3] */
@@ -14865,14 +14921,14 @@
/* op %<T : fiu32_f16, N : num>(vec<N, T>, T) -> vec<N, T> */
/* op %<T : fiu32_f16, N : num>(T, vec<N, T>) -> vec<N, T> */
/* num overloads */ 4,
- /* overloads */ &kOverloads[251],
+ /* overloads */ &kOverloads[259],
},
{
/* [5] */
/* op ^<T : ia_iu32>(T, T) -> T */
/* op ^<T : ia_iu32, N : num>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[422],
+ /* overloads */ &kOverloads[414],
},
{
/* [6] */
@@ -14881,7 +14937,7 @@
/* op &<T : ia_iu32>(T, T) -> T */
/* op &<T : ia_iu32, N : num>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 4,
- /* overloads */ &kOverloads[247],
+ /* overloads */ &kOverloads[263],
},
{
/* [7] */
@@ -14890,7 +14946,7 @@
/* op |<T : ia_iu32>(T, T) -> T */
/* op |<T : ia_iu32, N : num>(vec<N, T>, vec<N, T>) -> vec<N, T> */
/* num overloads */ 4,
- /* overloads */ &kOverloads[259],
+ /* overloads */ &kOverloads[247],
},
{
/* [8] */
@@ -14909,58 +14965,58 @@
/* op ==<T : scalar>(T, T) -> bool */
/* op ==<T : scalar, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[418],
+ /* overloads */ &kOverloads[408],
},
{
/* [11] */
/* op !=<T : scalar>(T, T) -> bool */
/* op !=<T : scalar, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[416],
+ /* overloads */ &kOverloads[394],
},
{
/* [12] */
/* op <<T : fia_fiu32_f16>(T, T) -> bool */
/* op <<T : fia_fiu32_f16, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[414],
+ /* overloads */ &kOverloads[376],
},
{
/* [13] */
/* op ><T : fia_fiu32_f16>(T, T) -> bool */
/* op ><T : fia_fiu32_f16, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[412],
+ /* overloads */ &kOverloads[374],
},
{
/* [14] */
/* op <=<T : fia_fiu32_f16>(T, T) -> bool */
/* op <=<T : fia_fiu32_f16, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[410],
+ /* overloads */ &kOverloads[372],
},
{
/* [15] */
/* op >=<T : fia_fiu32_f16>(T, T) -> bool */
/* op >=<T : fiu32_f16, N : num>(vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[408],
+ /* overloads */ &kOverloads[370],
},
{
/* [16] */
/* op <<<T : iu32>(T, u32) -> T */
/* op <<<T : iu32, N : num>(vec<N, T>, vec<N, u32>) -> vec<N, T> */
- /* op <<<T : ia>(T, ia) -> T */
- /* op <<<T : ia, N : num>(vec<N, T>, vec<N, ia>) -> vec<N, T> */
+ /* op <<<T : ia>(T, u32) -> T */
+ /* op <<<T : ia, N : num>(vec<N, T>, vec<N, u32>) -> vec<N, T> */
/* num overloads */ 4,
- /* overloads */ &kOverloads[263],
+ /* overloads */ &kOverloads[251],
},
{
/* [17] */
/* op >><T : iu32>(T, u32) -> T */
/* op >><T : iu32, N : num>(vec<N, T>, vec<N, u32>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[386],
+ /* overloads */ &kOverloads[366],
},
};
constexpr uint8_t kBinaryOperatorPlus = 0;
@@ -14989,7 +15045,7 @@
/* init i32(i32) -> i32 */
/* conv i32<T : scalar_no_i32>(T) -> i32 */
/* num overloads */ 3,
- /* overloads */ &kOverloads[276],
+ /* overloads */ &kOverloads[282],
},
{
/* [1] */
@@ -15005,7 +15061,7 @@
/* init f32(f32) -> f32 */
/* conv f32<T : scalar_no_f32>(T) -> f32 */
/* num overloads */ 3,
- /* overloads */ &kOverloads[282],
+ /* overloads */ &kOverloads[273],
},
{
/* [3] */
@@ -15021,12 +15077,12 @@
/* init bool(bool) -> bool */
/* conv bool<T : scalar_no_bool>(T) -> bool */
/* num overloads */ 3,
- /* overloads */ &kOverloads[273],
+ /* overloads */ &kOverloads[267],
},
{
/* [5] */
/* init vec2<T : concrete_scalar>() -> vec2<T> */
- /* init vec2<T : concrete_scalar>(vec2<T>) -> vec2<T> */
+ /* init vec2<T : scalar>(vec2<T>) -> vec2<T> */
/* init vec2<T : scalar>(T) -> vec2<T> */
/* init vec2<T : scalar>(x: T, y: T) -> vec2<T> */
/* conv vec2<T : f32, U : scalar_no_f32>(vec2<U>) -> vec2<f32> */
@@ -15035,12 +15091,12 @@
/* conv vec2<T : u32, U : scalar_no_u32>(vec2<U>) -> vec2<u32> */
/* conv vec2<T : bool, U : scalar_no_bool>(vec2<U>) -> vec2<bool> */
/* num overloads */ 9,
- /* overloads */ &kOverloads[135],
+ /* overloads */ &kOverloads[126],
},
{
/* [6] */
/* init vec3<T : concrete_scalar>() -> vec3<T> */
- /* init vec3<T : concrete_scalar>(vec3<T>) -> vec3<T> */
+ /* init vec3<T : scalar>(vec3<T>) -> vec3<T> */
/* init vec3<T : scalar>(T) -> vec3<T> */
/* init vec3<T : scalar>(x: T, y: T, z: T) -> vec3<T> */
/* init vec3<T : scalar>(xy: vec2<T>, z: T) -> vec3<T> */
@@ -15056,7 +15112,7 @@
{
/* [7] */
/* init vec4<T : concrete_scalar>() -> vec4<T> */
- /* init vec4<T : concrete_scalar>(vec4<T>) -> vec4<T> */
+ /* init vec4<T : scalar>(vec4<T>) -> vec4<T> */
/* init vec4<T : scalar>(T) -> vec4<T> */
/* init vec4<T : scalar>(x: T, y: T, z: T, w: T) -> vec4<T> */
/* init vec4<T : scalar>(xy: vec2<T>, z: T, w: T) -> vec4<T> */
@@ -15082,7 +15138,7 @@
/* conv mat2x2<T : f16>(mat2x2<f32>) -> mat2x2<f16> */
/* conv mat2x2<T : f32>(mat2x2<f16>) -> mat2x2<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[226],
+ /* overloads */ &kOverloads[208],
},
{
/* [9] */
@@ -15093,7 +15149,7 @@
/* conv mat2x3<T : f16>(mat2x3<f32>) -> mat2x3<f16> */
/* conv mat2x3<T : f32>(mat2x3<f16>) -> mat2x3<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[220],
+ /* overloads */ &kOverloads[202],
},
{
/* [10] */
@@ -15104,7 +15160,7 @@
/* conv mat2x4<T : f16>(mat2x4<f32>) -> mat2x4<f16> */
/* conv mat2x4<T : f32>(mat2x4<f16>) -> mat2x4<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[214],
+ /* overloads */ &kOverloads[172],
},
{
/* [11] */
@@ -15115,7 +15171,7 @@
/* conv mat3x2<T : f16>(mat3x2<f32>) -> mat3x2<f16> */
/* conv mat3x2<T : f32>(mat3x2<f16>) -> mat3x2<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[208],
+ /* overloads */ &kOverloads[160],
},
{
/* [12] */
@@ -15126,7 +15182,7 @@
/* conv mat3x3<T : f16>(mat3x3<f32>) -> mat3x3<f16> */
/* conv mat3x3<T : f32>(mat3x3<f16>) -> mat3x3<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[166],
+ /* overloads */ &kOverloads[220],
},
{
/* [13] */
@@ -15137,7 +15193,7 @@
/* conv mat3x4<T : f16>(mat3x4<f32>) -> mat3x4<f16> */
/* conv mat3x4<T : f32>(mat3x4<f16>) -> mat3x4<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[196],
+ /* overloads */ &kOverloads[214],
},
{
/* [14] */
@@ -15148,7 +15204,7 @@
/* conv mat4x2<T : f16>(mat4x2<f32>) -> mat4x2<f16> */
/* conv mat4x2<T : f32>(mat4x2<f16>) -> mat4x2<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[190],
+ /* overloads */ &kOverloads[226],
},
{
/* [15] */
@@ -15159,7 +15215,7 @@
/* conv mat4x3<T : f16>(mat4x3<f32>) -> mat4x3<f16> */
/* conv mat4x3<T : f32>(mat4x3<f16>) -> mat4x3<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[178],
+ /* overloads */ &kOverloads[196],
},
{
/* [16] */
@@ -15170,7 +15226,7 @@
/* conv mat4x4<T : f16>(mat4x4<f32>) -> mat4x4<f16> */
/* conv mat4x4<T : f32>(mat4x4<f16>) -> mat4x4<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[172],
+ /* overloads */ &kOverloads[184],
},
};
diff --git a/src/tint/resolver/intrinsic_table_test.cc b/src/tint/resolver/intrinsic_table_test.cc
index a4f6ce6..1608aa2 100644
--- a/src/tint/resolver/intrinsic_table_test.cc
+++ b/src/tint/resolver/intrinsic_table_test.cc
@@ -527,13 +527,14 @@
ASSERT_THAT(Diagnostics().str(), HasSubstr("no matching call"));
}
-TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_ConstantEval) {
+TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Builtin_ConstantEval) {
auto* af = create<sem::AbstractFloat>();
auto* bool_ = create<sem::Bool>();
auto result = table->Lookup(BuiltinType::kSelect, utils::Vector{af, af, bool_},
sem::EvaluationStage::kConstant, Source{});
ASSERT_NE(result.sem, nullptr) << Diagnostics().str();
ASSERT_EQ(Diagnostics().str(), "");
+ EXPECT_EQ(result.sem->Stage(), sem::EvaluationStage::kConstant);
EXPECT_EQ(result.sem->Type(), BuiltinType::kSelect);
EXPECT_EQ(result.sem->ReturnType(), af);
ASSERT_EQ(result.sem->Parameters().Length(), 3u);
@@ -542,7 +543,7 @@
EXPECT_EQ(result.sem->Parameters()[2]->Type(), bool_);
}
-TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_RuntimeEval) {
+TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Builtin_RuntimeEval) {
auto* af = create<sem::AbstractFloat>();
auto* bool_ref = create<sem::Reference>(create<sem::Bool>(), ast::AddressSpace::kFunction,
ast::Access::kReadWrite);
@@ -550,6 +551,7 @@
sem::EvaluationStage::kRuntime, Source{});
ASSERT_NE(result.sem, nullptr) << Diagnostics().str();
ASSERT_EQ(Diagnostics().str(), "");
+ EXPECT_EQ(result.sem->Stage(), sem::EvaluationStage::kConstant);
EXPECT_EQ(result.sem->Type(), BuiltinType::kSelect);
EXPECT_TRUE(result.sem->ReturnType()->Is<sem::F32>());
ASSERT_EQ(result.sem->Parameters().Length(), 3u);
@@ -558,6 +560,32 @@
EXPECT_TRUE(result.sem->Parameters()[2]->Type()->Is<sem::Bool>());
}
+TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Binary_ConstantEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* u32 = create<sem::U32>();
+ auto result = table->Lookup(ast::BinaryOp::kShiftLeft, ai, u32, sem::EvaluationStage::kConstant,
+ Source{}, false);
+ ASSERT_NE(result.result, nullptr) << Diagnostics().str();
+ ASSERT_NE(result.const_eval_fn, nullptr) << Diagnostics().str();
+ ASSERT_EQ(Diagnostics().str(), "");
+ EXPECT_EQ(result.result, ai);
+ EXPECT_EQ(result.lhs, ai);
+ EXPECT_EQ(result.rhs, u32);
+}
+
+TEST_F(IntrinsicTableTest, MatchDifferentArgsElementType_Binary_RuntimeEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* u32 = create<sem::U32>();
+ auto result = table->Lookup(ast::BinaryOp::kShiftLeft, ai, u32, sem::EvaluationStage::kRuntime,
+ Source{}, false);
+ ASSERT_NE(result.result, nullptr) << Diagnostics().str();
+ ASSERT_NE(result.const_eval_fn, nullptr) << Diagnostics().str();
+ ASSERT_EQ(Diagnostics().str(), "");
+ EXPECT_TRUE(result.result->Is<sem::I32>());
+ EXPECT_TRUE(result.lhs->Is<sem::I32>());
+ EXPECT_TRUE(result.rhs->Is<sem::U32>());
+}
+
TEST_F(IntrinsicTableTest, OverloadOrderByNumberOfParameters) {
// None of the arguments match, so expect the overloads with 2 parameters to
// come first
@@ -568,33 +596,33 @@
R"(error: no matching call to textureDimensions(bool, bool)
27 candidate functions:
- textureDimensions(texture: texture_1d<T>, level: i32) -> i32 where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_1d<T>) -> i32 where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d_array<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_3d<T>) -> vec3<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube_array<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_depth_2d) -> vec2<i32>
- textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
- textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
- textureDimensions(texture: texture_storage_1d<F, A>) -> i32 where: A is write
- textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32> where: A is write
- textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32> where: A is write
- textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32> where: A is write
- textureDimensions(texture: texture_external) -> vec2<i32>
+ textureDimensions(texture: texture_1d<T>, level: L) -> u32 where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
+ textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_3d<T>) -> vec3<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_cube<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_cube_array<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_depth_2d) -> vec2<u32>
+ textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
+ textureDimensions(texture: texture_depth_cube) -> vec2<u32>
+ textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
+ textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
+ textureDimensions(texture: texture_storage_1d<F, A>) -> u32 where: A is write
+ textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<u32> where: A is write
+ textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<u32> where: A is write
+ textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<u32> where: A is write
+ textureDimensions(texture: texture_external) -> vec2<u32>
)");
}
@@ -607,33 +635,33 @@
R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
27 candidate functions:
- textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_2d) -> vec2<i32>
- textureDimensions(texture: texture_1d<T>, level: i32) -> i32 where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d_array<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_3d<T>, level: i32) -> vec3<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube_array<T>, level: i32) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
- textureDimensions(texture: texture_1d<T>) -> i32 where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_2d_array<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_3d<T>) -> vec3<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_cube_array<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<i32> where: T is f32, i32 or u32
- textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube) -> vec2<i32>
- textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
- textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
- textureDimensions(texture: texture_storage_1d<F, A>) -> i32 where: A is write
- textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<i32> where: A is write
- textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<i32> where: A is write
- textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<i32> where: A is write
- textureDimensions(texture: texture_external) -> vec2<i32>
+ textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_1d<T>, level: L) -> u32 where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
+ textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> where: L is i32 or u32
+ textureDimensions(texture: texture_depth_2d) -> vec2<u32>
+ textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
+ textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_3d<T>) -> vec3<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_cube<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_cube_array<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_multisampled_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
+ textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
+ textureDimensions(texture: texture_depth_cube) -> vec2<u32>
+ textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
+ textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
+ textureDimensions(texture: texture_storage_1d<F, A>) -> u32 where: A is write
+ textureDimensions(texture: texture_storage_2d<F, A>) -> vec2<u32> where: A is write
+ textureDimensions(texture: texture_storage_2d_array<F, A>) -> vec2<u32> where: A is write
+ textureDimensions(texture: texture_storage_3d<F, A>) -> vec3<u32> where: A is write
+ textureDimensions(texture: texture_external) -> vec2<u32>
)");
}
@@ -663,15 +691,16 @@
TEST_F(IntrinsicTableTest, MatchUnaryOp) {
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
- auto result = table->Lookup(ast::UnaryOp::kNegation, vec3_i32, Source{{12, 34}});
- EXPECT_EQ(result.result, vec3_i32);
+ auto result = table->Lookup(ast::UnaryOp::kNegation, vec3_i32, sem::EvaluationStage::kConstant,
+ Source{{12, 34}});
EXPECT_EQ(result.result, vec3_i32);
EXPECT_EQ(Diagnostics().str(), "");
}
TEST_F(IntrinsicTableTest, MismatchUnaryOp) {
auto* bool_ = create<sem::Bool>();
- auto result = table->Lookup(ast::UnaryOp::kNegation, bool_, Source{{12, 34}});
+ auto result = table->Lookup(ast::UnaryOp::kNegation, bool_, sem::EvaluationStage::kConstant,
+ Source{{12, 34}});
ASSERT_EQ(result.result, nullptr);
EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator - (bool)
@@ -681,10 +710,28 @@
)");
}
+TEST_F(IntrinsicTableTest, MatchUnaryOp_Constant) {
+ auto* ai = create<sem::AbstractInt>();
+ auto result = table->Lookup(ast::UnaryOp::kNegation, ai, sem::EvaluationStage::kConstant,
+ Source{{12, 34}});
+ EXPECT_EQ(result.result, ai);
+ EXPECT_EQ(Diagnostics().str(), "");
+}
+
+TEST_F(IntrinsicTableTest, MatchUnaryOp_Runtime) {
+ auto* ai = create<sem::AbstractInt>();
+ auto result = table->Lookup(ast::UnaryOp::kNegation, ai, sem::EvaluationStage::kRuntime,
+ Source{{12, 34}});
+ EXPECT_NE(result.result, ai);
+ EXPECT_TRUE(result.result->Is<sem::I32>());
+ EXPECT_EQ(Diagnostics().str(), "");
+}
+
TEST_F(IntrinsicTableTest, MatchBinaryOp) {
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
- auto result = table->Lookup(ast::BinaryOp::kMultiply, i32, vec3_i32, Source{{12, 34}},
+ auto result = table->Lookup(ast::BinaryOp::kMultiply, i32, vec3_i32,
+ sem::EvaluationStage::kConstant, Source{{12, 34}},
/* is_compound */ false);
EXPECT_EQ(result.result, vec3_i32);
EXPECT_EQ(result.lhs, i32);
@@ -695,7 +742,8 @@
TEST_F(IntrinsicTableTest, MismatchBinaryOp) {
auto* f32 = create<sem::F32>();
auto* bool_ = create<sem::Bool>();
- auto result = table->Lookup(ast::BinaryOp::kMultiply, f32, bool_, Source{{12, 34}},
+ auto result = table->Lookup(ast::BinaryOp::kMultiply, f32, bool_,
+ sem::EvaluationStage::kConstant, Source{{12, 34}},
/* is_compound */ false);
ASSERT_EQ(result.result, nullptr);
EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator * (f32, bool)
@@ -716,7 +764,8 @@
TEST_F(IntrinsicTableTest, MatchCompoundOp) {
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
- auto result = table->Lookup(ast::BinaryOp::kMultiply, i32, vec3_i32, Source{{12, 34}},
+ auto result = table->Lookup(ast::BinaryOp::kMultiply, i32, vec3_i32,
+ sem::EvaluationStage::kConstant, Source{{12, 34}},
/* is_compound */ true);
EXPECT_EQ(result.result, vec3_i32);
EXPECT_EQ(result.lhs, i32);
@@ -727,7 +776,8 @@
TEST_F(IntrinsicTableTest, MismatchCompoundOp) {
auto* f32 = create<sem::F32>();
auto* bool_ = create<sem::Bool>();
- auto result = table->Lookup(ast::BinaryOp::kMultiply, f32, bool_, Source{{12, 34}},
+ auto result = table->Lookup(ast::BinaryOp::kMultiply, f32, bool_,
+ sem::EvaluationStage::kConstant, Source{{12, 34}},
/* is_compound */ true);
ASSERT_EQ(result.result, nullptr);
EXPECT_EQ(Diagnostics().str(), R"(12:34 error: no matching overload for operator *= (f32, bool)
@@ -749,7 +799,7 @@
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
auto result = table->Lookup(InitConvIntrinsic::kVec3, nullptr, utils::Vector{i32, i32, i32},
- Source{{12, 34}});
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_NE(result.target, nullptr);
EXPECT_EQ(result.target->ReturnType(), vec3_i32);
EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
@@ -764,7 +814,7 @@
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
auto result = table->Lookup(InitConvIntrinsic::kVec3, i32, utils::Vector{i32, i32, i32},
- Source{{12, 34}});
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_NE(result.target, nullptr);
EXPECT_EQ(result.target->ReturnType(), vec3_i32);
EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
@@ -779,7 +829,7 @@
auto* i32 = create<sem::I32>();
auto* f32 = create<sem::F32>();
auto result = table->Lookup(InitConvIntrinsic::kVec3, nullptr, utils::Vector{i32, f32, i32},
- Source{{12, 34}});
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_EQ(result.target, nullptr);
EXPECT_EQ(Diagnostics().str(),
R"(12:34 error: no matching initializer for vec3(i32, f32, i32)
@@ -789,8 +839,8 @@
vec3(xy: vec2<T>, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(x: T, yz: vec2<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
- vec3(vec3<T>) -> vec3<T> where: T is f32, f16, i32, u32 or bool
- vec3() -> vec3<T> where: T is f32, f16, i32, u32 or bool
+ vec3(vec3<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
+ vec3<T>() -> vec3<T> where: T is f32, f16, i32, u32 or bool
5 candidate conversions:
vec3<T>(vec3<U>) -> vec3<f32> where: T is f32, U is abstract-int, abstract-float, i32, f16, u32 or bool
@@ -805,7 +855,7 @@
auto* i32 = create<sem::I32>();
auto* f32 = create<sem::F32>();
auto result = table->Lookup(InitConvIntrinsic::kVec3, i32, utils::Vector{i32, f32, i32},
- Source{{12, 34}});
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_EQ(result.target, nullptr);
EXPECT_EQ(Diagnostics().str(),
R"(12:34 error: no matching initializer for vec3<i32>(i32, f32, i32)
@@ -815,8 +865,8 @@
vec3(x: T, yz: vec2<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(xy: vec2<T>, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
- vec3(vec3<T>) -> vec3<T> where: T is f32, f16, i32, u32 or bool
- vec3() -> vec3<T> where: T is f32, f16, i32, u32 or bool
+ vec3(vec3<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
+ vec3<T>() -> vec3<T> where: T is f32, f16, i32, u32 or bool
5 candidate conversions:
vec3<T>(vec3<U>) -> vec3<f32> where: T is f32, U is abstract-int, abstract-float, i32, f16, u32 or bool
@@ -827,13 +877,27 @@
)");
}
+TEST_F(IntrinsicTableTest, MatchTypeInitializerImplicitVecFromVecAbstract) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* vec3_ai = create<sem::Vector>(ai, 3u);
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, nullptr, utils::Vector{vec3_ai},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
+ ASSERT_NE(result.target, nullptr);
+ EXPECT_EQ(result.target->ReturnType(), vec3_ai);
+ EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
+ ASSERT_EQ(result.target->Parameters().Length(), 1u);
+ EXPECT_EQ(result.target->Parameters()[0]->Type(), vec3_ai);
+ EXPECT_NE(result.const_eval_fn, nullptr);
+}
+
TEST_F(IntrinsicTableTest, MatchTypeInitializerImplicitMatFromVec) {
auto* af = create<sem::AbstractFloat>();
auto* vec2_ai = create<sem::Vector>(create<sem::AbstractInt>(), 2u);
auto* vec2_af = create<sem::Vector>(af, 2u);
auto* mat2x2_af = create<sem::Matrix>(vec2_af, 2u);
- auto result = table->Lookup(InitConvIntrinsic::kMat2x2, nullptr,
- utils::Vector{vec2_ai, vec2_ai}, Source{{12, 34}});
+ auto result =
+ table->Lookup(InitConvIntrinsic::kMat2x2, nullptr, utils::Vector{vec2_ai, vec2_ai},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_NE(result.target, nullptr);
EXPECT_TYPE(result.target->ReturnType(), mat2x2_af);
EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
@@ -843,13 +907,46 @@
EXPECT_NE(result.const_eval_fn, nullptr);
}
+TEST_F(IntrinsicTableTest, MatchTypeInitializer_ConstantEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* vec3_ai = create<sem::Vector>(ai, 3u);
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, nullptr, utils::Vector{ai, ai, ai},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
+ ASSERT_NE(result.target, nullptr);
+ EXPECT_EQ(result.target->Stage(), sem::EvaluationStage::kConstant);
+ EXPECT_EQ(result.target->ReturnType(), vec3_ai);
+ EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
+ ASSERT_EQ(result.target->Parameters().Length(), 3u);
+ EXPECT_EQ(result.target->Parameters()[0]->Type(), ai);
+ EXPECT_EQ(result.target->Parameters()[1]->Type(), ai);
+ EXPECT_EQ(result.target->Parameters()[2]->Type(), ai);
+ EXPECT_NE(result.const_eval_fn, nullptr);
+}
+
+TEST_F(IntrinsicTableTest, MatchTypeInitializer_RuntimeEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, nullptr, utils::Vector{ai, ai, ai},
+ sem::EvaluationStage::kRuntime, Source{{12, 34}});
+ auto* i32 = create<sem::I32>();
+ auto* vec3_i32 = create<sem::Vector>(i32, 3u);
+ ASSERT_NE(result.target, nullptr);
+ EXPECT_EQ(result.target->Stage(), sem::EvaluationStage::kConstant);
+ EXPECT_EQ(result.target->ReturnType(), vec3_i32);
+ EXPECT_TRUE(result.target->Is<sem::TypeInitializer>());
+ ASSERT_EQ(result.target->Parameters().Length(), 3u);
+ EXPECT_EQ(result.target->Parameters()[0]->Type(), i32);
+ EXPECT_EQ(result.target->Parameters()[1]->Type(), i32);
+ EXPECT_EQ(result.target->Parameters()[2]->Type(), i32);
+ EXPECT_NE(result.const_eval_fn, nullptr);
+}
+
TEST_F(IntrinsicTableTest, MatchTypeConversion) {
auto* i32 = create<sem::I32>();
auto* vec3_i32 = create<sem::Vector>(i32, 3u);
auto* f32 = create<sem::F32>();
auto* vec3_f32 = create<sem::Vector>(f32, 3u);
- auto result =
- table->Lookup(InitConvIntrinsic::kVec3, i32, utils::Vector{vec3_f32}, Source{{12, 34}});
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, i32, utils::Vector{vec3_f32},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_NE(result.target, nullptr);
EXPECT_EQ(result.target->ReturnType(), vec3_i32);
EXPECT_TRUE(result.target->Is<sem::TypeConversion>());
@@ -860,16 +957,16 @@
TEST_F(IntrinsicTableTest, MismatchTypeConversion) {
auto* arr = create<sem::Array>(create<sem::U32>(), sem::RuntimeArrayCount{}, 4u, 4u, 4u, 4u);
auto* f32 = create<sem::F32>();
- auto result =
- table->Lookup(InitConvIntrinsic::kVec3, f32, utils::Vector{arr}, Source{{12, 34}});
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, f32, utils::Vector{arr},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
ASSERT_EQ(result.target, nullptr);
EXPECT_EQ(Diagnostics().str(),
R"(12:34 error: no matching initializer for vec3<f32>(array<u32>)
6 candidate initializers:
- vec3(vec3<T>) -> vec3<T> where: T is f32, f16, i32, u32 or bool
+ vec3(vec3<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
- vec3() -> vec3<T> where: T is f32, f16, i32, u32 or bool
+ vec3<T>() -> vec3<T> where: T is f32, f16, i32, u32 or bool
vec3(xy: vec2<T>, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(x: T, yz: vec2<T>) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
vec3(x: T, y: T, z: T) -> vec3<T> where: T is abstract-int, abstract-float, f32, f16, i32, u32 or bool
@@ -883,6 +980,39 @@
)");
}
+TEST_F(IntrinsicTableTest, MatchTypeConversion_ConstantEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* af = create<sem::AbstractFloat>();
+ auto* vec3_ai = create<sem::Vector>(ai, 3u);
+ auto* f32 = create<sem::F32>();
+ auto* vec3_f32 = create<sem::Vector>(f32, 3u);
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, af, utils::Vector{vec3_ai},
+ sem::EvaluationStage::kConstant, Source{{12, 34}});
+ ASSERT_NE(result.target, nullptr);
+ EXPECT_EQ(result.target->Stage(), sem::EvaluationStage::kConstant);
+ // NOTE: Conversions are explicit, so there's no way to have it return abstracts
+ EXPECT_EQ(result.target->ReturnType(), vec3_f32);
+ EXPECT_TRUE(result.target->Is<sem::TypeConversion>());
+ ASSERT_EQ(result.target->Parameters().Length(), 1u);
+ EXPECT_EQ(result.target->Parameters()[0]->Type(), vec3_ai);
+}
+
+TEST_F(IntrinsicTableTest, MatchTypeConversion_RuntimeEval) {
+ auto* ai = create<sem::AbstractInt>();
+ auto* af = create<sem::AbstractFloat>();
+ auto* vec3_ai = create<sem::Vector>(ai, 3u);
+ auto* vec3_f32 = create<sem::Vector>(create<sem::F32>(), 3u);
+ auto* vec3_i32 = create<sem::Vector>(create<sem::I32>(), 3u);
+ auto result = table->Lookup(InitConvIntrinsic::kVec3, af, utils::Vector{vec3_ai},
+ sem::EvaluationStage::kRuntime, Source{{12, 34}});
+ ASSERT_NE(result.target, nullptr);
+ EXPECT_EQ(result.target->Stage(), sem::EvaluationStage::kConstant);
+ EXPECT_EQ(result.target->ReturnType(), vec3_f32);
+ EXPECT_TRUE(result.target->Is<sem::TypeConversion>());
+ ASSERT_EQ(result.target->Parameters().Length(), 1u);
+ EXPECT_EQ(result.target->Parameters()[0]->Type(), vec3_i32);
+}
+
TEST_F(IntrinsicTableTest, Err257Arguments) { // crbug.com/1323605
auto* f32 = create<sem::F32>();
utils::Vector<const sem::Type*, 0> arg_tys;
@@ -900,7 +1030,8 @@
// The first should win overload resolution.
auto* ai = create<sem::AbstractInt>();
auto* i32 = create<sem::I32>();
- auto result = table->Lookup(InitConvIntrinsic::kI32, nullptr, utils::Vector{ai}, Source{});
+ auto result = table->Lookup(InitConvIntrinsic::kI32, nullptr, utils::Vector{ai},
+ sem::EvaluationStage::kConstant, Source{});
ASSERT_NE(result.target, nullptr);
EXPECT_EQ(result.target->ReturnType(), i32);
EXPECT_EQ(result.target->Parameters().Length(), 1u);
@@ -942,7 +1073,8 @@
TEST_P(IntrinsicTableAbstractBinaryTest, MatchAdd) {
auto* arg_lhs = GetParam().arg_lhs(*this);
auto* arg_rhs = GetParam().arg_rhs(*this);
- auto result = table->Lookup(ast::BinaryOp::kAdd, arg_lhs, arg_rhs, Source{{12, 34}},
+ auto result = table->Lookup(ast::BinaryOp::kAdd, arg_lhs, arg_rhs,
+ sem::EvaluationStage::kConstant, Source{{12, 34}},
/* is_compound */ false);
bool matched = result.result != nullptr;
diff --git a/src/tint/resolver/resolver.cc b/src/tint/resolver/resolver.cc
index f4f4c98..3252829 100644
--- a/src/tint/resolver/resolver.cc
+++ b/src/tint/resolver/resolver.cc
@@ -93,6 +93,7 @@
namespace {
constexpr int64_t kMaxArrayElementCount = 65536;
+constexpr uint32_t kMaxStatementDepth = 127;
} // namespace
@@ -173,7 +174,9 @@
if (!enabled_extensions_.Contains(ast::Extension::kChromiumDisableUniformityAnalysis)) {
if (!AnalyzeUniformity(builder_, dependencies_)) {
- return false;
+ if (kUniformityFailuresAsError) {
+ return false;
+ }
}
}
@@ -1779,7 +1782,8 @@
// call for a InitConvIntrinsic with an optional template argument type.
auto ct_init_or_conv = [&](InitConvIntrinsic ty, const sem::Type* template_arg) -> sem::Call* {
auto arg_tys = utils::Transform(args, [](auto* arg) { return arg->Type(); });
- auto ctor_or_conv = intrinsic_table_->Lookup(ty, template_arg, arg_tys, expr->source);
+ auto ctor_or_conv =
+ intrinsic_table_->Lookup(ty, template_arg, arg_tys, args_stage, expr->source);
if (!ctor_or_conv.target) {
return nullptr;
}
@@ -2494,7 +2498,8 @@
auto* lhs_ty = lhs->Type()->UnwrapRef();
auto* rhs_ty = rhs->Type()->UnwrapRef();
- auto op = intrinsic_table_->Lookup(expr->op, lhs_ty, rhs_ty, expr->source, false);
+ auto stage = sem::EarliestStage(lhs->Stage(), rhs->Stage());
+ auto op = intrinsic_table_->Lookup(expr->op, lhs_ty, rhs_ty, stage, expr->source, false);
if (!op.result) {
return nullptr;
}
@@ -2512,7 +2517,6 @@
}
const sem::Constant* value = nullptr;
- auto stage = sem::EarliestStage(lhs->Stage(), rhs->Stage());
if (stage == sem::EvaluationStage::kConstant) {
if (op.const_eval_fn) {
auto const_args = utils::Vector{lhs->ConstantValue(), rhs->ConstantValue()};
@@ -2594,7 +2598,8 @@
break;
default: {
- auto op = intrinsic_table_->Lookup(unary->op, expr_ty, unary->source);
+ stage = expr->Stage();
+ auto op = intrinsic_table_->Lookup(unary->op, expr_ty, stage, unary->source);
if (!op.result) {
return nullptr;
}
@@ -2605,7 +2610,6 @@
return nullptr;
}
}
- stage = expr->Stage();
if (stage == sem::EvaluationStage::kConstant) {
if (op.const_eval_fn) {
if (auto r = (const_eval_.*op.const_eval_fn)(
@@ -2706,14 +2710,15 @@
return utils::Failure;
}
- // Note: If the array count is an 'override', but not a identifier expression, we do not return
- // here, but instead continue to the ConstantValue() check below.
- if (auto* user = count_sem->UnwrapMaterialize()->As<sem::VariableUser>()) {
- if (auto* global = user->Variable()->As<sem::GlobalVariable>()) {
- if (global->Declaration()->Is<ast::Override>()) {
- return sem::ArrayCount{sem::OverrideArrayCount{global}};
+ if (count_sem->Stage() == sem::EvaluationStage::kOverride) {
+ // array count is an override expression.
+ // Is the count a named 'override'?
+ if (auto* user = count_sem->UnwrapMaterialize()->As<sem::VariableUser>()) {
+ if (auto* global = user->Variable()->As<sem::GlobalVariable>()) {
+ return sem::ArrayCount{sem::NamedOverrideArrayCount{global}};
}
}
+ return sem::ArrayCount{sem::UnnamedOverrideArrayCount{count_sem}};
}
auto* count_val = count_sem->ConstantValue();
@@ -3273,7 +3278,9 @@
auto* lhs_ty = lhs->Type()->UnwrapRef();
auto* rhs_ty = rhs->Type()->UnwrapRef();
- auto* ty = intrinsic_table_->Lookup(stmt->op, lhs_ty, rhs_ty, stmt->source, true).result;
+ auto stage = sem::EarliestStage(lhs->Stage(), rhs->Stage());
+ auto* ty =
+ intrinsic_table_->Lookup(stmt->op, lhs_ty, rhs_ty, stage, stmt->source, true).result;
if (!ty) {
return false;
}
@@ -3400,6 +3407,14 @@
TINT_SCOPED_ASSIGNMENT(current_statement_, sem);
TINT_SCOPED_ASSIGNMENT(current_compound_statement_,
as_compound ? as_compound : current_compound_statement_);
+ TINT_SCOPED_ASSIGNMENT(current_scoping_depth_, current_scoping_depth_ + 1);
+
+ if (current_scoping_depth_ > kMaxStatementDepth) {
+ AddError("statement nesting depth / chaining length exceeds limit of " +
+ std::to_string(kMaxStatementDepth),
+ ast->source);
+ return nullptr;
+ }
if (!callback()) {
return nullptr;
diff --git a/src/tint/resolver/resolver.h b/src/tint/resolver/resolver.h
index bd7edf7..b657b46 100644
--- a/src/tint/resolver/resolver.h
+++ b/src/tint/resolver/resolver.h
@@ -377,7 +377,8 @@
/// * Assigns `sem` to #current_compound_statement_ if `sem` derives from
/// sem::CompoundStatement.
/// * Then calls `callback`.
- /// * Before returning #current_statement_ and #current_compound_statement_ are restored to their original values.
+ /// * Before returning #current_statement_ and #current_compound_statement_ are restored to
+ /// their original values.
/// @returns `sem` if `callback` returns true, otherwise `nullptr`.
template <typename SEM, typename F>
SEM* StatementScope(const ast::Statement* ast, SEM* sem, F&& callback);
@@ -439,6 +440,7 @@
sem::Function* current_function_ = nullptr;
sem::Statement* current_statement_ = nullptr;
sem::CompoundStatement* current_compound_statement_ = nullptr;
+ uint32_t current_scoping_depth_ = 0;
};
} // namespace tint::resolver
diff --git a/src/tint/resolver/resolver_test.cc b/src/tint/resolver/resolver_test.cc
index 1955c9d..13b1da1 100644
--- a/src/tint/resolver/resolver_test.cc
+++ b/src/tint/resolver/resolver_test.cc
@@ -486,8 +486,8 @@
EXPECT_EQ(ary->Count(), sem::ConstantArrayCount{10u});
}
-TEST_F(ResolverTest, ArraySize_Override) {
- // override size = 0;
+TEST_F(ResolverTest, ArraySize_NamedOverride) {
+ // override size = 10i;
// var<workgroup> a : array<f32, size>;
auto* override = Override("size", Expr(10_i));
auto* a = GlobalVar("a", ty.array(ty.f32(), Expr("size")), ast::AddressSpace::kWorkgroup);
@@ -500,11 +500,11 @@
auto* ary = ref->StoreType()->As<sem::Array>();
auto* sem_override = Sem().Get<sem::GlobalVariable>(override);
ASSERT_NE(sem_override, nullptr);
- EXPECT_EQ(ary->Count(), sem::OverrideArrayCount{sem_override});
+ EXPECT_EQ(ary->Count(), sem::NamedOverrideArrayCount{sem_override});
}
-TEST_F(ResolverTest, ArraySize_Override_Equivalence) {
- // override size = 0;
+TEST_F(ResolverTest, ArraySize_NamedOverride_Equivalence) {
+ // override size = 10i;
// var<workgroup> a : array<f32, size>;
// var<workgroup> b : array<f32, size>;
auto* override = Override("size", Expr(10_i));
@@ -525,11 +525,58 @@
auto* sem_override = Sem().Get<sem::GlobalVariable>(override);
ASSERT_NE(sem_override, nullptr);
- EXPECT_EQ(ary_a->Count(), sem::OverrideArrayCount{sem_override});
- EXPECT_EQ(ary_b->Count(), sem::OverrideArrayCount{sem_override});
+ EXPECT_EQ(ary_a->Count(), sem::NamedOverrideArrayCount{sem_override});
+ EXPECT_EQ(ary_b->Count(), sem::NamedOverrideArrayCount{sem_override});
EXPECT_EQ(ary_a, ary_b);
}
+TEST_F(ResolverTest, ArraySize_UnnamedOverride) {
+ // override size = 10i;
+ // var<workgroup> a : array<f32, size*2>;
+ auto* override = Override("size", Expr(10_i));
+ auto* cnt = Mul("size", 2_a);
+ auto* a = GlobalVar("a", ty.array(ty.f32(), cnt), ast::AddressSpace::kWorkgroup);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ ASSERT_NE(TypeOf(a), nullptr);
+ auto* ref = TypeOf(a)->As<sem::Reference>();
+ ASSERT_NE(ref, nullptr);
+ auto* ary = ref->StoreType()->As<sem::Array>();
+ auto* sem_override = Sem().Get<sem::GlobalVariable>(override);
+ ASSERT_NE(sem_override, nullptr);
+ EXPECT_EQ(ary->Count(), sem::UnnamedOverrideArrayCount{Sem().Get(cnt)});
+}
+
+TEST_F(ResolverTest, ArraySize_UnamedOverride_Equivalence) {
+ // override size = 10i;
+ // var<workgroup> a : array<f32, size>;
+ // var<workgroup> b : array<f32, size>;
+ auto* override = Override("size", Expr(10_i));
+ auto* a_cnt = Mul("size", 2_a);
+ auto* b_cnt = Mul("size", 2_a);
+ auto* a = GlobalVar("a", ty.array(ty.f32(), a_cnt), ast::AddressSpace::kWorkgroup);
+ auto* b = GlobalVar("b", ty.array(ty.f32(), b_cnt), ast::AddressSpace::kWorkgroup);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ ASSERT_NE(TypeOf(a), nullptr);
+ auto* ref_a = TypeOf(a)->As<sem::Reference>();
+ ASSERT_NE(ref_a, nullptr);
+ auto* ary_a = ref_a->StoreType()->As<sem::Array>();
+
+ ASSERT_NE(TypeOf(b), nullptr);
+ auto* ref_b = TypeOf(b)->As<sem::Reference>();
+ ASSERT_NE(ref_b, nullptr);
+ auto* ary_b = ref_b->StoreType()->As<sem::Array>();
+
+ auto* sem_override = Sem().Get<sem::GlobalVariable>(override);
+ ASSERT_NE(sem_override, nullptr);
+ EXPECT_EQ(ary_a->Count(), sem::UnnamedOverrideArrayCount{Sem().Get(a_cnt)});
+ EXPECT_EQ(ary_b->Count(), sem::UnnamedOverrideArrayCount{Sem().Get(b_cnt)});
+ EXPECT_NE(ary_a, ary_b);
+}
+
TEST_F(ResolverTest, Expr_Bitcast) {
GlobalVar("name", ty.f32(), ast::AddressSpace::kPrivate);
@@ -2331,5 +2378,47 @@
EXPECT_TRUE(r()->Resolve());
}
+// Windows debug builds have significantly smaller stack than other builds, and these tests will
+// stack overflow.
+#if !defined(NDEBUG)
+
+TEST_F(ResolverTest, ScopeDepth_NestedBlocks) {
+ const ast::Statement* stmt = Return();
+ for (size_t i = 0; i < 150; i++) {
+ stmt = Block(Source{{i, 1}}, stmt);
+ }
+ WrapInFunction(stmt);
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(),
+ "23:1 error: statement nesting depth / chaining length exceeds limit of 127");
+}
+
+TEST_F(ResolverTest, ScopeDepth_NestedIf) {
+ const ast::Statement* stmt = Return();
+ for (size_t i = 0; i < 150; i++) {
+ stmt = If(Source{{i, 1}}, false, Block(Source{{i, 2}}, stmt));
+ }
+ WrapInFunction(stmt);
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(),
+ "86:1 error: statement nesting depth / chaining length exceeds limit of 127");
+}
+
+TEST_F(ResolverTest, ScopeDepth_IfElseChain) {
+ const ast::Statement* stmt = nullptr;
+ for (size_t i = 0; i < 150; i++) {
+ stmt = If(Source{{i, 1}}, false, Block(Source{{i, 2}}), Else(stmt));
+ }
+ WrapInFunction(stmt);
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(),
+ "24:2 error: statement nesting depth / chaining length exceeds limit of 127");
+}
+
+#endif // !defined(NDEBUG)
+
} // namespace
} // namespace tint::resolver
diff --git a/src/tint/resolver/type_validation_test.cc b/src/tint/resolver/type_validation_test.cc
index d2587c5..b539e49 100644
--- a/src/tint/resolver/type_validation_test.cc
+++ b/src/tint/resolver/type_validation_test.cc
@@ -371,7 +371,7 @@
"12:34 error: array byte size (0x7a1185ee00) must not exceed 0xffffffff bytes");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_PrivateVar) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_PrivateVar) {
// override size = 10i;
// var<private> a : array<f32, size>;
Override("size", Expr(10_i));
@@ -382,19 +382,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_ComplexExpr) {
- // override size = 10i;
- // var<workgroup> a : array<f32, size + 1>;
- Override("size", Expr(10_i));
- GlobalVar("a", ty.array(ty.f32(), Add(Source{{12, 34}}, "size", 1_i)),
- ast::AddressSpace::kWorkgroup);
- EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(),
- "12:34 error: array count must evaluate to a constant integer expression or override "
- "variable");
-}
-
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_InArray) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_InArray) {
// override size = 10i;
// var<workgroup> a : array<array<f32, size>, 4>;
Override("size", Expr(10_i));
@@ -406,7 +394,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_InStruct) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_InStruct) {
// override size = 10i;
// struct S {
// a : array<f32, size>
@@ -419,7 +407,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_FunctionVar_Explicit) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_FunctionVar_Explicit) {
// override size = 10i;
// fn f() {
// var a : array<f32, size>;
@@ -435,7 +423,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_FunctionLet_Explicit) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_FunctionLet_Explicit) {
// override size = 10i;
// fn f() {
// var a : array<f32, size>;
@@ -451,7 +439,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_FunctionVar_Implicit) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_FunctionVar_Implicit) {
// override size = 10i;
// var<workgroup> w : array<f32, size>;
// fn f() {
@@ -469,7 +457,7 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_FunctionLet_Implicit) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_FunctionLet_Implicit) {
// override size = 10i;
// var<workgroup> w : array<f32, size>;
// fn f() {
@@ -487,7 +475,24 @@
"type of a 'var<workgroup>'");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_Param) {
+TEST_F(ResolverTypeValidationTest, ArraySize_UnnamedOverride_Equivalence) {
+ // override size = 10i;
+ // var<workgroup> a : array<f32, size + 1>;
+ // var<workgroup> b : array<f32, size + 1>;
+ // fn f() {
+ // a = b;
+ // }
+ Override("size", Expr(10_i));
+ GlobalVar("a", ty.array(ty.f32(), Add("size", 1_i)), ast::AddressSpace::kWorkgroup);
+ GlobalVar("b", ty.array(ty.f32(), Add("size", 1_i)), ast::AddressSpace::kWorkgroup);
+ WrapInFunction(Assign(Source{{12, 34}}, "a", "b"));
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(),
+ "12:34 error: cannot assign 'array<f32, [unnamed override-expression]>' to "
+ "'array<f32, [unnamed override-expression]>'");
+}
+
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_Param) {
// override size = 10i;
// fn f(a : array<f32, size>) {
// }
@@ -498,7 +503,7 @@
EXPECT_EQ(r()->error(), "12:34 error: type of function parameter must be constructible");
}
-TEST_F(ResolverTypeValidationTest, ArraySize_Override_ReturnType) {
+TEST_F(ResolverTypeValidationTest, ArraySize_NamedOverride_ReturnType) {
// override size = 10i;
// fn f() -> array<f32, size> {
// }
diff --git a/src/tint/resolver/uniformity.cc b/src/tint/resolver/uniformity.cc
index e8f1bb9..831e49e 100644
--- a/src/tint/resolver/uniformity.cc
+++ b/src/tint/resolver/uniformity.cc
@@ -72,7 +72,6 @@
/// FunctionTag describes a functions effects on uniformity.
enum FunctionTag {
- SubsequentControlFlowMayBeNonUniform,
ReturnValueMayBeNonUniform,
NoRestriction,
};
@@ -80,7 +79,6 @@
/// ParameterTag describes the uniformity requirements of values passed to a function parameter.
enum ParameterTag {
ParameterRequiredToBeUniform,
- ParameterRequiredToBeUniformForSubsequentControlFlow,
ParameterRequiredToBeUniformForReturnValue,
ParameterNoRestriction,
};
@@ -163,7 +161,6 @@
required_to_be_uniform = CreateNode("RequiredToBeUniform");
may_be_non_uniform = CreateNode("MayBeNonUniform");
cf_start = CreateNode("CF_start");
- cf_return = CreateNode("CF_return");
if (func->return_type) {
value_return = CreateNode("Value_return");
}
@@ -208,8 +205,6 @@
Node* may_be_non_uniform;
/// Special `CF_start` node.
Node* cf_start;
- /// Special `CF_return` node.
- Node* cf_return;
/// Special `Value_return` node.
Node* value_return;
@@ -339,8 +334,7 @@
// Process function body.
if (func->body) {
- auto* cf = ProcessStatement(current_function_->cf_start, func->body);
- current_function_->cf_return->AddEdge(cf);
+ ProcessStatement(current_function_->cf_start, func->body);
}
#if TINT_DUMP_UNIFORMITY_GRAPH
@@ -378,25 +372,6 @@
}
}
- // Look at which nodes are reachable from "CF_return"
- {
- utils::UniqueVector<Node*, 4> reachable;
- Traverse(current_function_->cf_return, &reachable);
- if (reachable.Contains(current_function_->may_be_non_uniform)) {
- current_function_->function_tag = SubsequentControlFlowMayBeNonUniform;
- }
-
- // Set the parameter tag to ParameterRequiredToBeUniformForSubsequentControlFlow for
- // each parameter node that was reachable.
- for (size_t i = 0; i < func->params.Length(); i++) {
- auto* param = func->params[i];
- if (reachable.Contains(current_function_->variables.Get(sem_.Get(param)))) {
- current_function_->parameters[i].tag =
- ParameterRequiredToBeUniformForSubsequentControlFlow;
- }
- }
- }
-
// If "Value_return" exists, look at which nodes are reachable from it
if (current_function_->value_return) {
utils::UniqueVector<Node*, 4> reachable;
@@ -918,12 +893,10 @@
Node* cf_ret;
if (r->value) {
auto [cf1, v] = ProcessExpression(cf, r->value);
- current_function_->cf_return->AddEdge(cf1);
current_function_->value_return->AddEdge(v);
cf_ret = cf1;
} else {
TINT_ASSERT(Resolver, cf != nullptr);
- current_function_->cf_return->AddEdge(cf);
cf_ret = cf;
}
@@ -1395,10 +1368,7 @@
}
cf_after->AddEdge(call_node);
- if (function_tag == SubsequentControlFlowMayBeNonUniform) {
- cf_after->AddEdge(current_function_->may_be_non_uniform);
- cf_after->affects_control_flow = true;
- } else if (function_tag == ReturnValueMayBeNonUniform) {
+ if (function_tag == ReturnValueMayBeNonUniform) {
result->AddEdge(current_function_->may_be_non_uniform);
}
@@ -1411,10 +1381,6 @@
case ParameterRequiredToBeUniform:
current_function_->required_to_be_uniform->AddEdge(args[i]);
break;
- case ParameterRequiredToBeUniformForSubsequentControlFlow:
- cf_after->AddEdge(args[i]);
- args[i]->affects_control_flow = true;
- break;
case ParameterRequiredToBeUniformForReturnValue:
result->AddEdge(args[i]);
break;
@@ -1544,26 +1510,9 @@
auto* control_flow = TraceBackAlongPathUntil(
non_uniform_source, [](Node* node) { return node->affects_control_flow; });
if (control_flow) {
- if (auto* call = control_flow->ast->As<ast::CallExpression>()) {
- if (control_flow->type == Node::kFunctionCallArgument) {
- auto idx = control_flow->arg_index;
- diagnostics_.add_note(diag::System::Resolver,
- "non-uniform function call argument causes subsequent "
- "control flow to be non-uniform",
- call->args[idx]->source);
-
- // Recurse into the target function.
- if (auto* user = SemCall(call)->Target()->As<sem::Function>()) {
- auto& callee = functions_.at(user->Declaration());
- ShowCauseOfNonUniformity(callee, callee.cf_return,
- callee.parameters[idx].init_value);
- }
- }
- } else {
- diagnostics_.add_note(diag::System::Resolver,
- "control flow depends on non-uniform value",
- control_flow->ast->source);
- }
+ diagnostics_.add_note(diag::System::Resolver,
+ "control flow depends on non-uniform value",
+ control_flow->ast->source);
// TODO(jrprice): There are cases where the function with uniformity requirements is not
// actually inside this control flow construct, for example:
// - A conditional interrupt (e.g. break), with a barrier elsewhere in the loop
@@ -1619,21 +1568,6 @@
auto target_name = builder_->Symbols().NameFor(
c->target.name->As<ast::IdentifierExpression>()->symbol);
switch (non_uniform_source->type) {
- case Node::kRegular: {
- diagnostics_.add_note(
- diag::System::Resolver,
- "calling '" + target_name +
- "' may cause subsequent control flow to be non-uniform",
- c->source);
-
- // Recurse into the target function.
- if (auto* user = SemCall(c)->Target()->As<sem::Function>()) {
- auto& callee = functions_.at(user->Declaration());
- ShowCauseOfNonUniformity(callee, callee.cf_return,
- callee.may_be_non_uniform);
- }
- break;
- }
case Node::kFunctionCallReturnValue: {
diagnostics_.add_note(
diag::System::Resolver,
@@ -1672,7 +1606,9 @@
// the `MakeError` function.
auto report = [&](Source source, std::string msg) {
diag::Diagnostic error{};
- error.severity = note ? diag::Severity::Note : diag::Severity::Error;
+ auto failureSeverity =
+ kUniformityFailuresAsError ? diag::Severity::Error : diag::Severity::Warning;
+ error.severity = note ? diag::Severity::Note : failureSeverity;
error.system = diag::System::Resolver;
error.source = source;
error.message = msg;
diff --git a/src/tint/resolver/uniformity.h b/src/tint/resolver/uniformity.h
index 39827cf..7980801 100644
--- a/src/tint/resolver/uniformity.h
+++ b/src/tint/resolver/uniformity.h
@@ -25,6 +25,9 @@
namespace tint::resolver {
+/// If true, uniformity analysis failures will be treated as an error, else as a warning.
+constexpr bool kUniformityFailuresAsError = false;
+
/// Analyze the uniformity of a program.
/// @param builder the program to analyze
/// @param dependency_graph the dependency-ordered module-scope declarations
diff --git a/src/tint/resolver/uniformity_test.cc b/src/tint/resolver/uniformity_test.cc
index 249db64..faefb13 100644
--- a/src/tint/resolver/uniformity_test.cc
+++ b/src/tint/resolver/uniformity_test.cc
@@ -31,13 +31,10 @@
class UniformityAnalysisTestBase {
protected:
- /// Parse and resolve a WGSL shader.
- /// @param src the WGSL source code
- /// @param should_pass true if `src` should pass the analysis, otherwise false
- void RunTest(std::string src, bool should_pass) {
- auto file = std::make_unique<Source::File>("test", src);
- auto program = reader::wgsl::Parse(file.get());
-
+ /// Build and resolve a program from a ProgramBuilder object.
+ /// @param program the program
+ /// @param should_pass true if `builder` program should pass the analysis, otherwise false
+ void RunTest(Program&& program, bool should_pass) {
diag::Formatter::Style style;
style.print_newline_at_end = false;
error_ = diag::Formatter(style).format(program.Diagnostics());
@@ -51,21 +48,29 @@
EXPECT_EQ(program.Diagnostics().count(), 0u) << error_;
}
} else {
- EXPECT_FALSE(valid);
+ if (kUniformityFailuresAsError) {
+ EXPECT_FALSE(valid);
+ } else {
+ EXPECT_TRUE(valid) << error_;
+ }
}
}
+ /// Parse and resolve a WGSL shader.
+ /// @param src the WGSL source code
+ /// @param should_pass true if `src` should pass the analysis, otherwise false
+ void RunTest(std::string src, bool should_pass) {
+ auto file = std::make_unique<Source::File>("test", src);
+ auto program = reader::wgsl::Parse(file.get());
+ return RunTest(std::move(program), should_pass);
+ }
+
/// Build and resolve a program from a ProgramBuilder object.
/// @param builder the program builder
- /// @returns true on success, false on failure
- bool RunTest(ProgramBuilder&& builder) {
+ /// @param should_pass true if `builder` program should pass the analysis, otherwise false
+ void RunTest(ProgramBuilder&& builder, bool should_pass) {
auto program = Program(std::move(builder));
-
- diag::Formatter::Style style;
- style.print_newline_at_end = false;
- error_ = diag::Formatter(style).format(program.Diagnostics());
-
- return program.IsValid();
+ return RunTest(std::move(program), should_pass);
}
/// The error message from the parser or resolver, if any.
@@ -317,7 +322,7 @@
bool should_pass = !(MayBeNonUniform(condition) && RequiredToBeUniform(function));
RunTest(src, should_pass);
if (!should_pass) {
- EXPECT_THAT(error_, ::testing::StartsWith("test:31:5 error: "));
+ EXPECT_THAT(error_, ::testing::StartsWith("test:31:5 warning: "));
EXPECT_THAT(error_, ::testing::HasSubstr("must only be called from uniform control flow"));
}
}
@@ -333,134 +338,6 @@
/// Test specific function and parameter tags that are not tested above.
////////////////////////////////////////////////////////////////////////////////
-TEST_F(UniformityAnalysisTest, SubsequentControlFlowMayBeNonUniform_Pass) {
- // Call a function that causes subsequent control flow to be non-uniform, and then call another
- // function that doesn't require uniformity.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> rw : i32;
-
-var<private> p : i32;
-
-fn foo() {
- if (rw == 0) {
- p = 42;
- return;
- }
- p = 5;
- return;
-}
-
-fn bar() {
- if (p == 42) {
- p = 7;
- }
-}
-
-fn main() {
- foo();
- bar();
-}
-)";
-
- RunTest(src, true);
-}
-
-TEST_F(UniformityAnalysisTest, SubsequentControlFlowMayBeNonUniform_Fail) {
- // Call a function that causes subsequent control flow to be non-uniform, and then call another
- // function that requires uniformity.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> rw : i32;
-
-var<private> p : i32;
-
-fn foo() {
- if (rw == 0) {
- p = 42;
- return;
- }
- p = 5;
- return;
-}
-
-fn main() {
- foo();
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:17:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:16:3 note: calling 'foo' may cause subsequent control flow to be non-uniform
- foo();
- ^^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (rw == 0) {
- ^^
-
-test:7:7 note: reading from read_write storage buffer 'rw' may result in a non-uniform value
- if (rw == 0) {
- ^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, SubsequentControlFlowMayBeNonUniform_Nested_Fail) {
- // Indirectly call a function that causes subsequent control flow to be non-uniform, and then
- // call another function that requires uniformity.
- // The lack of return statement in `foo()` requires that we implicitly add an edge from
- // CF_return to that last control flow node of the function.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> rw : i32;
-
-var<private> p : i32;
-
-fn bar() {
- if (rw == 0) {
- p = 42;
- return;
- }
- p = 5;
- return;
-}
-
-fn foo() {
- bar();
-}
-
-fn main() {
- foo();
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:21:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:20:3 note: calling 'foo' may cause subsequent control flow to be non-uniform
- foo();
- ^^^
-
-test:16:3 note: calling 'bar' may cause subsequent control flow to be non-uniform
- bar();
- ^^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (rw == 0) {
- ^^
-
-test:7:7 note: reading from read_write storage buffer 'rw' may result in a non-uniform value
- if (rw == 0) {
- ^^
-)");
-}
-
TEST_F(UniformityAnalysisTest, ParameterNoRestriction_Pass) {
// Pass a non-uniform value as an argument, and then try to use the return value for
// control-flow guarding a barrier.
@@ -527,7 +404,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:11:7 error: parameter 'i' of 'foo' must be uniform
+ R"(test:11:7 warning: parameter 'i' of 'foo' must be uniform
foo(rw);
^^
@@ -580,7 +457,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -594,79 +471,6 @@
)");
}
-TEST_F(UniformityAnalysisTest, ParameterRequiredToBeUniformForSubsequentControlFlow_Pass) {
- // Pass a uniform value as an argument to a function that uses that parameter return early, and
- // then invoke a barrier after calling that function.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read> ro : i32;
-
-var<private> p : i32;
-
-fn foo(i : i32) {
- if (i == 0) {
- p = 42;
- return;
- }
- p = 5;
- return;
-}
-
-fn bar() {
- foo(ro);
- workgroupBarrier();
-}
-)";
-
- RunTest(src, true);
-}
-
-TEST_F(UniformityAnalysisTest, ParameterRequiredToBeUniformForSubsequentControlFlow_Fail) {
- // Pass a non-uniform value as an argument to a function that uses that parameter return early,
- // and then invoke a barrier after calling that function.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> rw : i32;
-
-var<private> p : i32;
-
-fn foo(i : i32) {
- if (i == 0) {
- p = 42;
- return;
- }
- p = 5;
- return;
-}
-
-fn bar() {
- foo(rw);
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:17:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:16:7 note: non-uniform function call argument causes subsequent control flow to be non-uniform
- foo(rw);
- ^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (i == 0) {
- ^^
-
-test:7:7 note: reading from 'i' may result in a non-uniform value
- if (i == 0) {
- ^
-
-test:16:7 note: reading from read_write storage buffer 'rw' may result in a non-uniform value
- foo(rw);
- ^^
-)");
-}
-
////////////////////////////////////////////////////////////////////////////////
/// Test shader IO attributes.
////////////////////////////////////////////////////////////////////////////////
@@ -696,7 +500,7 @@
if (!should_pass) {
EXPECT_EQ(
error_,
- R"(test:5:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:5:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -731,7 +535,7 @@
if (!should_pass) {
EXPECT_EQ(
error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -776,7 +580,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -807,7 +611,7 @@
RunTest(src, should_pass);
if (!should_pass) {
EXPECT_EQ(error_,
- R"(test:5:5 error: 'dpdx' must only be called from uniform control flow
+ R"(test:5:5 warning: 'dpdx' must only be called from uniform control flow
dpdx(0.5);
^^^^
@@ -841,7 +645,7 @@
RunTest(src, should_pass);
if (!should_pass) {
EXPECT_EQ(error_,
- R"(test:9:5 error: 'dpdx' must only be called from uniform control flow
+ R"(test:9:5 warning: 'dpdx' must only be called from uniform control flow
dpdx(0.5);
^^^^
@@ -878,7 +682,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:5:5 error: 'dpdx' must only be called from uniform control flow
+ R"(test:5:5 warning: 'dpdx' must only be called from uniform control flow
dpdx(0.5);
^^^^
@@ -908,7 +712,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'dpdx' must only be called from uniform control flow
+ R"(test:9:5 warning: 'dpdx' must only be called from uniform control flow
dpdx(0.5);
^^^^
@@ -1024,7 +828,7 @@
EXPECT_THAT(
error_,
::testing::StartsWith(
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();)"));
EXPECT_THAT(error_,
::testing::HasSubstr("test:14:9 note: reading from read_write storage buffer "
@@ -1064,7 +868,7 @@
EXPECT_THAT(
error_,
::testing::StartsWith(
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();)"));
EXPECT_THAT(error_,
::testing::HasSubstr("test:13:9 note: reading from read_write storage buffer "
@@ -1105,7 +909,7 @@
EXPECT_THAT(
error_,
::testing::StartsWith(
- R"(test:15:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:15:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();)"));
EXPECT_THAT(error_,
::testing::HasSubstr("test:13:9 note: reading from read_write storage buffer "
@@ -1152,7 +956,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1203,7 +1007,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1271,7 +1075,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1355,7 +1159,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1393,7 +1197,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:15:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1436,7 +1240,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:20:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:20:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1510,7 +1314,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:20:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:20:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1551,7 +1355,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1595,7 +1399,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:9 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:9 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1636,7 +1440,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1677,7 +1481,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1765,72 +1569,6 @@
RunTest(src, true);
}
-TEST_F(UniformityAnalysisTest, Loop_NonUniformFunctionInBody_Reconverge) {
- // Loops reconverge at exit, so test that we can call workgroupBarrier() after a loop that
- // contains a call to a function that causes non-uniform control flow.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() {
- if (n == 42) {
- return;
- } else {
- return;
- }
-}
-
-fn foo() {
- loop {
- bar();
- break;
- }
- workgroupBarrier();
-}
-)";
-
- RunTest(src, true);
-}
-
-TEST_F(UniformityAnalysisTest, Loop_NonUniformFunctionDiscard_NoReconvergence) {
- // Loops should not reconverge after non-uniform discard statements.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() {
- if (n == 42) {
- discard;
- }
-}
-
-fn foo() {
- loop {
- bar();
- break;
- }
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:12:5 note: calling 'bar' may cause subsequent control flow to be non-uniform
- bar();
- ^^^
-
-test:5:3 note: control flow depends on non-uniform value
- if (n == 42) {
- ^^
-
-test:5:7 note: reading from read_write storage buffer 'n' may result in a non-uniform value
- if (n == 42) {
- ^
-)");
-}
-
TEST_F(UniformityAnalysisTest, ForLoop_CallInside_UniformCondition) {
std::string src = R"(
@group(0) @binding(0) var<storage, read> n : i32;
@@ -1858,7 +1596,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -1872,84 +1610,6 @@
)");
}
-TEST_F(UniformityAnalysisTest, ForLoop_CallInside_InitializerCausesNonUniformFlow) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() -> i32 {
- if (n == 42) {
- return 1;
- } else {
- return 2;
- }
-}
-
-fn foo() {
- for (var i = bar(); i < 10; i = i + 1) {
- workgroupBarrier();
- }
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:16 note: calling 'bar' may cause subsequent control flow to be non-uniform
- for (var i = bar(); i < 10; i = i + 1) {
- ^^^
-
-test:5:3 note: control flow depends on non-uniform value
- if (n == 42) {
- ^^
-
-test:5:7 note: reading from read_write storage buffer 'n' may result in a non-uniform value
- if (n == 42) {
- ^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, ForLoop_CallInside_ContinuingCausesNonUniformFlow) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() -> i32 {
- if (n == 42) {
- return 1;
- } else {
- return 2;
- }
-}
-
-fn foo() {
- for (var i = 0; i < 10; i = i + bar()) {
- workgroupBarrier();
- }
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:35 note: calling 'bar' may cause subsequent control flow to be non-uniform
- for (var i = 0; i < 10; i = i + bar()) {
- ^^^
-
-test:5:3 note: control flow depends on non-uniform value
- if (n == 42) {
- ^^
-
-test:5:7 note: reading from read_write storage buffer 'n' may result in a non-uniform value
- if (n == 42) {
- ^
-)");
-}
-
TEST_F(UniformityAnalysisTest, ForLoop_VarBecomesNonUniformInContinuing_BarrierInLoop) {
// Use a variable for a conditional barrier in a loop, and then assign a non-uniform value to
// that variable in the continuing statement.
@@ -1969,7 +1629,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2024,7 +1684,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2079,7 +1739,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2140,7 +1800,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:15:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2185,7 +1845,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:21:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:21:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2227,7 +1887,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2268,7 +1928,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2329,7 +1989,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2366,7 +2026,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2431,7 +2091,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:17:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:17:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2478,7 +2138,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:23:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:23:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2521,7 +2181,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2564,7 +2224,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2659,7 +2319,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2687,7 +2347,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2716,7 +2376,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2745,7 +2405,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2774,7 +2434,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2803,7 +2463,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2831,7 +2491,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2862,7 +2522,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -2939,7 +2599,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:15:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3022,7 +2682,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3059,7 +2719,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3216,7 +2876,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:3 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:3 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3246,7 +2906,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:3 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:3 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3283,7 +2943,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3313,7 +2973,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3348,7 +3008,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:11:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:11:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3415,7 +3075,7 @@
fallthrough;
^^^^^^^^^^^
-test:14:7 error: 'workgroupBarrier' must only be called from uniform control flow
+test:14:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3485,7 +3145,7 @@
fallthrough;
^^^^^^^^^^^
-test:14:9 error: 'workgroupBarrier' must only be called from uniform control flow
+test:14:9 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3524,7 +3184,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:9 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:9 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3564,7 +3224,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:19:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:19:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3630,7 +3290,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:18:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:18:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3699,7 +3359,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:21:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:21:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3741,7 +3401,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3827,76 +3487,6 @@
RunTest(src, true);
}
-TEST_F(UniformityAnalysisTest, Switch_NonUniformFunctionCall_Reconverge) {
- // Switch statements reconverge at exit, so test that we can call workgroupBarrier() after a
- // switch statement that contains a call to a function that causes non-uniform control flow.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() {
- if (n == 42) {
- return;
- } else {
- return;
- }
-}
-
-fn foo() {
- switch (42) {
- default: {
- bar();
- break;
- }
- }
- workgroupBarrier();
-}
-)";
-
- RunTest(src, true);
-}
-
-TEST_F(UniformityAnalysisTest, Switch_NonUniformFunctionDiscard_NoReconvergence) {
- // Switch statements should not reconverge after non-uniform discards.
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> n : i32;
-
-fn bar() {
- if (n == 42) {
- discard;
- }
-}
-
-fn foo() {
- switch (42) {
- default: {
- bar();
- break;
- }
- }
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:17:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:7 note: calling 'bar' may cause subsequent control flow to be non-uniform
- bar();
- ^^^
-
-test:5:3 note: control flow depends on non-uniform value
- if (n == 42) {
- ^^
-
-test:5:7 note: reading from read_write storage buffer 'n' may result in a non-uniform value
- if (n == 42) {
- ^
-)");
-}
-
////////////////////////////////////////////////////////////////////////////////
/// Pointer tests.
////////////////////////////////////////////////////////////////////////////////
@@ -3916,7 +3506,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -3946,7 +3536,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4011,7 +3601,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:11:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:11:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4039,7 +3629,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4068,7 +3658,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4100,7 +3690,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:7 error: parameter 'p' of 'bar' must be uniform
+ R"(test:12:7 warning: parameter 'p' of 'bar' must be uniform
bar(&v);
^
@@ -4174,7 +3764,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4222,7 +3812,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4252,7 +3842,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4284,7 +3874,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:11:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:11:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4335,7 +3925,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:11:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:11:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4385,7 +3975,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4438,7 +4028,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4472,7 +4062,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4555,7 +4145,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:21:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:21:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4649,7 +4239,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:18:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:18:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4686,7 +4276,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4723,7 +4313,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4768,7 +4358,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:24:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:24:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4807,7 +4397,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:18:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:18:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4843,7 +4433,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:7:7 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:7:7 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4879,7 +4469,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:15:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4916,7 +4506,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4953,7 +4543,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -4994,7 +4584,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:20:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:20:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5053,7 +4643,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5110,7 +4700,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5165,7 +4755,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5203,7 +4793,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5243,7 +4833,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:16:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:16:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5311,9 +4901,9 @@
main_body.Push(b.If(b.Equal("v254", 0_i), b.Block(b.CallStmt(b.Call("workgroupBarrier")))));
b.Func("main", utils::Empty, ty.void_(), main_body);
- EXPECT_FALSE(RunTest(std::move(b)));
+ RunTest(std::move(b), false);
EXPECT_EQ(error_,
- R"(error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(warning: 'workgroupBarrier' must only be called from uniform control flow
note: control flow depends on non-uniform value
note: reading from module-scope private variable 'non_uniform_global' may result in a non-uniform value)");
}
@@ -5349,7 +4939,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5378,7 +4968,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5423,7 +5013,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5456,7 +5046,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5574,7 +5164,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5604,7 +5194,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5637,7 +5227,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5666,7 +5256,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5699,7 +5289,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5803,7 +5393,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5836,7 +5426,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5869,7 +5459,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5903,7 +5493,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5938,7 +5528,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -5972,7 +5562,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6002,7 +5592,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6033,7 +5623,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6065,7 +5655,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6097,7 +5687,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6127,7 +5717,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6176,7 +5766,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6209,7 +5799,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6262,7 +5852,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:12:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:12:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6299,7 +5889,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6337,7 +5927,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6375,7 +5965,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6430,7 +6020,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6531,7 +6121,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6567,7 +6157,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6603,7 +6193,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:14:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:14:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6640,7 +6230,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:13:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:13:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6681,7 +6271,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6710,7 +6300,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6755,7 +6345,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6786,7 +6376,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6819,7 +6409,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6866,7 +6456,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6899,7 +6489,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6932,7 +6522,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6965,7 +6555,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:9:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:9:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -6999,7 +6589,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7034,7 +6624,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7068,7 +6658,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:10:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7159,6 +6749,32 @@
/// Miscellaneous statement and expression tests.
////////////////////////////////////////////////////////////////////////////////
+TEST_F(UniformityAnalysisTest, FunctionReconvergesOnExit) {
+ // Call a function that has returns during non-uniform control flow, and test that the analysis
+ // reconverges when returning to the caller.
+ std::string src = R"(
+@group(0) @binding(0) var<storage, read_write> rw : i32;
+
+var<private> p : i32;
+
+fn foo() {
+ if (rw == 0) {
+ p = 42;
+ return;
+ }
+ p = 5;
+ return;
+}
+
+fn main() {
+ foo();
+ workgroupBarrier();
+}
+)";
+
+ RunTest(src, true);
+}
+
TEST_F(UniformityAnalysisTest, FunctionRequiresUniformFlowAndCausesNonUniformFlow) {
// Test that a function that requires uniform flow and then causes non-uniform flow can be
// called without error.
@@ -7195,7 +6811,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7222,7 +6838,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7249,7 +6865,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7279,7 +6895,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7309,7 +6925,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:8:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7323,176 +6939,12 @@
)");
}
-TEST_F(UniformityAnalysisTest, PhonyAssignment_LhsCausesNonUniformControlFlow) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> nonuniform_var : i32;
-
-fn bar() -> i32 {
- if (nonuniform_var == 42) {
- return 1;
- } else {
- return 2;
- }
-}
-
-fn foo() {
- _ = bar();
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:14:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:7 note: calling 'bar' may cause subsequent control flow to be non-uniform
- _ = bar();
- ^^^
-
-test:5:3 note: control flow depends on non-uniform value
- if (nonuniform_var == 42) {
- ^^
-
-test:5:7 note: reading from read_write storage buffer 'nonuniform_var' may result in a non-uniform value
- if (nonuniform_var == 42) {
- ^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, ShortCircuiting_NoReconvergeLHS) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-
-var<private> p : i32;
-
-fn non_uniform_discard_func() -> bool {
- if (non_uniform_global == 42) {
- discard;
- }
- return false;
-}
-
-fn main() {
- let b = non_uniform_discard_func() && false;
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:14:11 note: calling 'non_uniform_discard_func' may cause subsequent control flow to be non-uniform
- let b = non_uniform_discard_func() && false;
- ^^^^^^^^^^^^^^^^^^^^^^^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (non_uniform_global == 42) {
- ^^
-
-test:7:7 note: reading from read_write storage buffer 'non_uniform_global' may result in a non-uniform value
- if (non_uniform_global == 42) {
- ^^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, ShortCircuiting_NoReconvergeRHS) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-
-var<private> p : i32;
-
-fn non_uniform_discard_func() -> bool {
- if (non_uniform_global == 42) {
- discard;
- }
- return false;
-}
-
-fn main() {
- let b = false && non_uniform_discard_func();
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:14:20 note: calling 'non_uniform_discard_func' may cause subsequent control flow to be non-uniform
- let b = false && non_uniform_discard_func();
- ^^^^^^^^^^^^^^^^^^^^^^^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (non_uniform_global == 42) {
- ^^
-
-test:7:7 note: reading from read_write storage buffer 'non_uniform_global' may result in a non-uniform value
- if (non_uniform_global == 42) {
- ^^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, ShortCircuiting_NoReconvergeBoth) {
- std::string src = R"(
-@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-
-var<private> p : i32;
-
-fn non_uniform_discard_func() -> bool {
- if (non_uniform_global == 42) {
- discard;
- }
- return false;
-}
-
-fn main() {
- let b = non_uniform_discard_func() && non_uniform_discard_func();
- workgroupBarrier();
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:3 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:14:41 note: calling 'non_uniform_discard_func' may cause subsequent control flow to be non-uniform
- let b = non_uniform_discard_func() && non_uniform_discard_func();
- ^^^^^^^^^^^^^^^^^^^^^^^^
-
-test:7:3 note: control flow depends on non-uniform value
- if (non_uniform_global == 42) {
- ^^
-
-test:7:7 note: reading from read_write storage buffer 'non_uniform_global' may result in a non-uniform value
- if (non_uniform_global == 42) {
- ^^^^^^^^^^^^^^^^^^
-)");
-}
-
TEST_F(UniformityAnalysisTest, ShortCircuiting_ReconvergeLHS) {
std::string src = R"(
@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-var<private> p : i32;
-
-fn uniform_discard_func() -> bool {
- if (true) {
- discard;
- }
- return false;
-}
-
fn main() {
- let b = uniform_discard_func() && false;
+ let b = (non_uniform_global == 0) && false;
workgroupBarrier();
}
)";
@@ -7504,17 +6956,8 @@
std::string src = R"(
@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-var<private> p : i32;
-
-fn uniform_discard_func() -> bool {
- if (true) {
- discard;
- }
- return false;
-}
-
fn main() {
- let b = false && uniform_discard_func();
+ let b = false && (non_uniform_global == 0);
workgroupBarrier();
}
)";
@@ -7526,17 +6969,8 @@
std::string src = R"(
@group(0) @binding(0) var<storage, read_write> non_uniform_global : i32;
-var<private> p : i32;
-
-fn uniform_discard_func() -> bool {
- if (true) {
- discard;
- }
- return false;
-}
-
fn main() {
- let b = uniform_discard_func() && uniform_discard_func();
+ let b = (non_uniform_global != 0) && (non_uniform_global != 42);
workgroupBarrier();
}
)";
@@ -7603,7 +7037,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7630,7 +7064,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:6:5 error: 'storageBarrier' must only be called from uniform control flow
+ R"(test:6:5 warning: 'storageBarrier' must only be called from uniform control flow
storageBarrier();
^^^^^^^^^^^^^^
@@ -7687,9 +7121,9 @@
foo_body.Push(b.If(b.Equal(v_last, 0_i), b.Block(b.CallStmt(b.Call("workgroupBarrier")))));
b.Func("foo", utils::Empty, ty.void_(), foo_body);
- EXPECT_FALSE(RunTest(std::move(b)));
+ RunTest(std::move(b), false);
EXPECT_EQ(error_,
- R"(error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(warning: 'workgroupBarrier' must only be called from uniform control flow
note: control flow depends on non-uniform value
note: reading from module-scope private variable 'v0' may result in a non-uniform value)");
}
@@ -7715,7 +7149,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:10:5 error: 'foo' must only be called from uniform control flow
+ R"(test:10:5 warning: 'foo' must only be called from uniform control flow
foo();
^^^
@@ -7758,7 +7192,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:18:5 error: 'foo' must only be called from uniform control flow
+ R"(test:18:5 warning: 'foo' must only be called from uniform control flow
foo();
^^^
@@ -7801,7 +7235,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:19:7 error: parameter 'c' of 'foo' must be uniform
+ R"(test:19:7 warning: parameter 'c' of 'foo' must be uniform
foo(non_uniform);
^^^^^^^^^^^
@@ -7848,7 +7282,7 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:18:5 error: 'workgroupBarrier' must only be called from uniform control flow
+ R"(test:18:5 warning: 'workgroupBarrier' must only be called from uniform control flow
workgroupBarrier();
^^^^^^^^^^^^^^^^
@@ -7862,228 +7296,5 @@
)");
}
-TEST_F(UniformityAnalysisTest, Error_SubsequentControlFlowMayBeNonUniform) {
- // Make sure we correctly identify the function call as the source of non-uniform control flow
- // and not the if statement with the uniform condition.
- std::string src = R"(
-@group(0) @binding(0) var<uniform> uniform_value : i32;
-@group(0) @binding(1) var<storage, read_write> non_uniform_value : i32;
-
-fn foo() -> i32 {
- if (non_uniform_value == 0) {
- return 5;
- }
- return 6;
-}
-
-fn main() {
- foo();
- if (uniform_value == 42) {
- workgroupBarrier();
- }
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:3 note: calling 'foo' may cause subsequent control flow to be non-uniform
- foo();
- ^^^
-
-test:6:3 note: control flow depends on non-uniform value
- if (non_uniform_value == 0) {
- ^^
-
-test:6:7 note: reading from read_write storage buffer 'non_uniform_value' may result in a non-uniform value
- if (non_uniform_value == 0) {
- ^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, Error_ParameterRequiredToBeUniformForSubsequentControlFlow) {
- // Make sure we correctly identify the function call as the source of non-uniform control flow
- // and not the if statement with the uniform condition.
- std::string src = R"(
-@group(0) @binding(0) var<uniform> uniform_value : i32;
-@group(0) @binding(1) var<storage, read_write> non_uniform_value : i32;
-
-fn foo(x : i32) -> i32 {
- if (x == 0) {
- return 5;
- }
- return 6;
-}
-
-fn main() {
- foo(non_uniform_value);
- if (uniform_value == 42) {
- workgroupBarrier();
- }
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:7 note: non-uniform function call argument causes subsequent control flow to be non-uniform
- foo(non_uniform_value);
- ^^^^^^^^^^^^^^^^^
-
-test:6:3 note: control flow depends on non-uniform value
- if (x == 0) {
- ^^
-
-test:6:7 note: reading from 'x' may result in a non-uniform value
- if (x == 0) {
- ^
-
-test:13:7 note: reading from read_write storage buffer 'non_uniform_value' may result in a non-uniform value
- foo(non_uniform_value);
- ^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest,
- Error_ParameterRequiredToBeUniformForSubsequentControlFlow_ViaPointer) {
- // Make sure we correctly identify the function call as the source of non-uniform control flow
- // and not the if statement with the uniform condition.
- std::string src = R"(
-@group(0) @binding(1) var<storage, read_write> non_uniform_value : vec4<f32>;
-
-fn foo(limit : ptr<function, f32>) -> f32 {
- var i : i32;
- if (f32(i) > *limit) {
- return 0.0;
- }
- return 1.0f;
-}
-
-fn main() {
- var param : f32 = non_uniform_value.y;
- let i = foo(¶m);
- let y = dpdx(vec3<f32>());
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:11 error: 'dpdx' must only be called from uniform control flow
- let y = dpdx(vec3<f32>());
- ^^^^
-
-test:14:15 note: non-uniform function call argument causes subsequent control flow to be non-uniform
- let i = foo(¶m);
- ^
-
-test:6:3 note: control flow depends on non-uniform value
- if (f32(i) > *limit) {
- ^^
-
-test:6:14 note: result of expression may be non-uniform
- if (f32(i) > *limit) {
- ^
-
-test:13:21 note: reading from read_write storage buffer 'non_uniform_value' may result in a non-uniform value
- var param : f32 = non_uniform_value.y;
- ^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest,
- Error_ParameterRequiredToBeUniformForSubsequentControlFlow_ViaPointer_InLoop) {
- // Make sure we correctly identify the function call as the source of non-uniform control flow
- // and not the if statement with the uniform condition.
- std::string src = R"(
-@group(0) @binding(1) var<storage, read_write> non_uniform_value : vec4<f32>;
-
-fn foo(limit : ptr<function, f32>) -> f32 {
- var i : i32;
- loop {
- if (f32(i) > *limit) {
- return 0.0;
- }
- }
-}
-
-fn main() {
- var param : f32 = non_uniform_value.y;
- let i = foo(¶m);
- let y = dpdx(vec3<f32>());
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:16:11 error: 'dpdx' must only be called from uniform control flow
- let y = dpdx(vec3<f32>());
- ^^^^
-
-test:15:15 note: non-uniform function call argument causes subsequent control flow to be non-uniform
- let i = foo(¶m);
- ^
-
-test:7:5 note: control flow depends on non-uniform value
- if (f32(i) > *limit) {
- ^^
-
-test:4:8 note: reading from 'limit' may result in a non-uniform value
-fn foo(limit : ptr<function, f32>) -> f32 {
- ^^^^^
-
-test:14:21 note: reading from read_write storage buffer 'non_uniform_value' may result in a non-uniform value
- var param : f32 = non_uniform_value.y;
- ^^^^^^^^^^^^^^^^^
-)");
-}
-
-TEST_F(UniformityAnalysisTest, Error_ShortCircuitingExprCausesNonUniformControlFlow) {
- // Make sure we correctly identify the short-circuit as the source of non-uniform control flow
- // and not the if statement with the uniform condition.
- std::string src = R"(
-@group(0) @binding(0) var<uniform> uniform_value : i32;
-@group(0) @binding(1) var<storage, read_write> non_uniform_value : i32;
-
-fn non_uniform_discard_func() -> bool {
- if (non_uniform_value == 42) {
- discard;
- }
- return false;
-}
-
-fn main() {
- let b = non_uniform_discard_func() && true;
- if (uniform_value == 42) {
- workgroupBarrier();
- }
-}
-)";
-
- RunTest(src, false);
- EXPECT_EQ(error_,
- R"(test:15:5 error: 'workgroupBarrier' must only be called from uniform control flow
- workgroupBarrier();
- ^^^^^^^^^^^^^^^^
-
-test:13:11 note: calling 'non_uniform_discard_func' may cause subsequent control flow to be non-uniform
- let b = non_uniform_discard_func() && true;
- ^^^^^^^^^^^^^^^^^^^^^^^^
-
-test:6:3 note: control flow depends on non-uniform value
- if (non_uniform_value == 42) {
- ^^
-
-test:6:7 note: reading from read_write storage buffer 'non_uniform_value' may result in a non-uniform value
- if (non_uniform_value == 42) {
- ^^^^^^^^^^^^^^^^^
-)");
-}
-
} // namespace
} // namespace tint::resolver
diff --git a/src/tint/resolver/validation_test.cc b/src/tint/resolver/validation_test.cc
index c86a040..34ddd90 100644
--- a/src/tint/resolver/validation_test.cc
+++ b/src/tint/resolver/validation_test.cc
@@ -1126,7 +1126,7 @@
EXPECT_TRUE(r()->Resolve()) << r()->error();
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.");
+ "from a continuing block. Use `break-if` instead.");
}
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseInContinuing) {
@@ -1140,7 +1140,7 @@
EXPECT_TRUE(r()->Resolve()) << r()->error();
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.");
+ "from a continuing block. Use `break-if` instead.");
}
TEST_F(ResolverValidationTest, Stmt_BreakInContinuing) {
@@ -1151,7 +1151,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1170,7 +1170,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1189,7 +1189,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1208,7 +1208,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1226,7 +1226,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1245,7 +1245,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1264,7 +1264,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1282,7 +1282,7 @@
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
- "from a continuing block. Use break-if instead.\n"
+ "from a continuing block. Use `break-if` instead.\n"
"12:34 error: break statement in a continuing block must be the single "
"statement of an if statement's true or false block, and that if "
"statement must be the last statement of the continuing block\n"
@@ -1405,6 +1405,27 @@
EXPECT_EQ(r()->error(), "12:34 error: type is not constructible");
}
+TEST_F(ResolverTest, I32_Overflow) {
+ GlobalVar("v", ty.i32(), ast::AddressSpace::kPrivate, Expr(Source{{12, 24}}, 2147483648_a));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: value 2147483648 cannot be represented as 'i32'");
+}
+
+TEST_F(ResolverTest, I32_Underflow) {
+ GlobalVar("v", ty.i32(), ast::AddressSpace::kPrivate, Expr(Source{{12, 24}}, -2147483649_a));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: value -2147483649 cannot be represented as 'i32'");
+}
+
+TEST_F(ResolverTest, U32_Overflow) {
+ GlobalVar("v", ty.u32(), ast::AddressSpace::kPrivate, Expr(Source{{12, 24}}, 4294967296_a));
+
+ EXPECT_FALSE(r()->Resolve());
+ EXPECT_EQ(r()->error(), "12:24 error: value 4294967296 cannot be represented as 'u32'");
+}
+
} // namespace
} // namespace tint::resolver
diff --git a/src/tint/resolver/validator.cc b/src/tint/resolver/validator.cc
index 2355b6a..7f1cecf 100644
--- a/src/tint/resolver/validator.cc
+++ b/src/tint/resolver/validator.cc
@@ -642,14 +642,6 @@
return false;
}
- auto name = symbols_.NameFor(var->symbol);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError(
- "'" + name + "' is a builtin and cannot be redeclared as a module-scope 'var'",
- var->source);
- return false;
- }
-
return Var(global);
},
[&](const ast::Override*) { return Override(global, override_ids); },
@@ -818,13 +810,6 @@
}
}
- auto name = symbols_.NameFor(decl->symbol);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError("'" + name + "' is a builtin and cannot be redeclared as a 'override'",
- decl->source);
- return false;
- }
-
if (!storage_ty->is_scalar()) {
AddError(sem_.TypeNameOf(storage_ty) + " cannot be used as the type of a 'override'",
decl->source);
@@ -839,15 +824,7 @@
return true;
}
-bool Validator::Const(const sem::Variable* v) const {
- auto* decl = v->Declaration();
-
- auto name = symbols_.NameFor(decl->symbol);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError("'" + name + "' is a builtin and cannot be redeclared as a 'const'", decl->source);
- return false;
- }
-
+bool Validator::Const(const sem::Variable*) const {
return true;
}
@@ -1033,13 +1010,6 @@
bool Validator::Function(const sem::Function* func, ast::PipelineStage stage) const {
auto* decl = func->Declaration();
- auto name = symbols_.NameFor(decl->symbol);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError("'" + name + "' is a builtin and cannot be redeclared as a function",
- decl->source);
- return false;
- }
-
for (auto* attr : decl->attributes) {
if (attr->Is<ast::WorkgroupAttribute>()) {
if (decl->PipelineStage() != ast::PipelineStage::kCompute) {
@@ -1112,6 +1082,7 @@
func->Behaviors() != sem::Behavior::kNext && func->Behaviors() != sem::Behavior::kDiscard &&
func->Behaviors() != sem::Behaviors{sem::Behavior::kNext, //
sem::Behavior::kDiscard}) {
+ auto name = symbols_.NameFor(decl->symbol);
TINT_ICE(Resolver, diagnostics_)
<< "function '" << name << "' behaviors are: " << func->Behaviors();
}
@@ -1465,7 +1436,7 @@
if (auto* continuing = ClosestContinuing(/*stop_at_loop*/ true, current_statement)) {
AddWarning(
"use of deprecated language feature: `break` must not be used to exit from "
- "a continuing block. Use break-if instead.",
+ "a continuing block. Use `break-if` instead.",
stmt->Declaration()->source);
auto fail = [&](const char* note_msg, const Source& note_src) {
@@ -1651,9 +1622,8 @@
if (s->Is<sem::LoopStatement>()) {
break;
}
- if (s->Is<sem::LoopContinuingBlockStatement>()) {
- if (s->Declaration()->As<ast::BlockStatement>()->statements.Back() !=
- stmt->Declaration()) {
+ if (auto* continuing = s->As<sem::LoopContinuingBlockStatement>()) {
+ if (continuing->Declaration()->statements.Back() != stmt->Declaration()) {
AddError("break-if must be last statement in a continuing block",
stmt->Declaration()->source);
AddNote("see continuing block here", s->Declaration()->source);
@@ -2179,24 +2149,11 @@
return true;
}
-bool Validator::Alias(const ast::Alias* alias) const {
- auto name = symbols_.NameFor(alias->name);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError("'" + name + "' is a builtin and cannot be redeclared as an alias", alias->source);
- return false;
- }
-
+bool Validator::Alias(const ast::Alias*) const {
return true;
}
bool Validator::Structure(const sem::Struct* str, ast::PipelineStage stage) const {
- auto name = symbols_.NameFor(str->Declaration()->name);
- if (sem::ParseBuiltinType(name) != sem::BuiltinType::kNone) {
- AddError("'" + name + "' is a builtin and cannot be redeclared as a struct",
- str->Declaration()->source);
- return false;
- }
-
if (str->Members().empty()) {
AddError("structures must have at least one member", str->Declaration()->source);
return false;
@@ -2229,46 +2186,69 @@
const ast::InvariantAttribute* invariant_attribute = nullptr;
const ast::InterpolateAttribute* interpolate_attribute = nullptr;
for (auto* attr : member->Declaration()->attributes) {
- if (!attr->IsAnyOf<ast::BuiltinAttribute, //
- ast::InternalAttribute, //
- ast::InterpolateAttribute, //
- ast::InvariantAttribute, //
- ast::LocationAttribute, //
- ast::StructMemberOffsetAttribute, //
- ast::StructMemberSizeAttribute, //
- ast::StructMemberAlignAttribute>()) {
- if (attr->Is<ast::StrideAttribute>() &&
- IsValidationDisabled(member->Declaration()->attributes,
- ast::DisabledValidation::kIgnoreStrideAttribute)) {
- continue;
- }
- AddError("attribute is not valid for structure members", attr->source);
+ bool ok = Switch(
+ attr, //
+ [&](const ast::InvariantAttribute* invariant) {
+ invariant_attribute = invariant;
+ return true;
+ },
+ [&](const ast::LocationAttribute* location) {
+ has_location = true;
+ TINT_ASSERT(Resolver, member->Location().has_value());
+ if (!LocationAttribute(location, member->Location().value(), member->Type(),
+ locations, stage, member->Declaration()->source)) {
+ return false;
+ }
+ return true;
+ },
+ [&](const ast::BuiltinAttribute* builtin) {
+ if (!BuiltinAttribute(builtin, member->Type(), stage,
+ /* is_input */ false)) {
+ return false;
+ }
+ if (builtin->builtin == ast::BuiltinValue::kPosition) {
+ has_position = true;
+ }
+ return true;
+ },
+ [&](const ast::InterpolateAttribute* interpolate) {
+ interpolate_attribute = interpolate;
+ if (!InterpolateAttribute(interpolate, member->Type())) {
+ return false;
+ }
+ return true;
+ },
+ [&](const ast::StructMemberSizeAttribute*) {
+ if (!member->Type()->HasCreationFixedFootprint()) {
+ AddError(
+ "@size can only be applied to members where the member's type size "
+ "can be fully determined at shader creation time",
+ attr->source);
+ return false;
+ }
+ return true;
+ },
+ [&](Default) {
+ if (!attr->IsAnyOf<ast::BuiltinAttribute, //
+ ast::InternalAttribute, //
+ ast::InterpolateAttribute, //
+ ast::InvariantAttribute, //
+ ast::LocationAttribute, //
+ ast::StructMemberOffsetAttribute, //
+ ast::StructMemberAlignAttribute>()) {
+ if (attr->Is<ast::StrideAttribute>() &&
+ IsValidationDisabled(member->Declaration()->attributes,
+ ast::DisabledValidation::kIgnoreStrideAttribute)) {
+ return true;
+ }
+ AddError("attribute is not valid for structure members", attr->source);
+ return false;
+ }
+ return true;
+ });
+ if (!ok) {
return false;
}
-
- if (auto* invariant = attr->As<ast::InvariantAttribute>()) {
- invariant_attribute = invariant;
- } else if (auto* location = attr->As<ast::LocationAttribute>()) {
- has_location = true;
- TINT_ASSERT(Resolver, member->Location().has_value());
- if (!LocationAttribute(location, member->Location().value(), member->Type(),
- locations, stage, member->Declaration()->source)) {
- return false;
- }
- } else if (auto* builtin = attr->As<ast::BuiltinAttribute>()) {
- if (!BuiltinAttribute(builtin, member->Type(), stage,
- /* is_input */ false)) {
- return false;
- }
- if (builtin->builtin == ast::BuiltinValue::kPosition) {
- has_position = true;
- }
- } else if (auto* interpolate = attr->As<ast::InterpolateAttribute>()) {
- interpolate_attribute = interpolate;
- if (!InterpolateAttribute(interpolate, member->Type())) {
- return false;
- }
- }
}
if (invariant_attribute && !has_position) {
diff --git a/src/tint/sem/abstract_numeric.cc b/src/tint/sem/abstract_numeric.cc
index e7d1846..eea9abe 100644
--- a/src/tint/sem/abstract_numeric.cc
+++ b/src/tint/sem/abstract_numeric.cc
@@ -18,7 +18,12 @@
namespace tint::sem {
-AbstractNumeric::AbstractNumeric() = default;
+AbstractNumeric::AbstractNumeric()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
AbstractNumeric::AbstractNumeric(AbstractNumeric&&) = default;
AbstractNumeric::~AbstractNumeric() = default;
@@ -30,8 +35,4 @@
return 0;
}
-bool AbstractNumeric::IsConstructible() const {
- return true;
-}
-
} // namespace tint::sem
diff --git a/src/tint/sem/abstract_numeric.h b/src/tint/sem/abstract_numeric.h
index 620c528..68f21ae 100644
--- a/src/tint/sem/abstract_numeric.h
+++ b/src/tint/sem/abstract_numeric.h
@@ -37,9 +37,6 @@
/// @returns 0, as the type is abstract.
uint32_t Align() const override;
-
- /// @returns true.
- bool IsConstructible() const override;
};
} // namespace tint::sem
diff --git a/src/tint/sem/array.cc b/src/tint/sem/array.cc
index 74ef382..d61d430 100644
--- a/src/tint/sem/array.cc
+++ b/src/tint/sem/array.cc
@@ -26,6 +26,31 @@
namespace tint::sem {
+namespace {
+
+TypeFlags FlagsFrom(const Type* element, ArrayCount count) {
+ TypeFlags flags;
+ // Only constant-expression sized arrays are constructible
+ if (std::holds_alternative<ConstantArrayCount>(count)) {
+ if (element->IsConstructible()) {
+ flags.Add(TypeFlag::kConstructable);
+ }
+ if (element->HasCreationFixedFootprint()) {
+ flags.Add(TypeFlag::kCreationFixedFootprint);
+ }
+ }
+ if (std::holds_alternative<ConstantArrayCount>(count) ||
+ std::holds_alternative<NamedOverrideArrayCount>(count) ||
+ std::holds_alternative<UnnamedOverrideArrayCount>(count)) {
+ if (element->HasFixedFootprint()) {
+ flags.Add(TypeFlag::kFixedFootprint);
+ }
+ }
+ return flags;
+}
+
+} // namespace
+
const char* const Array::kErrExpectedConstantCount =
"array size is an override-expression, when expected a constant-expression.\n"
"Was the SubstituteOverride transform run?";
@@ -36,15 +61,13 @@
uint32_t size,
uint32_t stride,
uint32_t implicit_stride)
- : element_(element),
+ : Base(FlagsFrom(element, count)),
+ element_(element),
count_(count),
align_(align),
size_(size),
stride_(stride),
- implicit_stride_(implicit_stride),
- // Only constant-expression sized arrays are constructible
- constructible_(std::holds_alternative<ConstantArrayCount>(count) &&
- element->IsConstructible()) {
+ implicit_stride_(implicit_stride) {
TINT_ASSERT(Semantic, element_);
}
@@ -62,10 +85,6 @@
return false;
}
-bool Array::IsConstructible() const {
- return constructible_;
-}
-
std::string Array::FriendlyName(const SymbolTable& symbols) const {
std::ostringstream out;
if (!IsStrideImplicit()) {
@@ -74,8 +93,10 @@
out << "array<" << element_->FriendlyName(symbols);
if (auto* const_count = std::get_if<ConstantArrayCount>(&count_)) {
out << ", " << const_count->value;
- } else if (auto* override_count = std::get_if<OverrideArrayCount>(&count_)) {
- out << ", " << symbols.NameFor(override_count->variable->Declaration()->symbol);
+ } else if (auto* named_override_count = std::get_if<NamedOverrideArrayCount>(&count_)) {
+ out << ", " << symbols.NameFor(named_override_count->variable->Declaration()->symbol);
+ } else if (std::holds_alternative<UnnamedOverrideArrayCount>(count_)) {
+ out << ", [unnamed override-expression]";
}
out << ">";
return out.str();
diff --git a/src/tint/sem/array.h b/src/tint/sem/array.h
index ca66a16..88e6373 100644
--- a/src/tint/sem/array.h
+++ b/src/tint/sem/array.h
@@ -26,6 +26,7 @@
// Forward declarations
namespace tint::sem {
+class Expression;
class GlobalVariable;
} // namespace tint::sem
@@ -48,11 +49,33 @@
/// override N : i32;
/// type arr = array<i32, N>
/// ```
-struct OverrideArrayCount {
+struct NamedOverrideArrayCount {
/// The `override` variable.
const GlobalVariable* variable;
};
+/// The variant of an ArrayCount when the count is an unnamed override variable.
+/// Example:
+/// ```
+/// override N : i32;
+/// type arr = array<i32, N*2>
+/// ```
+struct UnnamedOverrideArrayCount {
+ /// The unnamed override expression.
+ /// Note: Each AST expression gets a unique semantic expression node, so two equivalent AST
+ /// expressions will not result in the same `expr` pointer. This property is important to ensure
+ /// that two array declarations with equivalent AST expressions do not compare equal.
+ /// For example, consider:
+ /// ```
+ /// override size : u32;
+ /// var<workgroup> a : array<f32, size * 2>;
+ /// var<workgroup> b : array<f32, size * 2>;
+ /// ```
+ // The array count for `a` and `b` have equivalent AST expressions, but the types for `a` and
+ // `b` must not compare equal.
+ const Expression* expr;
+};
+
/// The variant of an ArrayCount when the array is is runtime-sized.
/// Example:
/// ```
@@ -60,8 +83,12 @@
/// ```
struct RuntimeArrayCount {};
-/// An array count is either a constant-expression value, an override identifier, or runtime-sized.
-using ArrayCount = std::variant<ConstantArrayCount, OverrideArrayCount, RuntimeArrayCount>;
+/// An array count is either a constant-expression value, a named override identifier, an unnamed
+/// override identifier, or runtime-sized.
+using ArrayCount = std::variant<ConstantArrayCount,
+ NamedOverrideArrayCount,
+ UnnamedOverrideArrayCount,
+ RuntimeArrayCount>;
/// Equality operator
/// @param a the LHS ConstantArrayCount
@@ -75,11 +102,19 @@
/// @param a the LHS OverrideArrayCount
/// @param b the RHS OverrideArrayCount
/// @returns true if @p a is equal to @p b
-inline bool operator==(const OverrideArrayCount& a, const OverrideArrayCount& b) {
+inline bool operator==(const NamedOverrideArrayCount& a, const NamedOverrideArrayCount& b) {
return a.variable == b.variable;
}
/// Equality operator
+/// @param a the LHS OverrideArrayCount
+/// @param b the RHS OverrideArrayCount
+/// @returns true if @p a is equal to @p b
+inline bool operator==(const UnnamedOverrideArrayCount& a, const UnnamedOverrideArrayCount& b) {
+ return a.expr == b.expr;
+}
+
+/// Equality operator
/// @returns true
inline bool operator==(const RuntimeArrayCount&, const RuntimeArrayCount&) {
return true;
@@ -90,9 +125,9 @@
/// @param b the RHS count
/// @returns true if @p a is equal to @p b
template <typename T,
- typename = std::enable_if_t<std::is_same_v<T, ConstantArrayCount> ||
- std::is_same_v<T, OverrideArrayCount> ||
- std::is_same_v<T, RuntimeArrayCount>>>
+ typename = std::enable_if_t<
+ std::is_same_v<T, ConstantArrayCount> || std::is_same_v<T, NamedOverrideArrayCount> ||
+ std::is_same_v<T, UnnamedOverrideArrayCount> || std::is_same_v<T, RuntimeArrayCount>>>
inline bool operator==(const ArrayCount& a, const T& b) {
TINT_BEGIN_DISABLE_WARNING(UNREACHABLE_CODE);
return std::visit(
@@ -178,16 +213,22 @@
/// @returns true if this array is sized using an const-expression
bool IsConstantSized() const { return std::holds_alternative<ConstantArrayCount>(count_); }
- /// @returns true if this array is sized using an override variable
- bool IsOverrideSized() const { return std::holds_alternative<OverrideArrayCount>(count_); }
+ /// @returns true if this array is sized using a named override variable
+ bool IsNamedOverrideSized() const {
+ return std::holds_alternative<NamedOverrideArrayCount>(count_);
+ }
+
+ /// @returns true if this array is sized using an unnamed override variable
+ bool IsUnnamedOverrideSized() const {
+ return std::holds_alternative<UnnamedOverrideArrayCount>(count_);
+ }
+
+ /// @returns true if this array is sized using a named or unnamed override variable
+ bool IsOverrideSized() const { return IsNamedOverrideSized() || IsUnnamedOverrideSized(); }
/// @returns true if this array is runtime sized
bool IsRuntimeSized() const { return std::holds_alternative<RuntimeArrayCount>(count_); }
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @param symbols the program's symbol table
/// @returns the name for this type that closely resembles how it would be
/// declared in WGSL.
@@ -200,7 +241,6 @@
const uint32_t size_;
const uint32_t stride_;
const uint32_t implicit_stride_;
- const bool constructible_;
};
} // namespace tint::sem
@@ -218,17 +258,28 @@
}
};
-/// Custom std::hash specialization for tint::sem::OverrideArrayCount.
+/// Custom std::hash specialization for tint::sem::NamedOverrideArrayCount.
template <>
-class hash<tint::sem::OverrideArrayCount> {
+class hash<tint::sem::NamedOverrideArrayCount> {
public:
/// @param count the count to hash
/// @return the hash value
- inline std::size_t operator()(const tint::sem::OverrideArrayCount& count) const {
+ inline std::size_t operator()(const tint::sem::NamedOverrideArrayCount& count) const {
return std::hash<decltype(count.variable)>()(count.variable);
}
};
+/// Custom std::hash specialization for tint::sem::UnnamedOverrideArrayCount.
+template <>
+class hash<tint::sem::UnnamedOverrideArrayCount> {
+ public:
+ /// @param count the count to hash
+ /// @return the hash value
+ inline std::size_t operator()(const tint::sem::UnnamedOverrideArrayCount& count) const {
+ return std::hash<decltype(count.expr)>()(count.expr);
+ }
+};
+
/// Custom std::hash specialization for tint::sem::RuntimeArrayCount.
template <>
class hash<tint::sem::RuntimeArrayCount> {
diff --git a/src/tint/sem/array_test.cc b/src/tint/sem/array_test.cc
index d6ce9cd..a51b492 100644
--- a/src/tint/sem/array_test.cc
+++ b/src/tint/sem/array_test.cc
@@ -125,5 +125,47 @@
EXPECT_EQ(arr->FriendlyName(Symbols()), "@stride(8) array<i32, 5>");
}
+TEST_F(ArrayTest, IsConstructable) {
+ auto* fixed_sized = create<Array>(create<U32>(), ConstantArrayCount{2u}, 4u, 8u, 32u, 16u);
+ auto* named_override_sized =
+ create<Array>(create<U32>(), NamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* unnamed_override_sized =
+ create<Array>(create<U32>(), UnnamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* runtime_sized = create<Array>(create<U32>(), RuntimeArrayCount{}, 4u, 8u, 32u, 16u);
+
+ EXPECT_TRUE(fixed_sized->IsConstructible());
+ EXPECT_FALSE(named_override_sized->IsConstructible());
+ EXPECT_FALSE(unnamed_override_sized->IsConstructible());
+ EXPECT_FALSE(runtime_sized->IsConstructible());
+}
+
+TEST_F(ArrayTest, HasCreationFixedFootprint) {
+ auto* fixed_sized = create<Array>(create<U32>(), ConstantArrayCount{2u}, 4u, 8u, 32u, 16u);
+ auto* named_override_sized =
+ create<Array>(create<U32>(), NamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* unnamed_override_sized =
+ create<Array>(create<U32>(), UnnamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* runtime_sized = create<Array>(create<U32>(), RuntimeArrayCount{}, 4u, 8u, 32u, 16u);
+
+ EXPECT_TRUE(fixed_sized->HasCreationFixedFootprint());
+ EXPECT_FALSE(named_override_sized->HasCreationFixedFootprint());
+ EXPECT_FALSE(unnamed_override_sized->HasCreationFixedFootprint());
+ EXPECT_FALSE(runtime_sized->HasCreationFixedFootprint());
+}
+
+TEST_F(ArrayTest, HasFixedFootprint) {
+ auto* fixed_sized = create<Array>(create<U32>(), ConstantArrayCount{2u}, 4u, 8u, 32u, 16u);
+ auto* named_override_sized =
+ create<Array>(create<U32>(), NamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* unnamed_override_sized =
+ create<Array>(create<U32>(), UnnamedOverrideArrayCount{}, 4u, 8u, 32u, 16u);
+ auto* runtime_sized = create<Array>(create<U32>(), RuntimeArrayCount{}, 4u, 8u, 32u, 16u);
+
+ EXPECT_TRUE(fixed_sized->HasFixedFootprint());
+ EXPECT_TRUE(named_override_sized->HasFixedFootprint());
+ EXPECT_TRUE(unnamed_override_sized->HasFixedFootprint());
+ EXPECT_FALSE(runtime_sized->HasFixedFootprint());
+}
+
} // namespace
} // namespace tint::sem
diff --git a/src/tint/sem/atomic.cc b/src/tint/sem/atomic.cc
index 52951f3..f8cf068 100644
--- a/src/tint/sem/atomic.cc
+++ b/src/tint/sem/atomic.cc
@@ -22,7 +22,12 @@
namespace tint::sem {
-Atomic::Atomic(const sem::Type* subtype) : subtype_(subtype) {
+Atomic::Atomic(const sem::Type* subtype)
+ : Base(TypeFlags{
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }),
+ subtype_(subtype) {
TINT_ASSERT(AST, !subtype->Is<Reference>());
}
@@ -51,10 +56,6 @@
return subtype_->Align();
}
-bool Atomic::IsConstructible() const {
- return false;
-}
-
Atomic::Atomic(Atomic&&) = default;
Atomic::~Atomic() = default;
diff --git a/src/tint/sem/atomic.h b/src/tint/sem/atomic.h
index 7f6c814..5b405a1 100644
--- a/src/tint/sem/atomic.h
+++ b/src/tint/sem/atomic.h
@@ -53,10 +53,6 @@
/// @returns the alignment in bytes of the type.
uint32_t Align() const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
private:
sem::Type const* const subtype_;
};
diff --git a/src/tint/sem/bool.cc b/src/tint/sem/bool.cc
index 938a935..fea6679 100644
--- a/src/tint/sem/bool.cc
+++ b/src/tint/sem/bool.cc
@@ -20,7 +20,12 @@
namespace tint::sem {
-Bool::Bool() = default;
+Bool::Bool()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
Bool::Bool(Bool&&) = default;
@@ -38,10 +43,6 @@
return "bool";
}
-bool Bool::IsConstructible() const {
- return true;
-}
-
uint32_t Bool::Size() const {
return 4;
}
diff --git a/src/tint/sem/bool.h b/src/tint/sem/bool.h
index aae48d8..133ab72 100644
--- a/src/tint/sem/bool.h
+++ b/src/tint/sem/bool.h
@@ -48,10 +48,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type.
/// @note: booleans are not host-sharable, but still may exist in workgroup
/// storage.
diff --git a/src/tint/sem/f16.cc b/src/tint/sem/f16.cc
index 7da65fa..158b826 100644
--- a/src/tint/sem/f16.cc
+++ b/src/tint/sem/f16.cc
@@ -21,7 +21,12 @@
namespace tint {
namespace sem {
-F16::F16() = default;
+F16::F16()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
F16::F16(F16&&) = default;
@@ -39,10 +44,6 @@
return "f16";
}
-bool F16::IsConstructible() const {
- return true;
-}
-
uint32_t F16::Size() const {
return 2;
}
diff --git a/src/tint/sem/f16.h b/src/tint/sem/f16.h
index 87543ed..b126614 100644
--- a/src/tint/sem/f16.h
+++ b/src/tint/sem/f16.h
@@ -42,10 +42,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type.
uint32_t Size() const override;
diff --git a/src/tint/sem/f32.cc b/src/tint/sem/f32.cc
index 83fffcc..73c98e6 100644
--- a/src/tint/sem/f32.cc
+++ b/src/tint/sem/f32.cc
@@ -20,7 +20,12 @@
namespace tint::sem {
-F32::F32() = default;
+F32::F32()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
F32::F32(F32&&) = default;
@@ -38,10 +43,6 @@
return "f32";
}
-bool F32::IsConstructible() const {
- return true;
-}
-
uint32_t F32::Size() const {
return 4;
}
diff --git a/src/tint/sem/f32.h b/src/tint/sem/f32.h
index c7d7ad6..0559dfd 100644
--- a/src/tint/sem/f32.h
+++ b/src/tint/sem/f32.h
@@ -42,10 +42,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type.
uint32_t Size() const override;
diff --git a/src/tint/sem/i32.cc b/src/tint/sem/i32.cc
index d5a1e26..6b23155 100644
--- a/src/tint/sem/i32.cc
+++ b/src/tint/sem/i32.cc
@@ -20,7 +20,12 @@
namespace tint::sem {
-I32::I32() = default;
+I32::I32()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
I32::I32(I32&&) = default;
@@ -38,10 +43,6 @@
return "i32";
}
-bool I32::IsConstructible() const {
- return true;
-}
-
uint32_t I32::Size() const {
return 4;
}
diff --git a/src/tint/sem/i32.h b/src/tint/sem/i32.h
index 3b564db..ff2df4d 100644
--- a/src/tint/sem/i32.h
+++ b/src/tint/sem/i32.h
@@ -42,10 +42,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type.
uint32_t Size() const override;
diff --git a/src/tint/sem/loop_statement.cc b/src/tint/sem/loop_statement.cc
index eee735c..1d4db8a 100644
--- a/src/tint/sem/loop_statement.cc
+++ b/src/tint/sem/loop_statement.cc
@@ -40,4 +40,8 @@
}
LoopContinuingBlockStatement::~LoopContinuingBlockStatement() = default;
+const ast::BlockStatement* LoopContinuingBlockStatement::Declaration() const {
+ return static_cast<const ast::BlockStatement*>(Base::Declaration());
+}
+
} // namespace tint::sem
diff --git a/src/tint/sem/loop_statement.h b/src/tint/sem/loop_statement.h
index 502fa7c..6dc7037 100644
--- a/src/tint/sem/loop_statement.h
+++ b/src/tint/sem/loop_statement.h
@@ -53,6 +53,9 @@
/// Destructor
~LoopContinuingBlockStatement() override;
+
+ /// @returns the AST node
+ const ast::BlockStatement* Declaration() const;
};
} // namespace tint::sem
diff --git a/src/tint/sem/matrix.cc b/src/tint/sem/matrix.cc
index 7f0383b..1d0453d 100644
--- a/src/tint/sem/matrix.cc
+++ b/src/tint/sem/matrix.cc
@@ -23,7 +23,12 @@
namespace tint::sem {
Matrix::Matrix(const Vector* column_type, uint32_t columns)
- : subtype_(column_type->type()),
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }),
+ subtype_(column_type->type()),
column_type_(column_type),
rows_(column_type->Width()),
columns_(columns) {
@@ -54,10 +59,6 @@
return out.str();
}
-bool Matrix::IsConstructible() const {
- return true;
-}
-
uint32_t Matrix::Size() const {
return column_type_->Align() * columns();
}
diff --git a/src/tint/sem/matrix.h b/src/tint/sem/matrix.h
index 0321c4b..5d32269 100644
--- a/src/tint/sem/matrix.h
+++ b/src/tint/sem/matrix.h
@@ -59,10 +59,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type. This may include tail padding.
uint32_t Size() const override;
diff --git a/src/tint/sem/member_accessor_expression.h b/src/tint/sem/member_accessor_expression.h
index b8144f1..2541f33 100644
--- a/src/tint/sem/member_accessor_expression.h
+++ b/src/tint/sem/member_accessor_expression.h
@@ -33,6 +33,13 @@
/// ast::MemberAccessorExpression node.
class MemberAccessorExpression : public Castable<MemberAccessorExpression, Expression> {
public:
+ /// Destructor
+ ~MemberAccessorExpression() override;
+
+ /// @returns the object that holds the member being accessed
+ const Expression* Object() const { return object_; }
+
+ protected:
/// Constructor
/// @param declaration the AST node
/// @param type the resolved type of the expression
@@ -51,12 +58,6 @@
bool has_side_effects,
const Variable* source_var = nullptr);
- /// Destructor
- ~MemberAccessorExpression() override;
-
- /// @returns the object that holds the member being accessed
- const Expression* Object() const { return object_; }
-
private:
Expression const* const object_;
};
diff --git a/src/tint/sem/pointer.cc b/src/tint/sem/pointer.cc
index 3918233..b35185a 100644
--- a/src/tint/sem/pointer.cc
+++ b/src/tint/sem/pointer.cc
@@ -23,7 +23,7 @@
namespace tint::sem {
Pointer::Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
- : subtype_(subtype), address_space_(address_space), access_(access) {
+ : Base(TypeFlags{}), subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
}
diff --git a/src/tint/sem/reference.cc b/src/tint/sem/reference.cc
index a3a9f24..8d3bb6d 100644
--- a/src/tint/sem/reference.cc
+++ b/src/tint/sem/reference.cc
@@ -22,7 +22,7 @@
namespace tint::sem {
Reference::Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
- : subtype_(subtype), address_space_(address_space), access_(access) {
+ : Base(TypeFlags{}), subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
}
diff --git a/src/tint/sem/sampler.cc b/src/tint/sem/sampler.cc
index 20993cc..598c696 100644
--- a/src/tint/sem/sampler.cc
+++ b/src/tint/sem/sampler.cc
@@ -21,7 +21,7 @@
namespace tint::sem {
-Sampler::Sampler(ast::SamplerKind kind) : kind_(kind) {}
+Sampler::Sampler(ast::SamplerKind kind) : Base(TypeFlags{}), kind_(kind) {}
Sampler::Sampler(Sampler&&) = default;
diff --git a/src/tint/sem/struct.cc b/src/tint/sem/struct.cc
index 7d457e8..d80a04a 100644
--- a/src/tint/sem/struct.cc
+++ b/src/tint/sem/struct.cc
@@ -27,6 +27,29 @@
TINT_INSTANTIATE_TYPEINFO(tint::sem::StructMember);
namespace tint::sem {
+namespace {
+
+TypeFlags FlagsFrom(const StructMemberList& members) {
+ TypeFlags flags{
+ TypeFlag::kConstructable,
+ TypeFlag::kCreationFixedFootprint,
+ TypeFlag::kFixedFootprint,
+ };
+ for (auto* member : members) {
+ if (!member->Type()->IsConstructible()) {
+ flags.Remove(TypeFlag::kConstructable);
+ }
+ if (!member->Type()->HasFixedFootprint()) {
+ flags.Remove(TypeFlag::kFixedFootprint);
+ }
+ if (!member->Type()->HasCreationFixedFootprint()) {
+ flags.Remove(TypeFlag::kCreationFixedFootprint);
+ }
+ }
+ return flags;
+}
+
+} // namespace
Struct::Struct(const ast::Struct* declaration,
Symbol name,
@@ -34,20 +57,13 @@
uint32_t align,
uint32_t size,
uint32_t size_no_padding)
- : declaration_(declaration),
+ : Base(FlagsFrom(members)),
+ declaration_(declaration),
name_(name),
members_(std::move(members)),
align_(align),
size_(size),
- size_no_padding_(size_no_padding) {
- constructible_ = true;
- for (auto* member : members_) {
- if (!member->Type()->IsConstructible()) {
- constructible_ = false;
- break;
- }
- }
-}
+ size_no_padding_(size_no_padding) {}
Struct::~Struct() = default;
@@ -151,10 +167,6 @@
return ss.str();
}
-bool Struct::IsConstructible() const {
- return constructible_;
-}
-
StructMember::StructMember(const ast::StructMember* declaration,
Symbol name,
const sem::Type* type,
diff --git a/src/tint/sem/struct.h b/src/tint/sem/struct.h
index 80ab53b..f35d5f4 100644
--- a/src/tint/sem/struct.h
+++ b/src/tint/sem/struct.h
@@ -152,13 +152,7 @@
/// including size and alignment information.
std::string Layout(const tint::SymbolTable& symbols) const;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
private:
- uint64_t LargestMemberBaseAlignment(MemoryLayout mem_layout) const;
-
ast::Struct const* const declaration_;
const Symbol name_;
const StructMemberList members_;
@@ -167,7 +161,6 @@
const uint32_t size_no_padding_;
std::unordered_set<ast::AddressSpace> address_space_usage_;
std::unordered_set<PipelineStageUsage> pipeline_stage_uses_;
- bool constructible_;
};
/// StructMember holds the semantic information for structure members.
diff --git a/src/tint/sem/struct_test.cc b/src/tint/sem/struct_test.cc
index 9746589..a8b36ca 100644
--- a/src/tint/sem/struct_test.cc
+++ b/src/tint/sem/struct_test.cc
@@ -124,5 +124,104 @@
EXPECT_FALSE(sem->Members()[1]->Location().has_value());
}
+TEST_F(StructTest, IsConstructable) {
+ auto* inner = //
+ Structure("Inner", utils::Vector{
+ Member("a", ty.i32()),
+ Member("b", ty.u32()),
+ Member("c", ty.f32()),
+ Member("d", ty.vec3<f32>()),
+ Member("e", ty.mat4x2<f32>()),
+ });
+
+ auto* outer = Structure("Outer", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ Member("a", ty.i32()),
+ });
+
+ auto* outer_runtime_sized_array =
+ Structure("OuterRuntimeSizedArray", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ Member("a", ty.i32()),
+ Member("runtime_sized_array", ty.array<i32>()),
+ });
+ auto p = Build();
+ ASSERT_TRUE(p.IsValid()) << p.Diagnostics().str();
+
+ auto* sem_inner = p.Sem().Get(inner);
+ auto* sem_outer = p.Sem().Get(outer);
+ auto* sem_outer_runtime_sized_array = p.Sem().Get(outer_runtime_sized_array);
+
+ EXPECT_TRUE(sem_inner->IsConstructible());
+ EXPECT_TRUE(sem_outer->IsConstructible());
+ EXPECT_FALSE(sem_outer_runtime_sized_array->IsConstructible());
+}
+
+TEST_F(StructTest, HasCreationFixedFootprint) {
+ auto* inner = //
+ Structure("Inner", utils::Vector{
+ Member("a", ty.i32()),
+ Member("b", ty.u32()),
+ Member("c", ty.f32()),
+ Member("d", ty.vec3<f32>()),
+ Member("e", ty.mat4x2<f32>()),
+ Member("f", ty.array<f32, 32>()),
+ });
+
+ auto* outer = Structure("Outer", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ });
+
+ auto* outer_with_runtime_sized_array =
+ Structure("OuterRuntimeSizedArray", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ Member("runtime_sized_array", ty.array<i32>()),
+ });
+
+ auto p = Build();
+ ASSERT_TRUE(p.IsValid()) << p.Diagnostics().str();
+
+ auto* sem_inner = p.Sem().Get(inner);
+ auto* sem_outer = p.Sem().Get(outer);
+ auto* sem_outer_with_runtime_sized_array = p.Sem().Get(outer_with_runtime_sized_array);
+
+ EXPECT_TRUE(sem_inner->HasCreationFixedFootprint());
+ EXPECT_TRUE(sem_outer->HasCreationFixedFootprint());
+ EXPECT_FALSE(sem_outer_with_runtime_sized_array->HasCreationFixedFootprint());
+}
+
+TEST_F(StructTest, HasFixedFootprint) {
+ auto* inner = //
+ Structure("Inner", utils::Vector{
+ Member("a", ty.i32()),
+ Member("b", ty.u32()),
+ Member("c", ty.f32()),
+ Member("d", ty.vec3<f32>()),
+ Member("e", ty.mat4x2<f32>()),
+ Member("f", ty.array<f32, 32>()),
+ });
+
+ auto* outer = Structure("Outer", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ });
+
+ auto* outer_with_runtime_sized_array =
+ Structure("OuterRuntimeSizedArray", utils::Vector{
+ Member("inner", ty.type_name("Inner")),
+ Member("runtime_sized_array", ty.array<i32>()),
+ });
+
+ auto p = Build();
+ ASSERT_TRUE(p.IsValid()) << p.Diagnostics().str();
+
+ auto* sem_inner = p.Sem().Get(inner);
+ auto* sem_outer = p.Sem().Get(outer);
+ auto* sem_outer_with_runtime_sized_array = p.Sem().Get(outer_with_runtime_sized_array);
+
+ EXPECT_TRUE(sem_inner->HasFixedFootprint());
+ EXPECT_TRUE(sem_outer->HasFixedFootprint());
+ EXPECT_FALSE(sem_outer_with_runtime_sized_array->HasFixedFootprint());
+}
+
} // namespace
} // namespace tint::sem
diff --git a/src/tint/sem/texture.cc b/src/tint/sem/texture.cc
index 02fc918..5e5b1e2 100644
--- a/src/tint/sem/texture.cc
+++ b/src/tint/sem/texture.cc
@@ -18,7 +18,7 @@
namespace tint::sem {
-Texture::Texture(ast::TextureDimension dim) : dim_(dim) {}
+Texture::Texture(ast::TextureDimension dim) : Base(TypeFlags{}), dim_(dim) {}
Texture::Texture(Texture&&) = default;
diff --git a/src/tint/sem/type.cc b/src/tint/sem/type.cc
index fed75e6..0596a37 100644
--- a/src/tint/sem/type.cc
+++ b/src/tint/sem/type.cc
@@ -34,7 +34,11 @@
namespace tint::sem {
-Type::Type() = default;
+Type::Type(TypeFlags flags) : flags_(flags) {
+ if (IsConstructible()) {
+ TINT_ASSERT(Semantic, HasCreationFixedFootprint());
+ }
+}
Type::Type(Type&&) = default;
@@ -64,10 +68,6 @@
return 0;
}
-bool Type::IsConstructible() const {
- return false;
-}
-
bool Type::is_scalar() const {
return IsAnyOf<F16, F32, U32, I32, AbstractNumeric, Bool>();
}
diff --git a/src/tint/sem/type.h b/src/tint/sem/type.h
index ffa3d01..38f5ba8 100644
--- a/src/tint/sem/type.h
+++ b/src/tint/sem/type.h
@@ -19,6 +19,7 @@
#include <string>
#include "src/tint/sem/node.h"
+#include "src/tint/utils/enum_set.h"
#include "src/tint/utils/vector.h"
// Forward declarations
@@ -29,12 +30,27 @@
namespace tint::sem {
-/// Supported memory layouts for calculating sizes
-enum class MemoryLayout { kUniformBuffer, kStorageBuffer };
+enum TypeFlag {
+ /// Type is constructable.
+ /// @see https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
+ kConstructable,
+ /// Type has a creation-fixed footprint.
+ /// @see https://www.w3.org/TR/WGSL/#fixed-footprint-types
+ kCreationFixedFootprint,
+ /// Type has a fixed footprint.
+ /// @see https://www.w3.org/TR/WGSL/#fixed-footprint-types
+ kFixedFootprint,
+};
+
+/// An alias to utils::EnumSet<TypeFlag>
+using TypeFlags = utils::EnumSet<TypeFlag>;
/// Base class for a type in the system
class Type : public Castable<Type, Node> {
public:
+ /// Alias to TypeFlag
+ using Flag = TypeFlag;
+
/// Move constructor
Type(Type&&);
~Type() override;
@@ -66,9 +82,22 @@
/// @note opaque types will return a size of 0.
virtual uint32_t Align() const;
- /// @returns true if constructible as per
+ /// @returns the flags on the type
+ TypeFlags Flags() { return flags_; }
+
+ /// @returns true if type is constructable
/// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- virtual bool IsConstructible() const;
+ inline bool IsConstructible() const { return flags_.Contains(Flag::kConstructable); }
+
+ /// @returns true has a creation-fixed footprint.
+ /// @see https://www.w3.org/TR/WGSL/#fixed-footprint-types
+ inline bool HasCreationFixedFootprint() const {
+ return flags_.Contains(Flag::kCreationFixedFootprint);
+ }
+
+ /// @returns true has a fixed footprint.
+ /// @see https://www.w3.org/TR/WGSL/#fixed-footprint-types
+ inline bool HasFixedFootprint() const { return flags_.Contains(Flag::kFixedFootprint); }
/// @returns true if this type is a scalar
bool is_scalar() const;
@@ -166,7 +195,12 @@
static const sem::Type* Common(utils::VectorRef<const Type*> types);
protected:
- Type();
+ /// Constructor
+ /// @param flags the flags of this type
+ explicit Type(TypeFlags flags);
+
+ /// The flags of this type.
+ const TypeFlags flags_;
};
} // namespace tint::sem
diff --git a/src/tint/sem/u32.cc b/src/tint/sem/u32.cc
index dc3bd1d..a93ff4c 100644
--- a/src/tint/sem/u32.cc
+++ b/src/tint/sem/u32.cc
@@ -20,7 +20,12 @@
namespace tint::sem {
-U32::U32() = default;
+U32::U32()
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }) {}
U32::~U32() = default;
@@ -38,10 +43,6 @@
return "u32";
}
-bool U32::IsConstructible() const {
- return true;
-}
-
uint32_t U32::Size() const {
return 4;
}
diff --git a/src/tint/sem/u32.h b/src/tint/sem/u32.h
index 5ae01fb..b0143d9 100644
--- a/src/tint/sem/u32.h
+++ b/src/tint/sem/u32.h
@@ -42,10 +42,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the size in bytes of the type.
uint32_t Size() const override;
diff --git a/src/tint/sem/vector.cc b/src/tint/sem/vector.cc
index 2df7cf0..32b7a34 100644
--- a/src/tint/sem/vector.cc
+++ b/src/tint/sem/vector.cc
@@ -21,7 +21,14 @@
namespace tint::sem {
-Vector::Vector(Type const* subtype, uint32_t width) : subtype_(subtype), width_(width) {
+Vector::Vector(Type const* subtype, uint32_t width)
+ : Base(TypeFlags{
+ Flag::kConstructable,
+ Flag::kCreationFixedFootprint,
+ Flag::kFixedFootprint,
+ }),
+ subtype_(subtype),
+ width_(width) {
TINT_ASSERT(Semantic, width_ > 1);
TINT_ASSERT(Semantic, width_ < 5);
}
@@ -47,10 +54,6 @@
return out.str();
}
-bool Vector::IsConstructible() const {
- return true;
-}
-
uint32_t Vector::Size() const {
return subtype_->Size() * width_;
}
diff --git a/src/tint/sem/vector.h b/src/tint/sem/vector.h
index 8d9e7a3..163c70d 100644
--- a/src/tint/sem/vector.h
+++ b/src/tint/sem/vector.h
@@ -47,10 +47,6 @@
/// declared in WGSL.
std::string FriendlyName(const SymbolTable& symbols) const override;
- /// @returns true if constructible as per
- /// https://gpuweb.github.io/gpuweb/wgsl/#constructible-types
- bool IsConstructible() const override;
-
/// @returns the number of elements in the vector
uint32_t Width() const { return width_; }
diff --git a/src/tint/sem/void.cc b/src/tint/sem/void.cc
index b20b96e..8e5e3fb 100644
--- a/src/tint/sem/void.cc
+++ b/src/tint/sem/void.cc
@@ -20,7 +20,7 @@
namespace tint::sem {
-Void::Void() = default;
+Void::Void() : Base(TypeFlags{}) {}
Void::Void(Void&&) = default;
diff --git a/src/tint/tint_gdb.py b/src/tint/tint_gdb.py
new file mode 100644
index 0000000..2dce446
--- /dev/null
+++ b/src/tint/tint_gdb.py
@@ -0,0 +1,249 @@
+# Copyright 2022 The Tint Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Pretty printers for the Tint project.
+# Add a line to your ~/.gdbinit to source this file, e.g.:
+#
+# source /path/to/dawn/src/tint/tint_gdb.py
+
+import gdb
+import gdb.printing
+from itertools import chain
+
+# When debugging this module, set _DEBUGGING = True so that re-sourcing this file in gdb replaces
+# the existing printers.
+_DEBUGGING = True
+
+# Enable to display other data members along with child elements of compound data types (arrays, etc.).
+# This is useful in debuggers like VS Code that doesn't display the `to_string()` result in the watch window.
+# OTOH, it's less useful when using gdb/lldb's print command.
+_DISPLAY_MEMBERS_AS_CHILDREN = False
+
+
+# Tips for debugging using VS Code:
+# - Set a breakpoint where you can view the types you want to debug/write pretty printers for.
+# - Debug Console: source /path/to/dawn/src/tint/tint_gdb.py
+# - To execute Python code, in the Debug Console:
+# -exec python foo = gdb.parse_and_eval('map.set_')
+# -exec python v = (foo['slots_']['impl_']['slice']['data'] + 8).dereference()['value']
+#
+# - Useful docs:
+# Python API: https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html#Python-API
+# Especially:
+# Types: https://sourceware.org/gdb/onlinedocs/gdb/Types-In-Python.html#Types-In-Python
+# Values: https://sourceware.org/gdb/onlinedocs/gdb/Values-From-Inferior.html#Values-From-Inferior
+
+
+pp_set = gdb.printing.RegexpCollectionPrettyPrinter("tint")
+
+
+class Printer(object):
+ '''Base class for Printers'''
+
+ def __init__(self, val):
+ self.val = val
+
+ def template_type(self, index):
+ '''Returns template type at index'''
+ return self.val.type.template_argument(index)
+
+
+class UtilsSlicePrinter(Printer):
+ '''Printer for tint::utils::Slice<T>'''
+
+ def __init__(self, val):
+ super(UtilsSlicePrinter, self).__init__(val)
+ self.len = self.val['len']
+ self.cap = self.val['cap']
+ self.data = self.val['data']
+ self.elem_type = self.data.type.target().unqualified()
+
+ def length(self):
+ return self.len
+
+ def value_at(self, index):
+ '''Returns array value at index'''
+ return (self.data + index).dereference().cast(self.elem_type)
+
+ def to_string(self):
+ return 'length={} capacity={}'.format(self.len, self.cap)
+
+ def members(self):
+ if _DISPLAY_MEMBERS_AS_CHILDREN:
+ return [
+ ('length', self.len),
+ ('capacity', self.cap),
+ ]
+ else:
+ return []
+
+ def children(self):
+ for m in self.members():
+ yield m
+ for i in range(self.len):
+ yield str(i), self.value_at(i)
+
+ def display_hint(self):
+ return 'array'
+
+
+pp_set.add_printer('UtilsSlicePrinter',
+ '^tint::utils::Slice<.*>$', UtilsSlicePrinter)
+
+
+class UtilsVectorPrinter(Printer):
+ '''Printer for tint::utils::Vector<T, N>'''
+
+ def __init__(self, val):
+ super(UtilsVectorPrinter, self).__init__(val)
+ self.slice = self.val['impl_']['slice']
+ self.using_heap = self.slice['cap'] > self.template_type(1)
+
+ def slice_printer(self):
+ return UtilsSlicePrinter(self.slice)
+
+ def to_string(self):
+ return 'heap={} {}'.format(self.using_heap, self.slice)
+
+ def members(self):
+ if _DISPLAY_MEMBERS_AS_CHILDREN:
+ return [
+ ('heap', self.using_heap),
+ ]
+ else:
+ return []
+
+ def children(self):
+ return chain(self.members(), self.slice_printer().children())
+
+ def display_hint(self):
+ return 'array'
+
+
+pp_set.add_printer(
+ 'UtilsVector', '^tint::utils::Vector<.*>$', UtilsVectorPrinter)
+
+
+class UtilsVectorRefPrinter(Printer):
+ '''Printer for tint::utils::VectorRef<T>'''
+
+ def __init__(self, val):
+ super(UtilsVectorRefPrinter, self).__init__(val)
+ self.slice = self.val['slice_']
+ self.can_move = self.val['can_move_']
+
+ def to_string(self):
+ return 'can_move={} {}'.format(self.can_move, self.slice)
+
+ def members(self):
+ if _DISPLAY_MEMBERS_AS_CHILDREN:
+ return [
+ ('can_move', self.can_move),
+ ]
+ else:
+ return []
+
+ def children(self):
+ return chain(self.members(), UtilsSlicePrinter(self.slice).children())
+
+ def display_hint(self):
+ return 'array'
+
+
+pp_set.add_printer(
+ 'UtilsVector', '^tint::utils::VectorRef<.*>$', UtilsVectorRefPrinter)
+
+
+class UtilsHashsetPrinter(Printer):
+ '''Printer for Hashset<T, N, HASH, EQUAL>'''
+
+ def __init__(self, val):
+ super(UtilsHashsetPrinter, self).__init__(val)
+ self.slice = UtilsVectorPrinter(self.val['slots_']).slice_printer()
+ self.try_read_std_optional_func = self.try_read_std_optional
+
+ def to_string(self):
+ length = 0
+ for slot in range(0, self.slice.length()):
+ v = self.slice.value_at(slot)
+ if v['hash'] != 0:
+ length += 1
+ return 'length={}'.format(length)
+
+ def children(self):
+ for slot in range(0, self.slice.length()):
+ v = self.slice.value_at(slot)
+ if v['hash'] != 0:
+ value = v['value']
+
+ # value is a std::optional, let's try to extract its value for display
+ kvp = self.try_read_std_optional_func(slot, value)
+ if kvp is None:
+ # If we failed, just output the slot and value as is, which will use
+ # the default visualizer for each.
+ kvp = slot, value
+
+ yield str(kvp[0]), kvp[1]
+
+ def display_hint(self):
+ return 'array'
+
+ def try_read_std_optional(self, slot, value):
+ try:
+ # libstdc++
+ v = value['_M_payload']['_M_payload']['_M_value']
+ return slot, v
+ # return str(kvp['key']), kvp['value']
+ except:
+ return None
+
+
+pp_set.add_printer(
+ 'UtilsHashset', '^tint::utils::Hashset<.*>$', UtilsHashsetPrinter)
+
+
+class UtilsHashmapPrinter(Printer):
+ '''Printer for Hashmap<K, V, N, HASH, EQUAL>'''
+
+ def __init__(self, val):
+ super(UtilsHashmapPrinter, self).__init__(val)
+ self.hash_set = UtilsHashsetPrinter(self.val['set_'])
+ # Replace the lookup function so we can extract the key and value out of the std::optionals in the Hashset
+ self.hash_set.try_read_std_optional_func = self.try_read_std_optional
+
+ def to_string(self):
+ return self.hash_set.to_string()
+
+ def children(self):
+ return self.hash_set.children()
+
+ def display_hint(self):
+ return 'array'
+
+ def try_read_std_optional(self, slot, value):
+ try:
+ # libstdc++
+ kvp = value['_M_payload']['_M_payload']['_M_value']
+ return str(kvp['key']), kvp['value']
+ except:
+ pass
+ # Failed, fall back on hash_set
+ return self.hash_set.try_read_std_optional(slot, value)
+
+
+pp_set.add_printer(
+ 'UtilsHashmap', '^tint::utils::Hashmap<.*>$', UtilsHashmapPrinter)
+
+
+gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING)
diff --git a/src/tint/tint_lldb.py b/src/tint/tint_lldb.py
new file mode 100644
index 0000000..85a93ff
--- /dev/null
+++ b/src/tint/tint_lldb.py
@@ -0,0 +1,397 @@
+# Copyright 2022 The Tint Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Pretty printers for the Tint project.
+#
+# If using lldb from command line, add a line to your ~/.lldbinit to import the printers:
+#
+# command script import /path/to/dawn/src/tint/tint_lldb.py
+#
+#
+# If using VS Code on MacOS with the Microsoft C/C++ extension, add the following to
+# your launch.json (make sure you specify an absolute path to tint_lldb.py):
+#
+# "name": "Launch",
+# "type": "cppdbg",
+# "request": "launch",
+# ...
+# "setupCommands": [
+# {
+# "description": "Load tint pretty printers",
+# "ignoreFailures": false,
+# "text": "command script import /path/to/dawn/src/tint/tint_lldb.py,
+# }
+# ]
+#
+# If using VS Code with the CodeLLDB extension (https://github.com/vadimcn/vscode-lldb),
+# add the following to your launch.json:
+#
+# "name": "Launch",
+# "type": "lldb",
+# "request": "launch",
+# ...
+# "initCommands": [
+# "command script import /path/to/dawn/src/tint/tint_lldb.py"
+# ]
+
+# Based on pretty printers for:
+# Rust: https://github.com/vadimcn/vscode-lldb/blob/master/formatters/rust.py
+# Dlang: https://github.com/Pure-D/dlang-debug/blob/master/lldb_dlang.py
+#
+#
+# Tips for debugging using VS Code:
+#
+# - Set a breakpoint where you can view the types you want to debug/write pretty printers for.
+# - Debug Console: -exec command script import /path/to/dawn/src/tint/tint_lldb.py
+# - You can re-run the above command to reload the printers after modifying the python script.
+
+# - Useful docs:
+# Formattesr: https://lldb.llvm.org/use/variable.html
+# Python API: https://lldb.llvm.org/python_api.html
+# Especially:
+# SBType: https://lldb.llvm.org/python_api/lldb.SBType.html
+# SBValue: https://lldb.llvm.org/python_api/lldb.SBValue.html
+
+from __future__ import print_function, division
+import sys
+import logging
+import re
+import lldb
+import types
+
+if sys.version_info[0] == 2:
+ # python2-based LLDB accepts utf8-encoded ascii strings only.
+ def to_lldb_str(s): return s.encode(
+ 'utf8', 'backslashreplace') if isinstance(s, unicode) else s
+ range = xrange
+else:
+ to_lldb_str = str
+
+string_encoding = "escape" # remove | unicode | escape
+
+log = logging.getLogger(__name__)
+
+module = sys.modules[__name__]
+tint_category = None
+
+
+def __lldb_init_module(debugger, dict):
+ global tint_category
+
+ tint_category = debugger.CreateCategory('tint')
+ tint_category.SetEnabled(True)
+
+ attach_synthetic_to_type(
+ UtilsSlicePrinter, r'^tint::utils::Slice<.+>$', True)
+
+ attach_synthetic_to_type(
+ UtilsVectorPrinter, r'^tint::utils::Vector<.+>$', True)
+
+ attach_synthetic_to_type(
+ UtilsVectorRefPrinter, r'^tint::utils::VectorRef<.+>$', True)
+
+ attach_synthetic_to_type(
+ UtilsHashsetPrinter, r'^tint::utils::Hashset<.+>$', True)
+
+ attach_synthetic_to_type(
+ UtilsHashmapPrinter, r'^tint::utils::Hashmap<.+>$', True)
+
+
+def attach_synthetic_to_type(synth_class, type_name, is_regex=False):
+ global module, tint_category
+ synth = lldb.SBTypeSynthetic.CreateWithClassName(
+ __name__ + '.' + synth_class.__name__)
+ synth.SetOptions(lldb.eTypeOptionCascade)
+ ret = tint_category.AddTypeSynthetic(
+ lldb.SBTypeNameSpecifier(type_name, is_regex), synth)
+ log.debug('attaching synthetic %s to "%s", is_regex=%s -> %s',
+ synth_class.__name__, type_name, is_regex, ret)
+
+ def summary_fn(valobj, dict): return get_synth_summary(
+ synth_class, valobj, dict)
+ # LLDB accesses summary fn's by name, so we need to create a unique one.
+ summary_fn.__name__ = '_get_synth_summary_' + synth_class.__name__
+ setattr(module, summary_fn.__name__, summary_fn)
+ attach_summary_to_type(summary_fn, type_name, is_regex)
+
+
+def attach_summary_to_type(summary_fn, type_name, is_regex=False):
+ global module, tint_category
+ summary = lldb.SBTypeSummary.CreateWithFunctionName(
+ __name__ + '.' + summary_fn.__name__)
+ summary.SetOptions(lldb.eTypeOptionCascade)
+ ret = tint_category.AddTypeSummary(
+ lldb.SBTypeNameSpecifier(type_name, is_regex), summary)
+ log.debug('attaching summary %s to "%s", is_regex=%s -> %s',
+ summary_fn.__name__, type_name, is_regex, ret)
+
+
+def get_synth_summary(synth_class, valobj, dict):
+ ''''
+ get_summary' is annoyingly not a part of the standard LLDB synth provider API.
+ This trick allows us to share data extraction logic between synth providers and their sibling summary providers.
+ '''
+ synth = synth_class(valobj.GetNonSyntheticValue(), dict)
+ synth.update()
+ summary = synth.get_summary()
+ return to_lldb_str(summary)
+
+
+def member(valobj, *chain):
+ '''Performs chained GetChildMemberWithName lookups'''
+ for name in chain:
+ valobj = valobj.GetChildMemberWithName(name)
+ return valobj
+
+
+class Printer(object):
+ '''Base class for Printers'''
+
+ def __init__(self, valobj, dict={}):
+ self.valobj = valobj
+ self.initialize()
+
+ def initialize(self):
+ return None
+
+ def update(self):
+ return False
+
+ def num_children(self):
+ return 0
+
+ def has_children(self):
+ return False
+
+ def get_child_at_index(self, index):
+ return None
+
+ def get_child_index(self, name):
+ return None
+
+ def get_summary(self):
+ return None
+
+ def member(self, *chain):
+ '''Performs chained GetChildMemberWithName lookups'''
+ return member(self.valobj, *chain)
+
+ def template_params(self):
+ '''Returns list of template params values (as strings)'''
+ type_name = self.valobj.GetTypeName()
+ params = []
+ level = 0
+ start = 0
+ for i, c in enumerate(type_name):
+ if c == '<':
+ level += 1
+ if level == 1:
+ start = i + 1
+ elif c == '>':
+ level -= 1
+ if level == 0:
+ params.append(type_name[start:i].strip())
+ elif c == ',' and level == 1:
+ params.append(type_name[start:i].strip())
+ start = i + 1
+ return params
+
+ def template_param_at(self, index):
+ '''Returns template param value at index (as string)'''
+ return self.template_params()[index]
+
+
+class UtilsSlicePrinter(Printer):
+ '''Printer for tint::utils::Slice<T>'''
+
+ def initialize(self):
+ self.len = self.valobj.GetChildMemberWithName('len')
+ self.cap = self.valobj.GetChildMemberWithName('cap')
+ self.data = self.valobj.GetChildMemberWithName('data')
+ self.elem_type = self.data.GetType().GetPointeeType()
+ self.elem_size = self.elem_type.GetByteSize()
+
+ def get_summary(self):
+ return 'length={} capacity={}'.format(self.len.GetValueAsUnsigned(), self.cap.GetValueAsUnsigned())
+
+ def num_children(self):
+ # NOTE: VS Code on MacOS hangs if we try to expand something too large, so put an artificial limit
+ # until we can figure out how to know if this is a valid instance.
+ return min(self.len.GetValueAsUnsigned(), 256)
+
+ def has_children(self):
+ return True
+
+ def get_child_at_index(self, index):
+ try:
+ if not 0 <= index < self.num_children():
+ return None
+ # TODO: return self.value_at(index)
+ offset = index * self.elem_size
+ return self.data.CreateChildAtOffset('[%s]' % index, offset, self.elem_type)
+ except Exception as e:
+ log.error('%s', e)
+ raise
+
+ def value_at(self, index):
+ '''Returns array value at index'''
+ offset = index * self.elem_size
+ return self.data.CreateChildAtOffset('[%s]' % index, offset, self.elem_type)
+
+
+class UtilsVectorPrinter(Printer):
+ '''Printer for tint::utils::Vector<T, N>'''
+
+ def initialize(self):
+ self.slice = self.member('impl_', 'slice')
+ self.slice_printer = UtilsSlicePrinter(self.slice)
+ self.fixed_size = int(self.template_param_at(1))
+ self.cap = self.slice_printer.member('cap')
+
+ def get_summary(self):
+ using_heap = self.cap.GetValueAsUnsigned() > self.fixed_size
+ return 'heap={} {}'.format(using_heap, self.slice_printer.get_summary())
+
+ def num_children(self):
+ return self.slice_printer.num_children()
+
+ def has_children(self):
+ return self.slice_printer.has_children()
+
+ def get_child_at_index(self, index):
+ return self.slice_printer.get_child_at_index(index)
+
+ def make_slice_printer(self):
+ return UtilsSlicePrinter(self.slice)
+
+
+class UtilsVectorRefPrinter(Printer):
+ '''Printer for tint::utils::VectorRef<T>'''
+
+ def initialize(self):
+ self.slice = self.member('slice_')
+ self.slice_printer = UtilsSlicePrinter(self.slice)
+ self.can_move = self.member('can_move_')
+
+ def get_summary(self):
+ return 'can_move={} {}'.format(self.can_move.GetValue(), self.slice_printer.get_summary())
+
+ def num_children(self):
+ return self.slice_printer.num_children()
+
+ def has_children(self):
+ return self.slice_printer.has_children()
+
+ def get_child_at_index(self, index):
+ return self.slice_printer.get_child_at_index(index)
+
+
+class UtilsHashsetPrinter(Printer):
+ '''Printer for Hashset<T, N, HASH, EQUAL>'''
+
+ def initialize(self):
+ self.slice = UtilsVectorPrinter(
+ self.member('slots_')).make_slice_printer()
+
+ self.try_read_std_optional_func = self.try_read_std_optional
+
+ def update(self):
+ self.valid_slots = []
+ for slot in range(0, self.slice.num_children()):
+ v = self.slice.value_at(slot)
+ if member(v, 'hash').GetValueAsUnsigned() != 0:
+ self.valid_slots.append(slot)
+ return False
+
+ def get_summary(self):
+ return 'length={}'.format(self.num_children())
+
+ def num_children(self):
+ return len(self.valid_slots)
+
+ def has_children(self):
+ return True
+
+ def get_child_at_index(self, index):
+ slot = self.valid_slots[index]
+ v = self.slice.value_at(slot)
+ value = member(v, 'value')
+
+ # value is a std::optional, let's try to extract its value for display
+ kvp = self.try_read_std_optional_func(slot, value)
+ if kvp is None:
+ # If we failed, just output the slot and value as is, which will use
+ # the default printer for std::optional.
+ kvp = slot, value
+
+ return kvp[1].CreateChildAtOffset('[{}]'.format(kvp[0]), 0, kvp[1].GetType())
+
+ def try_read_std_optional(self, slot, value):
+ try:
+ # libc++
+ v = value.EvaluateExpression('__val_')
+ if v.name is not None:
+ return slot, v
+
+ # libstdc++
+ v = value.EvaluateExpression('_M_payload._M_payload._M_value')
+ if v.name is not None:
+ return slot, v
+ return None
+ except:
+ return None
+
+
+class UtilsHashmapPrinter(Printer):
+ '''Printer for Hashmap<K, V, N, HASH, EQUAL>'''
+
+ def initialize(self):
+ self.hash_set = UtilsHashsetPrinter(self.member('set_'))
+ # Replace the lookup function so we can extract the key and value out of the std::optionals in the Hashset
+ self.hash_set.try_read_std_optional_func = self.try_read_std_optional
+
+ def update(self):
+ self.hash_set.update()
+
+ def get_summary(self):
+ return self.hash_set.get_summary()
+
+ def num_children(self):
+ return self.hash_set.num_children()
+
+ def has_children(self):
+ return self.hash_set.has_children()
+
+ def get_child_at_index(self, index):
+ return self.hash_set.get_child_at_index(index)
+
+ def try_read_std_optional(self, slot, value):
+ try:
+ # libc++
+ val = value.EvaluateExpression('__val_')
+ k = val.EvaluateExpression('key')
+ v = val.EvaluateExpression('value')
+ if k.name is not None and v.name is not None:
+ return k.GetValue(), v
+
+ # libstdc++
+ val = value.EvaluateExpression('_M_payload._M_payload._M_value')
+ k = val.EvaluateExpression('key')
+ v = val.EvaluateExpression('value')
+ if k.name is not None and v.name is not None:
+ return k.GetValue(), v
+ except:
+ pass
+ # Failed, fall back on hash_set
+ return self.hash_set.try_read_std_optional(slot, value)
diff --git a/src/tint/transform/builtin_polyfill.cc b/src/tint/transform/builtin_polyfill.cc
index e53dad7..ec00672 100644
--- a/src/tint/transform/builtin_polyfill.cc
+++ b/src/tint/transform/builtin_polyfill.cc
@@ -137,6 +137,27 @@
return name;
}
+ /// Builds the polyfill function for the `clamp` builtin when called with integer arguments
+ /// (scalar or vector)
+ /// @param ty the parameter and return type for the function
+ /// @return the polyfill function name
+ Symbol clampInteger(const sem::Type* ty) {
+ auto name = b.Symbols().New("tint_clamp");
+
+ b.Func(name,
+ utils::Vector{
+ b.Param("e", T(ty)),
+ b.Param("low", T(ty)),
+ b.Param("high", T(ty)),
+ },
+ T(ty),
+ utils::Vector{
+ // return min(max(e, low), high);
+ b.Return(b.Call("min", b.Call("max", "e", "low"), "high")),
+ });
+ return name;
+ }
+
/// Builds the polyfill function for the `countLeadingZeros` builtin
/// @param ty the parameter and return type for the function
/// @return the polyfill function name
@@ -569,6 +590,9 @@
for (auto* node : program->ASTNodes().Objects()) {
if (auto* call = sem.Get<sem::Call>(node)) {
if (auto* builtin = call->Target()->As<sem::Builtin>()) {
+ if (call->Stage() == sem::EvaluationStage::kConstant) {
+ continue; // Don't polyfill @const expressions
+ }
switch (builtin->Type()) {
case sem::BuiltinType::kAcosh:
if (builtins.acosh != Level::kNone) {
@@ -585,6 +609,12 @@
return true;
}
break;
+ case sem::BuiltinType::kClamp:
+ if (builtins.clamp_int) {
+ auto& sig = builtin->Signature();
+ return sig.parameters[0]->Type()->is_integer_scalar_or_vector();
+ }
+ break;
case sem::BuiltinType::kCountLeadingZeros:
if (builtins.count_leading_zeros) {
return true;
@@ -653,6 +683,9 @@
State s{ctx, builtins};
if (auto* call = s.sem.Get<sem::Call>(expr)) {
if (auto* builtin = call->Target()->As<sem::Builtin>()) {
+ if (call->Stage() == sem::EvaluationStage::kConstant) {
+ return nullptr; // Don't polyfill @const expressions
+ }
Symbol polyfill;
switch (builtin->Type()) {
case sem::BuiltinType::kAcosh:
@@ -673,6 +706,16 @@
polyfills, builtin, [&] { return s.atanh(builtin->ReturnType()); });
}
break;
+ case sem::BuiltinType::kClamp:
+ if (builtins.clamp_int) {
+ auto& sig = builtin->Signature();
+ if (sig.parameters[0]->Type()->is_integer_scalar_or_vector()) {
+ polyfill = utils::GetOrCreate(polyfills, builtin, [&] {
+ return s.clampInteger(builtin->ReturnType());
+ });
+ }
+ }
+ break;
case sem::BuiltinType::kCountLeadingZeros:
if (builtins.count_leading_zeros) {
polyfill = utils::GetOrCreate(polyfills, builtin, [&] {
diff --git a/src/tint/transform/builtin_polyfill.h b/src/tint/transform/builtin_polyfill.h
index 14720bf..d083252 100644
--- a/src/tint/transform/builtin_polyfill.h
+++ b/src/tint/transform/builtin_polyfill.h
@@ -47,6 +47,8 @@
bool asinh = false;
/// What level should `atanh` be polyfilled?
Level atanh = Level::kNone;
+ /// Should `clamp()` be polyfilled for integer values (scalar or vector)?
+ bool clamp_int = false;
/// Should `countLeadingZeros()` be polyfilled?
bool count_leading_zeros = false;
/// Should `countTrailingZeros()` be polyfilled?
diff --git a/src/tint/transform/builtin_polyfill_test.cc b/src/tint/transform/builtin_polyfill_test.cc
index 7c8440b..b938195 100644
--- a/src/tint/transform/builtin_polyfill_test.cc
+++ b/src/tint/transform/builtin_polyfill_test.cc
@@ -55,20 +55,37 @@
TEST_F(BuiltinPolyfillTest, ShouldRunAcosh) {
auto* src = R"(
fn f() {
- acosh(1.0);
+ let v = 1.0;
+ acosh(v);
}
)";
EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src, polyfillAcosh(Level::kNone)));
- EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAcosh(Level::kClampParameters)));
+ EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAcosh(Level::kRangeCheck)));
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAcosh(Level::kFull)));
}
+// TODO(crbug.com/tint/1581): Enable once `acosh` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_Acosh_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : f32 = acosh(1.0);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillAcosh(Level::kFull));
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, Acosh_Full_f32) {
auto* src = R"(
fn f() {
- let r : f32 = acosh(1234);
+ let v = 1.0;
+ let r : f32 = acosh(v);
}
)";
@@ -78,7 +95,8 @@
}
fn f() {
- let r : f32 = tint_acosh(1234);
+ let v = 1.0;
+ let r : f32 = tint_acosh(v);
}
)";
@@ -90,7 +108,8 @@
TEST_F(BuiltinPolyfillTest, Acosh_Full_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = acosh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = acosh(vec3<f32>(v));
}
)";
@@ -100,7 +119,8 @@
}
fn f() {
- let r : vec3<f32> = tint_acosh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = tint_acosh(vec3<f32>(v));
}
)";
@@ -112,7 +132,8 @@
TEST_F(BuiltinPolyfillTest, Acosh_Range_f32) {
auto* src = R"(
fn f() {
- let r : f32 = acosh(1234);
+ let v = 1.0;
+ let r : f32 = acosh(v);
}
)";
@@ -122,7 +143,8 @@
}
fn f() {
- let r : f32 = tint_acosh(1234);
+ let v = 1.0;
+ let r : f32 = tint_acosh(v);
}
)";
@@ -134,7 +156,8 @@
TEST_F(BuiltinPolyfillTest, Acosh_Range_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = acosh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = acosh(vec3<f32>(v));
}
)";
@@ -144,7 +167,8 @@
}
fn f() {
- let r : vec3<f32> = tint_acosh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = tint_acosh(vec3<f32>(v));
}
)";
@@ -167,7 +191,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunAsinh) {
auto* src = R"(
fn f() {
- asinh(1.0);
+ let v = 1.0;
+ asinh(v);
}
)";
@@ -175,10 +200,25 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillSinh()));
}
+TEST_F(BuiltinPolyfillTest, Asinh_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : f32 = asinh(1.0);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillSinh());
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, Asinh_f32) {
auto* src = R"(
fn f() {
- let r : f32 = asinh(1234);
+ let v = 1.0;
+ let r : f32 = asinh(v);
}
)";
@@ -188,7 +228,8 @@
}
fn f() {
- let r : f32 = tint_sinh(1234);
+ let v = 1.0;
+ let r : f32 = tint_sinh(v);
}
)";
@@ -200,7 +241,8 @@
TEST_F(BuiltinPolyfillTest, Asinh_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = asinh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = asinh(vec3<f32>(v));
}
)";
@@ -210,7 +252,8 @@
}
fn f() {
- let r : vec3<f32> = tint_sinh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = tint_sinh(vec3<f32>(v));
}
)";
@@ -233,20 +276,37 @@
TEST_F(BuiltinPolyfillTest, ShouldRunAtanh) {
auto* src = R"(
fn f() {
- atanh(1.0);
+ let v = 1.0;
+ atanh(v);
}
)";
EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src, polyfillAtanh(Level::kNone)));
- EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAtanh(Level::kClampParameters)));
+ EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAtanh(Level::kRangeCheck)));
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillAtanh(Level::kFull)));
}
+// TODO(crbug.com/tint/1581): Enable once `atanh` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_Atanh_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : f32 = atanh(1.23);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillAtanh(Level::kFull));
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, Atanh_Full_f32) {
auto* src = R"(
fn f() {
- let r : f32 = atanh(1234);
+ let v = 1.0;
+ let r : f32 = atanh(v);
}
)";
@@ -256,7 +316,8 @@
}
fn f() {
- let r : f32 = tint_atanh(1234);
+ let v = 1.0;
+ let r : f32 = tint_atanh(v);
}
)";
@@ -268,7 +329,8 @@
TEST_F(BuiltinPolyfillTest, Atanh_Full_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = atanh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = atanh(vec3<f32>(v));
}
)";
@@ -278,7 +340,8 @@
}
fn f() {
- let r : vec3<f32> = tint_atanh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = tint_atanh(vec3<f32>(v));
}
)";
@@ -290,7 +353,8 @@
TEST_F(BuiltinPolyfillTest, Atanh_Range_f32) {
auto* src = R"(
fn f() {
- let r : f32 = atanh(1234);
+ let v = 1.0;
+ let r : f32 = atanh(v);
}
)";
@@ -300,7 +364,8 @@
}
fn f() {
- let r : f32 = tint_atanh(1234);
+ let v = 1.0;
+ let r : f32 = tint_atanh(v);
}
)";
@@ -312,17 +377,190 @@
TEST_F(BuiltinPolyfillTest, Atanh_Range_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = atanh(vec3<f32>(1234));
+ let v = 1.0;
+ let r : vec3<f32> = atanh(vec3<f32>(v));
+}
+)";
+
+ auto* expect = R"(
+fn tint_atanh(x : vec3<f32>) -> vec3<f32> {
+ return select(atanh(x), vec3<f32>(0.0), (x >= vec3<f32>(1.0)));
+}
+
+fn f() {
+ let v = 1.0;
+ let r : vec3<f32> = tint_atanh(vec3<f32>(v));
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillAtanh(Level::kRangeCheck));
+
+ EXPECT_EQ(expect, str(got));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// clampInteger
+////////////////////////////////////////////////////////////////////////////////
+DataMap polyfillClampInteger() {
+ BuiltinPolyfill::Builtins builtins;
+ builtins.clamp_int = true;
+ DataMap data;
+ data.Add<BuiltinPolyfill::Config>(builtins);
+ return data;
+}
+
+TEST_F(BuiltinPolyfillTest, ShouldRunClampInteger_i32) {
+ auto* src = R"(
+fn f() {
+ let v = 1i;
+ clamp(v, 2i, 3i);
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
+ EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillClampInteger()));
+}
+
+TEST_F(BuiltinPolyfillTest, ShouldRunClampInteger_u32) {
+ auto* src = R"(
+fn f() {
+ let v = 1u;
+ clamp(v, 2u, 3u);
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
+ EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillClampInteger()));
+}
+
+TEST_F(BuiltinPolyfillTest, ShouldRunClampInteger_f32) {
+ auto* src = R"(
+fn f() {
+ let v = 1f;
+ clamp(v, 2f, 3f);
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src, polyfillClampInteger()));
+}
+
+TEST_F(BuiltinPolyfillTest, ShouldRunClampInteger_f16) {
+ auto* src = R"(
+enable f16;
+
+fn f() {
+ let v = 1h;
+ clamp(v, 2h, 3h);
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src));
+ EXPECT_FALSE(ShouldRun<BuiltinPolyfill>(src, polyfillClampInteger()));
+}
+
+TEST_F(BuiltinPolyfillTest, ClampInteger_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = clamp(1i, 2i, 3i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillClampInteger());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, ClampInteger_i32) {
+ auto* src = R"(
+fn f() {
+ let v = 1i;
+ let r : i32 = clamp(v, 2i, 3i);
+}
+)";
+
+ auto* expect = R"(
+fn tint_clamp(e : i32, low : i32, high : i32) -> i32 {
+ return min(max(e, low), high);
+}
+
+fn f() {
+ let v = 1i;
+ let r : i32 = tint_clamp(v, 2i, 3i);
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillClampInteger());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, ClampInteger_vec3_i32) {
+ auto* src = R"(
+fn f() {
+ let v = 1i;
+ let r : vec3<i32> = clamp(vec3(v), vec3(2i), vec3(3i));
+}
+)";
+
+ auto* expect =
+ R"(
+fn tint_clamp(e : vec3<i32>, low : vec3<i32>, high : vec3<i32>) -> vec3<i32> {
+ return min(max(e, low), high);
+}
+
+fn f() {
+ let v = 1i;
+ let r : vec3<i32> = tint_clamp(vec3(v), vec3(2i), vec3(3i));
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillClampInteger());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, ClampInteger_u32) {
+ auto* src = R"(
+fn f() {
+ let r : u32 = clamp(1u, 2u, 3u);
}
)";
auto* expect = R"(
fn f() {
- let r : vec3<f32> = atanh(vec3<f32>(1234));
+ let r : u32 = clamp(1u, 2u, 3u);
}
)";
- auto got = Run<BuiltinPolyfill>(src, polyfillAcosh(Level::kRangeCheck));
+ auto got = Run<BuiltinPolyfill>(src, polyfillClampInteger());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, ClampInteger_vec3_u32) {
+ auto* src = R"(
+fn f() {
+ let v = 1u;
+ let r : vec3<u32> = clamp(vec3(v), vec3(2u), vec3(3u));
+}
+)";
+
+ auto* expect =
+ R"(
+fn tint_clamp(e : vec3<u32>, low : vec3<u32>, high : vec3<u32>) -> vec3<u32> {
+ return min(max(e, low), high);
+}
+
+fn f() {
+ let v = 1u;
+ let r : vec3<u32> = tint_clamp(vec3(v), vec3(2u), vec3(3u));
+}
+)";
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillClampInteger());
EXPECT_EQ(expect, str(got));
}
@@ -341,7 +579,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunCountLeadingZeros) {
auto* src = R"(
fn f() {
- countLeadingZeros(0xf);
+ let v = 15;
+ countLeadingZeros(v);
}
)";
@@ -349,10 +588,26 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillCountLeadingZeros()));
}
+// TODO(crbug.com/tint/1581): Enable once `countLeadingZeros` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_CountLeadingZeros_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = countLeadingZeros(15i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillCountLeadingZeros());
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, CountLeadingZeros_i32) {
auto* src = R"(
fn f() {
- let r : i32 = countLeadingZeros(15);
+ let v = 15i;
+ let r : i32 = countLeadingZeros(v);
}
)";
@@ -373,7 +628,8 @@
}
fn f() {
- let r : i32 = tint_count_leading_zeros(15);
+ let v = 15i;
+ let r : i32 = tint_count_leading_zeros(v);
}
)";
@@ -385,7 +641,8 @@
TEST_F(BuiltinPolyfillTest, CountLeadingZeros_u32) {
auto* src = R"(
fn f() {
- let r : u32 = countLeadingZeros(15u);
+ let v = 15u;
+ let r : u32 = countLeadingZeros(v);
}
)";
@@ -406,7 +663,8 @@
}
fn f() {
- let r : u32 = tint_count_leading_zeros(15u);
+ let v = 15u;
+ let r : u32 = tint_count_leading_zeros(v);
}
)";
@@ -418,7 +676,8 @@
TEST_F(BuiltinPolyfillTest, CountLeadingZeros_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = countLeadingZeros(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = countLeadingZeros(vec3<i32>(v));
}
)";
@@ -439,7 +698,8 @@
}
fn f() {
- let r : vec3<i32> = tint_count_leading_zeros(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = tint_count_leading_zeros(vec3<i32>(v));
}
)";
@@ -451,7 +711,8 @@
TEST_F(BuiltinPolyfillTest, CountLeadingZeros_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = countLeadingZeros(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = countLeadingZeros(vec3<u32>(v));
}
)";
@@ -472,7 +733,8 @@
}
fn f() {
- let r : vec3<u32> = tint_count_leading_zeros(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = tint_count_leading_zeros(vec3<u32>(v));
}
)";
@@ -495,7 +757,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunCountTrailingZeros) {
auto* src = R"(
fn f() {
- countTrailingZeros(0xf);
+ let v = 15;
+ countTrailingZeros(v);
}
)";
@@ -503,10 +766,26 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillCountTrailingZeros()));
}
+// TODO(crbug.com/tint/1581): Enable once `countTrailingZeros` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_CountTrailingZeros_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = countTrailingZeros(15i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillCountTrailingZeros());
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, CountTrailingZeros_i32) {
auto* src = R"(
fn f() {
- let r : i32 = countTrailingZeros(15);
+ let v = 15i;
+ let r : i32 = countTrailingZeros(v);
}
)";
@@ -527,7 +806,8 @@
}
fn f() {
- let r : i32 = tint_count_trailing_zeros(15);
+ let v = 15i;
+ let r : i32 = tint_count_trailing_zeros(v);
}
)";
@@ -539,7 +819,8 @@
TEST_F(BuiltinPolyfillTest, CountTrailingZeros_u32) {
auto* src = R"(
fn f() {
- let r : u32 = countTrailingZeros(15u);
+ let v = 15u;
+ let r : u32 = countTrailingZeros(v);
}
)";
@@ -560,7 +841,8 @@
}
fn f() {
- let r : u32 = tint_count_trailing_zeros(15u);
+ let v = 15u;
+ let r : u32 = tint_count_trailing_zeros(v);
}
)";
@@ -572,7 +854,8 @@
TEST_F(BuiltinPolyfillTest, CountTrailingZeros_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = countTrailingZeros(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = countTrailingZeros(vec3<i32>(v));
}
)";
@@ -593,7 +876,8 @@
}
fn f() {
- let r : vec3<i32> = tint_count_trailing_zeros(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = tint_count_trailing_zeros(vec3<i32>(v));
}
)";
@@ -605,7 +889,8 @@
TEST_F(BuiltinPolyfillTest, CountTrailingZeros_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = countTrailingZeros(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = countTrailingZeros(vec3<u32>(v));
}
)";
@@ -626,7 +911,8 @@
}
fn f() {
- let r : vec3<u32> = tint_count_trailing_zeros(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = tint_count_trailing_zeros(vec3<u32>(v));
}
)";
@@ -649,7 +935,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunExtractBits) {
auto* src = R"(
fn f() {
- extractBits(1234, 5u, 6u);
+ let v = 1234i;
+ extractBits(v, 5u, 6u);
}
)";
@@ -659,10 +946,25 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillExtractBits(Level::kFull)));
}
+TEST_F(BuiltinPolyfillTest, ExtractBits_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = countTrailingZeros(15i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillExtractBits(Level::kFull));
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, ExtractBits_Full_i32) {
auto* src = R"(
fn f() {
- let r : i32 = extractBits(1234, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = extractBits(v, 5u, 6u);
}
)";
@@ -676,7 +978,8 @@
}
fn f() {
- let r : i32 = tint_extract_bits(1234, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = tint_extract_bits(v, 5u, 6u);
}
)";
@@ -688,7 +991,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Full_u32) {
auto* src = R"(
fn f() {
- let r : u32 = extractBits(1234u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = extractBits(v, 5u, 6u);
}
)";
@@ -702,7 +1006,8 @@
}
fn f() {
- let r : u32 = tint_extract_bits(1234u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = tint_extract_bits(v, 5u, 6u);
}
)";
@@ -714,7 +1019,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Full_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = extractBits(vec3<i32>(1234), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = extractBits(vec3<i32>(v), 5u, 6u);
}
)";
@@ -728,7 +1034,8 @@
}
fn f() {
- let r : vec3<i32> = tint_extract_bits(vec3<i32>(1234), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = tint_extract_bits(vec3<i32>(v), 5u, 6u);
}
)";
@@ -740,7 +1047,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Full_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = extractBits(vec3<u32>(1234u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = extractBits(vec3<u32>(v), 5u, 6u);
}
)";
@@ -754,7 +1062,8 @@
}
fn f() {
- let r : vec3<u32> = tint_extract_bits(vec3<u32>(1234u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = tint_extract_bits(vec3<u32>(v), 5u, 6u);
}
)";
@@ -766,7 +1075,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Clamp_i32) {
auto* src = R"(
fn f() {
- let r : i32 = extractBits(1234, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = extractBits(v, 5u, 6u);
}
)";
@@ -778,7 +1088,8 @@
}
fn f() {
- let r : i32 = tint_extract_bits(1234, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = tint_extract_bits(v, 5u, 6u);
}
)";
@@ -790,7 +1101,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Clamp_u32) {
auto* src = R"(
fn f() {
- let r : u32 = extractBits(1234u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = extractBits(v, 5u, 6u);
}
)";
@@ -802,7 +1114,8 @@
}
fn f() {
- let r : u32 = tint_extract_bits(1234u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = tint_extract_bits(v, 5u, 6u);
}
)";
@@ -814,7 +1127,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Clamp_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = extractBits(vec3<i32>(1234), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = extractBits(vec3<i32>(v), 5u, 6u);
}
)";
@@ -826,7 +1140,8 @@
}
fn f() {
- let r : vec3<i32> = tint_extract_bits(vec3<i32>(1234), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = tint_extract_bits(vec3<i32>(v), 5u, 6u);
}
)";
@@ -838,7 +1153,8 @@
TEST_F(BuiltinPolyfillTest, ExtractBits_Clamp_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = extractBits(vec3<u32>(1234u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = extractBits(vec3<u32>(v), 5u, 6u);
}
)";
@@ -850,7 +1166,8 @@
}
fn f() {
- let r : vec3<u32> = tint_extract_bits(vec3<u32>(1234u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = tint_extract_bits(vec3<u32>(v), 5u, 6u);
}
)";
@@ -873,7 +1190,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunFirstLeadingBit) {
auto* src = R"(
fn f() {
- firstLeadingBit(0xf);
+ let v = 15i;
+ firstLeadingBit(v);
}
)";
@@ -881,10 +1199,26 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillFirstLeadingBit()));
}
+// TODO(crbug.com/tint/1581): Enable once `firstLeadingBit` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_FirstLeadingBit_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = firstLeadingBit(15i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillFirstLeadingBit());
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, FirstLeadingBit_i32) {
auto* src = R"(
fn f() {
- let r : i32 = firstLeadingBit(15);
+ let v = 15i;
+ let r : i32 = firstLeadingBit(v);
}
)";
@@ -905,7 +1239,8 @@
}
fn f() {
- let r : i32 = tint_first_leading_bit(15);
+ let v = 15i;
+ let r : i32 = tint_first_leading_bit(v);
}
)";
@@ -917,7 +1252,8 @@
TEST_F(BuiltinPolyfillTest, FirstLeadingBit_u32) {
auto* src = R"(
fn f() {
- let r : u32 = firstLeadingBit(15u);
+ let v = 15u;
+ let r : u32 = firstLeadingBit(v);
}
)";
@@ -938,7 +1274,8 @@
}
fn f() {
- let r : u32 = tint_first_leading_bit(15u);
+ let v = 15u;
+ let r : u32 = tint_first_leading_bit(v);
}
)";
@@ -950,7 +1287,8 @@
TEST_F(BuiltinPolyfillTest, FirstLeadingBit_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = firstLeadingBit(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = firstLeadingBit(vec3<i32>(v));
}
)";
@@ -971,7 +1309,8 @@
}
fn f() {
- let r : vec3<i32> = tint_first_leading_bit(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = tint_first_leading_bit(vec3<i32>(v));
}
)";
@@ -983,7 +1322,8 @@
TEST_F(BuiltinPolyfillTest, FirstLeadingBit_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = firstLeadingBit(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = firstLeadingBit(vec3<u32>(v));
}
)";
@@ -1004,7 +1344,8 @@
}
fn f() {
- let r : vec3<u32> = tint_first_leading_bit(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = tint_first_leading_bit(vec3<u32>(v));
}
)";
@@ -1027,7 +1368,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunFirstTrailingBit) {
auto* src = R"(
fn f() {
- firstTrailingBit(0xf);
+ let v = 15i;
+ firstTrailingBit(v);
}
)";
@@ -1035,10 +1377,26 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillFirstTrailingBit()));
}
+// TODO(crbug.com/tint/1581): Enable once `firstTrailingBit` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_FirstTrailingBit_ConstantExpression) {
+ auto* src = R"(
+fn f() {
+ let r : i32 = firstTrailingBit(15i);
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillFirstTrailingBit());
+
+ EXPECT_EQ(expect, str(got));
+}
+
TEST_F(BuiltinPolyfillTest, FirstTrailingBit_i32) {
auto* src = R"(
fn f() {
- let r : i32 = firstTrailingBit(15);
+ let v = 15i;
+ let r : i32 = firstTrailingBit(v);
}
)";
@@ -1059,7 +1417,8 @@
}
fn f() {
- let r : i32 = tint_first_trailing_bit(15);
+ let v = 15i;
+ let r : i32 = tint_first_trailing_bit(v);
}
)";
@@ -1071,7 +1430,8 @@
TEST_F(BuiltinPolyfillTest, FirstTrailingBit_u32) {
auto* src = R"(
fn f() {
- let r : u32 = firstTrailingBit(15u);
+ let v = 15u;
+ let r : u32 = firstTrailingBit(v);
}
)";
@@ -1092,7 +1452,8 @@
}
fn f() {
- let r : u32 = tint_first_trailing_bit(15u);
+ let v = 15u;
+ let r : u32 = tint_first_trailing_bit(v);
}
)";
@@ -1104,7 +1465,8 @@
TEST_F(BuiltinPolyfillTest, FirstTrailingBit_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = firstTrailingBit(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = firstTrailingBit(vec3<i32>(v));
}
)";
@@ -1125,7 +1487,8 @@
}
fn f() {
- let r : vec3<i32> = tint_first_trailing_bit(vec3<i32>(15));
+ let v = 15i;
+ let r : vec3<i32> = tint_first_trailing_bit(vec3<i32>(v));
}
)";
@@ -1137,7 +1500,8 @@
TEST_F(BuiltinPolyfillTest, FirstTrailingBit_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = firstTrailingBit(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = firstTrailingBit(vec3<u32>(v));
}
)";
@@ -1158,7 +1522,8 @@
}
fn f() {
- let r : vec3<u32> = tint_first_trailing_bit(vec3<u32>(15u));
+ let v = 15u;
+ let r : vec3<u32> = tint_first_trailing_bit(vec3<u32>(v));
}
)";
@@ -1181,7 +1546,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunInsertBits) {
auto* src = R"(
fn f() {
- insertBits(1234, 5678, 5u, 6u);
+ let v = 1234i;
+ insertBits(v, 5678, 5u, 6u);
}
)";
@@ -1191,13 +1557,29 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillInsertBits(Level::kFull)));
}
-TEST_F(BuiltinPolyfillTest, InsertBits_Full_i32) {
+// TODO(crbug.com/tint/1581): Enable once `insertBits` is implemented as @const
+TEST_F(BuiltinPolyfillTest, DISABLED_InsertBits_ConstantExpression) {
auto* src = R"(
fn f() {
let r : i32 = insertBits(1234, 5678, 5u, 6u);
}
)";
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillInsertBits(Level::kFull));
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, InsertBits_Full_i32) {
+ auto* src = R"(
+fn f() {
+ let v = 1234i;
+ let r : i32 = insertBits(v, 5678, 5u, 6u);
+}
+)";
+
auto* expect = R"(
fn tint_insert_bits(v : i32, n : i32, offset : u32, count : u32) -> i32 {
let s = min(offset, 32u);
@@ -1207,7 +1589,8 @@
}
fn f() {
- let r : i32 = tint_insert_bits(1234, 5678, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = tint_insert_bits(v, 5678, 5u, 6u);
}
)";
@@ -1219,7 +1602,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Full_u32) {
auto* src = R"(
fn f() {
- let r : u32 = insertBits(1234u, 5678u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = insertBits(v, 5678u, 5u, 6u);
}
)";
@@ -1232,7 +1616,8 @@
}
fn f() {
- let r : u32 = tint_insert_bits(1234u, 5678u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = tint_insert_bits(v, 5678u, 5u, 6u);
}
)";
@@ -1244,7 +1629,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Full_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = insertBits(vec3<i32>(1234), vec3<i32>(5678), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = insertBits(vec3<i32>(v), vec3<i32>(5678), 5u, 6u);
}
)";
@@ -1257,7 +1643,8 @@
}
fn f() {
- let r : vec3<i32> = tint_insert_bits(vec3<i32>(1234), vec3<i32>(5678), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = tint_insert_bits(vec3<i32>(v), vec3<i32>(5678), 5u, 6u);
}
)";
@@ -1269,7 +1656,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Full_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = insertBits(vec3<u32>(1234u), vec3<u32>(5678u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = insertBits(vec3<u32>(v), vec3<u32>(5678u), 5u, 6u);
}
)";
@@ -1282,7 +1670,8 @@
}
fn f() {
- let r : vec3<u32> = tint_insert_bits(vec3<u32>(1234u), vec3<u32>(5678u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = tint_insert_bits(vec3<u32>(v), vec3<u32>(5678u), 5u, 6u);
}
)";
@@ -1294,7 +1683,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Clamp_i32) {
auto* src = R"(
fn f() {
- let r : i32 = insertBits(1234, 5678, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = insertBits(v, 5678, 5u, 6u);
}
)";
@@ -1306,7 +1696,8 @@
}
fn f() {
- let r : i32 = tint_insert_bits(1234, 5678, 5u, 6u);
+ let v = 1234i;
+ let r : i32 = tint_insert_bits(v, 5678, 5u, 6u);
}
)";
@@ -1318,7 +1709,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Clamp_u32) {
auto* src = R"(
fn f() {
- let r : u32 = insertBits(1234u, 5678u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = insertBits(v, 5678u, 5u, 6u);
}
)";
@@ -1330,7 +1722,8 @@
}
fn f() {
- let r : u32 = tint_insert_bits(1234u, 5678u, 5u, 6u);
+ let v = 1234u;
+ let r : u32 = tint_insert_bits(v, 5678u, 5u, 6u);
}
)";
@@ -1342,7 +1735,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Clamp_vec3_i32) {
auto* src = R"(
fn f() {
- let r : vec3<i32> = insertBits(vec3<i32>(1234), vec3<i32>(5678), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = insertBits(vec3<i32>(v), vec3<i32>(5678), 5u, 6u);
}
)";
@@ -1354,7 +1748,8 @@
}
fn f() {
- let r : vec3<i32> = tint_insert_bits(vec3<i32>(1234), vec3<i32>(5678), 5u, 6u);
+ let v = 1234i;
+ let r : vec3<i32> = tint_insert_bits(vec3<i32>(v), vec3<i32>(5678), 5u, 6u);
}
)";
@@ -1366,7 +1761,8 @@
TEST_F(BuiltinPolyfillTest, InsertBits_Clamp_vec3_u32) {
auto* src = R"(
fn f() {
- let r : vec3<u32> = insertBits(vec3<u32>(1234u), vec3<u32>(5678u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = insertBits(vec3<u32>(v), vec3<u32>(5678u), 5u, 6u);
}
)";
@@ -1378,7 +1774,8 @@
}
fn f() {
- let r : vec3<u32> = tint_insert_bits(vec3<u32>(1234u), vec3<u32>(5678u), 5u, 6u);
+ let v = 1234u;
+ let r : vec3<u32> = tint_insert_bits(vec3<u32>(v), vec3<u32>(5678u), 5u, 6u);
}
)";
@@ -1401,7 +1798,8 @@
TEST_F(BuiltinPolyfillTest, ShouldRunSaturate) {
auto* src = R"(
fn f() {
- saturate(0.5);
+ let v = 0.5f;
+ saturate(v);
}
)";
@@ -1409,42 +1807,36 @@
EXPECT_TRUE(ShouldRun<BuiltinPolyfill>(src, polyfillSaturate()));
}
-TEST_F(BuiltinPolyfillTest, Saturate_f32) {
- auto* src = R"(
-fn f() {
- let r : f32 = saturate(0.5f);
-}
-)";
-
- auto* expect = R"(
-fn tint_saturate(v : f32) -> f32 {
- return clamp(v, f32(0), f32(1));
-}
-
-fn f() {
- let r : f32 = tint_saturate(0.5f);
-}
-)";
-
- auto got = Run<BuiltinPolyfill>(src, polyfillSaturate());
-
- EXPECT_EQ(expect, str(got));
-}
-
-TEST_F(BuiltinPolyfillTest, Saturate_f32_from_abstract_float) {
+TEST_F(BuiltinPolyfillTest, Saturate_ConstantExpression) {
auto* src = R"(
fn f() {
let r : f32 = saturate(0.5);
}
)";
+ auto* expect = src;
+
+ auto got = Run<BuiltinPolyfill>(src, polyfillSaturate());
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(BuiltinPolyfillTest, Saturate_f32) {
+ auto* src = R"(
+fn f() {
+ let v = 0.5f;
+ let r : f32 = saturate(v);
+}
+)";
+
auto* expect = R"(
fn tint_saturate(v : f32) -> f32 {
return clamp(v, f32(0), f32(1));
}
fn f() {
- let r : f32 = tint_saturate(0.5);
+ let v = 0.5f;
+ let r : f32 = tint_saturate(v);
}
)";
@@ -1458,7 +1850,8 @@
enable f16;
fn f() {
- let r : f16 = saturate(0.5h);
+ let v = 0.5h;
+ let r : f16 = saturate(v);
}
)";
@@ -1470,7 +1863,8 @@
}
fn f() {
- let r : f16 = tint_saturate(0.5h);
+ let v = 0.5h;
+ let r : f16 = tint_saturate(v);
}
)";
@@ -1482,7 +1876,8 @@
TEST_F(BuiltinPolyfillTest, Saturate_vec3_f32) {
auto* src = R"(
fn f() {
- let r : vec3<f32> = saturate(vec3<f32>(0.5f));
+ let v = 0.5f;
+ let r : vec3<f32> = saturate(vec3<f32>(v));
}
)";
@@ -1492,29 +1887,8 @@
}
fn f() {
- let r : vec3<f32> = tint_saturate(vec3<f32>(0.5f));
-}
-)";
-
- auto got = Run<BuiltinPolyfill>(src, polyfillSaturate());
-
- EXPECT_EQ(expect, str(got));
-}
-
-TEST_F(BuiltinPolyfillTest, Saturate_vec3_f32_from_abstract_float) {
- auto* src = R"(
-fn f() {
- let r : vec3<f32> = saturate(vec3(0.5));
-}
-)";
-
- auto* expect = R"(
-fn tint_saturate(v : vec3<f32>) -> vec3<f32> {
- return clamp(v, vec3<f32>(0), vec3<f32>(1));
-}
-
-fn f() {
- let r : vec3<f32> = tint_saturate(vec3(0.5));
+ let v = 0.5f;
+ let r : vec3<f32> = tint_saturate(vec3<f32>(v));
}
)";
@@ -1528,7 +1902,8 @@
enable f16;
fn f() {
- let r : vec3<f16> = saturate(vec3<f16>(0.5h));
+ let v = 0.5h;
+ let r : vec3<f16> = saturate(vec3<f16>(v));
}
)";
@@ -1540,7 +1915,8 @@
}
fn f() {
- let r : vec3<f16> = tint_saturate(vec3<f16>(0.5h));
+ let v = 0.5h;
+ let r : vec3<f16> = tint_saturate(vec3<f16>(v));
}
)";
diff --git a/src/tint/transform/merge_return.cc b/src/tint/transform/merge_return.cc
new file mode 100644
index 0000000..aec6b6d
--- /dev/null
+++ b/src/tint/transform/merge_return.cc
@@ -0,0 +1,239 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/transform/merge_return.h"
+
+#include <utility>
+
+#include "src/tint/program_builder.h"
+#include "src/tint/sem/statement.h"
+#include "src/tint/utils/scoped_assignment.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::transform::MergeReturn);
+
+using namespace tint::number_suffixes; // NOLINT
+
+namespace tint::transform {
+
+namespace {
+
+/// Returns `true` if `stmt` has the behavior `behavior`.
+bool HasBehavior(const Program* program, const ast::Statement* stmt, sem::Behavior behavior) {
+ return program->Sem().Get(stmt)->Behaviors().Contains(behavior);
+}
+
+/// Returns `true` if `func` needs to be transformed.
+bool NeedsTransform(const Program* program, const ast::Function* func) {
+ // Entry points and intrinsic declarations never need transforming.
+ if (func->IsEntryPoint() || func->body == nullptr) {
+ return false;
+ }
+
+ // Avoid transforming functions that only have a single exit point.
+ // TODO(jrprice): Alternatively, use the uniformity analysis to decide which
+ // functions need to be transformed.
+ for (auto* s : func->body->statements) {
+ // Find the first statement that has contains the Return behavior.
+ if (HasBehavior(program, s, sem::Behavior::kReturn)) {
+ // If this statement is itself a return, it will be the only exit point,
+ // so no need to apply the transform to the function.
+ if (s->Is<ast::ReturnStatement>()) {
+ return false;
+ } else {
+ // Apply the transform in all other cases.
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace
+
+MergeReturn::MergeReturn() = default;
+
+MergeReturn::~MergeReturn() = default;
+
+bool MergeReturn::ShouldRun(const Program* program, const DataMap&) const {
+ for (auto* func : program->AST().Functions()) {
+ if (NeedsTransform(program, func)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+namespace {
+
+/// Internal class used to during the transform.
+class State {
+ private:
+ /// The clone context.
+ CloneContext& ctx;
+
+ /// The program builder.
+ ProgramBuilder& b;
+
+ /// The function.
+ const ast::Function* function;
+
+ /// The symbol for the return flag variable.
+ Symbol flag;
+
+ /// The symbol for the return value variable.
+ Symbol retval;
+
+ /// Tracks whether we are currently inside a loop or switch statement.
+ bool is_in_loop_or_switch = false;
+
+ public:
+ /// Constructor
+ /// @param context the clone context
+ State(CloneContext& context, const ast::Function* func)
+ : ctx(context), b(*ctx.dst), function(func) {}
+
+ /// Process a statement (recursively).
+ void ProcessStatement(const ast::Statement* stmt) {
+ if (stmt == nullptr || !HasBehavior(ctx.src, stmt, sem::Behavior::kReturn)) {
+ return;
+ }
+
+ Switch(
+ stmt, [&](const ast::BlockStatement* block) { ProcessBlock(block); },
+ [&](const ast::CaseStatement* c) { ProcessStatement(c->body); },
+ [&](const ast::ForLoopStatement* f) {
+ TINT_SCOPED_ASSIGNMENT(is_in_loop_or_switch, true);
+ ProcessStatement(f->body);
+ },
+ [&](const ast::IfStatement* i) {
+ ProcessStatement(i->body);
+ ProcessStatement(i->else_statement);
+ },
+ [&](const ast::LoopStatement* l) {
+ TINT_SCOPED_ASSIGNMENT(is_in_loop_or_switch, true);
+ ProcessStatement(l->body);
+ },
+ [&](const ast::ReturnStatement* r) {
+ utils::Vector<const ast::Statement*, 3> stmts;
+ // Set the return flag to signal that we have hit a return.
+ stmts.Push(b.Assign(b.Expr(flag), true));
+ if (r->value) {
+ // Set the return value if necessary.
+ stmts.Push(b.Assign(b.Expr(retval), ctx.Clone(r->value)));
+ }
+ if (is_in_loop_or_switch) {
+ // If we are in a loop or switch statement, break out of it.
+ stmts.Push(b.Break());
+ }
+ ctx.Replace(r, b.Block(std::move(stmts)));
+ },
+ [&](const ast::SwitchStatement* s) {
+ TINT_SCOPED_ASSIGNMENT(is_in_loop_or_switch, true);
+ for (auto* c : s->body) {
+ ProcessStatement(c);
+ }
+ },
+ [&](const ast::WhileStatement* w) {
+ TINT_SCOPED_ASSIGNMENT(is_in_loop_or_switch, true);
+ ProcessStatement(w->body);
+ },
+ [&](Default) { TINT_ICE(Transform, b.Diagnostics()) << "unhandled statement type"; });
+ }
+
+ void ProcessBlock(const ast::BlockStatement* block) {
+ // We will rebuild the contents of the block statement.
+ // We may introduce conditionals around statements that follow a statement with the
+ // `Return` behavior, so build a stack of statement lists that represent the new
+ // (potentially nested) conditional blocks.
+ utils::Vector<utils::Vector<const ast::Statement*, 8>, 8> new_stmts({{}});
+
+ // Insert variables for the return flag and return value at the top of the function.
+ if (block == function->body) {
+ flag = b.Symbols().New("tint_return_flag");
+ new_stmts[0].Push(b.Decl(b.Var(flag, b.ty.bool_())));
+
+ if (!function->return_type->Is<ast::Void>()) {
+ retval = b.Symbols().New("tint_return_value");
+ new_stmts[0].Push(b.Decl(b.Var(retval, ctx.Clone(function->return_type))));
+ }
+ }
+
+ for (auto* s : block->statements) {
+ // Process the statement and add it to the current block.
+ ProcessStatement(s);
+ new_stmts.Back().Push(ctx.Clone(s));
+
+ // Check if the statement is or contains a return statement.
+ // We need to make sure any statements that follow this one do not get executed if the
+ // return flag has been set.
+ if (HasBehavior(ctx.src, s, sem::Behavior::kReturn)) {
+ if (is_in_loop_or_switch) {
+ // We're in a loop/switch, and so we would have inserted a `break`.
+ // If we've just come out of a loop/switch statement, we need to `break` again.
+ if (s->IsAnyOf<ast::LoopStatement, ast::ForLoopStatement,
+ ast::SwitchStatement>()) {
+ // If the loop only has the 'Return' behavior, we can just unconditionally
+ // break. Otherwise check the return flag.
+ if (HasBehavior(ctx.src, s, sem::Behavior::kNext)) {
+ new_stmts.Back().Push(
+ b.If(b.Expr(flag), b.Block(utils::Vector{b.Break()})));
+ } else {
+ new_stmts.Back().Push(b.Break());
+ }
+ }
+ } else {
+ // Create a new list for any subsequent statements, which we will wrap in a
+ // conditional block.
+ new_stmts.Push({});
+ }
+ }
+ }
+
+ // Descend the stack of new block statements, wrapping them in conditionals.
+ while (new_stmts.Length() > 1) {
+ const ast::IfStatement* i = nullptr;
+ if (new_stmts.Back().Length() > 0) {
+ i = b.If(b.Not(b.Expr(flag)), b.Block(new_stmts.Back()));
+ }
+ new_stmts.Pop();
+ if (i) {
+ new_stmts.Back().Push(i);
+ }
+ }
+
+ // Insert the final return statement at the end of the function body.
+ if (block == function->body && retval.IsValid()) {
+ new_stmts[0].Push(b.Return(b.Expr(retval)));
+ }
+
+ ctx.Replace(block, b.Block(new_stmts[0]));
+ }
+};
+
+} // namespace
+
+void MergeReturn::Run(CloneContext& ctx, const DataMap&, DataMap&) const {
+ for (auto* func : ctx.src->AST().Functions()) {
+ if (!NeedsTransform(ctx.src, func)) {
+ continue;
+ }
+
+ State state(ctx, func);
+ state.ProcessStatement(func->body);
+ }
+
+ ctx.Clone();
+}
+
+} // namespace tint::transform
diff --git a/src/tint/transform/merge_return.h b/src/tint/transform/merge_return.h
new file mode 100644
index 0000000..1334a5c
--- /dev/null
+++ b/src/tint/transform/merge_return.h
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_TRANSFORM_MERGE_RETURN_H_
+#define SRC_TINT_TRANSFORM_MERGE_RETURN_H_
+
+#include "src/tint/transform/transform.h"
+
+namespace tint::transform {
+
+/// Merge return statements into a single return at the end of the function.
+class MergeReturn final : public Castable<MergeReturn, Transform> {
+ public:
+ /// Constructor
+ MergeReturn();
+ /// Destructor
+ ~MergeReturn() override;
+
+ /// @param program the program to inspect
+ /// @param data optional extra transform-specific input data
+ /// @returns true if this transform should be run for the given program
+ bool ShouldRun(const Program* program, const DataMap& data = {}) const override;
+
+ protected:
+ /// Runs the transform using the CloneContext built for transforming a
+ /// program. Run() is responsible for calling Clone() on the CloneContext.
+ /// @param ctx the CloneContext primed with the input program and
+ /// ProgramBuilder
+ /// @param inputs optional extra transform-specific input data
+ /// @param outputs optional extra transform-specific output data
+ void Run(CloneContext& ctx, const DataMap& inputs, DataMap& outputs) const override;
+};
+
+} // namespace tint::transform
+
+#endif // SRC_TINT_TRANSFORM_MERGE_RETURN_H_
diff --git a/src/tint/transform/merge_return_test.cc b/src/tint/transform/merge_return_test.cc
new file mode 100644
index 0000000..fb2377d
--- /dev/null
+++ b/src/tint/transform/merge_return_test.cc
@@ -0,0 +1,862 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/transform/merge_return.h"
+
+#include <utility>
+
+#include "src/tint/transform/test_helper.h"
+
+namespace tint::transform {
+namespace {
+
+using MergeReturnTest = TransformTest;
+
+TEST_F(MergeReturnTest, ShouldRunEmptyModule) {
+ auto* src = R"()";
+
+ EXPECT_FALSE(ShouldRun<MergeReturn>(src));
+}
+
+TEST_F(MergeReturnTest, ShouldRunOnlyEntryPoints) {
+ auto* src = R"(
+@fragment
+fn foo() {}
+
+@compute @workgroup_size(1)
+fn bar() {}
+)";
+
+ EXPECT_FALSE(ShouldRun<MergeReturn>(src));
+}
+
+TEST_F(MergeReturnTest, ShouldRunUserFuncNoReturn) {
+ auto* src = R"(
+fn foo() {}
+
+@compute @workgroup_size(1)
+fn bar() {
+ foo();
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<MergeReturn>(src));
+}
+
+TEST_F(MergeReturnTest, ShouldRunUserFuncSingleReturn) {
+ auto* src = R"(
+fn foo() -> i32 {
+ return 42;
+}
+
+@compute @workgroup_size(1)
+fn bar() {
+ foo();
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<MergeReturn>(src));
+}
+
+TEST_F(MergeReturnTest, ShouldRunUserFuncMultipleReturn) {
+ auto* src = R"(
+fn foo(x : i32) -> i32 {
+ if (x == 0) {
+ return 42;
+ }
+ return 0;
+}
+
+@compute @workgroup_size(1)
+fn bar() {
+ foo(7);
+}
+)";
+
+ EXPECT_TRUE(ShouldRun<MergeReturn>(src));
+}
+
+TEST_F(MergeReturnTest, EmptyModule) {
+ auto* src = R"()";
+
+ auto* expect = src;
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, SingleExitPoint) {
+ auto* src = R"(
+fn foo(x : i32) -> i32 {
+ var retval = 0;
+ if ((x == 0)) {
+ retval = 42;
+ } else {
+ retval = 7;
+ }
+ return retval;
+}
+)";
+
+ auto* expect = src;
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, Basic) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+fn foo() {
+ if (non_uniform_global == 0) {
+ return;
+ } else {
+ return;
+ }
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+fn foo() {
+ var tint_return_flag : bool;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ }
+ } else {
+ {
+ tint_return_flag = true;
+ }
+ }
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, BasicRetval) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+fn foo() -> i32 {
+ if (non_uniform_global == 0) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ }
+ } else {
+ {
+ tint_return_flag = true;
+ tint_return_value = 2;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, CodeAfterIf) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ if (non_uniform_global == 0) {
+ return 1;
+ }
+ bar = 42;
+ return 2;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ }
+ }
+ if (!(tint_return_flag)) {
+ bar = 42;
+ {
+ tint_return_flag = true;
+ tint_return_value = 2;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, SequenceOfConditionalReturns) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ if (non_uniform_global == 0) {
+ return 1;
+ }
+ bar = 42;
+ if (non_uniform_global == 1) {
+ return 2;
+ }
+ bar = 43;
+ if (non_uniform_global == 2) {
+ return 3;
+ }
+ bar = 44;
+ if (non_uniform_global == 3) {
+ return 4;
+ }
+ bar = 45;
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ }
+ }
+ if (!(tint_return_flag)) {
+ bar = 42;
+ if ((non_uniform_global == 1)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 2;
+ }
+ }
+ if (!(tint_return_flag)) {
+ bar = 43;
+ if ((non_uniform_global == 2)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 3;
+ }
+ }
+ if (!(tint_return_flag)) {
+ bar = 44;
+ if ((non_uniform_global == 3)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 4;
+ }
+ }
+ if (!(tint_return_flag)) {
+ bar = 45;
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ }
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, NestedConditionals) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ if (non_uniform_global == 0) {
+ if (true) {
+ return 1;
+ } else {
+ return 2;
+ }
+ } else {
+ if (true) {
+ bar = 42;
+ } else if (false) {
+ return 3;
+ } else if (true) {
+ return 4;
+ }
+ return 5;
+ }
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ if ((non_uniform_global == 0)) {
+ if (true) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ }
+ } else {
+ {
+ tint_return_flag = true;
+ tint_return_value = 2;
+ }
+ }
+ } else {
+ if (true) {
+ bar = 42;
+ } else if (false) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 3;
+ }
+ } else if (true) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 4;
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 5;
+ }
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, Loop) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var i = 0;
+ loop {
+ bar = i;
+ if (non_uniform_global == 0) {
+ return non_uniform_global;
+ }
+ if (i >= 10) {
+ break;
+ }
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ var i = 0;
+ loop {
+ bar = i;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = non_uniform_global;
+ break;
+ }
+ }
+ if ((i >= 10)) {
+ break;
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, NestedLoop) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var i = 0;
+ loop {
+ loop {
+ bar = i;
+ if (non_uniform_global == 0) {
+ return non_uniform_global;
+ }
+ if (i >= 10) {
+ break;
+ }
+ }
+ bar = 10;
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ var i = 0;
+ loop {
+ loop {
+ bar = i;
+ if ((non_uniform_global == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = non_uniform_global;
+ break;
+ }
+ }
+ if ((i >= 10)) {
+ break;
+ }
+ }
+ if (tint_return_flag) {
+ break;
+ }
+ bar = 10;
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, NestedLoopAlwaysReturns) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var i = 0;
+ loop {
+ bar = i;
+ loop {
+ return non_uniform_global;
+ }
+ if (i == 10) {
+ break;
+ }
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ var i = 0;
+ loop {
+ bar = i;
+ loop {
+ {
+ tint_return_flag = true;
+ tint_return_value = non_uniform_global;
+ break;
+ }
+ }
+ break;
+ if ((i == 10)) {
+ break;
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, ForLoop) {
+ auto* src = R"(
+var<private> non_uniform_global : array<i32, 10>;
+
+fn foo() -> i32 {
+ for (var i = 0; i < 10; i++) {
+ if (non_uniform_global[i] == 0) {
+ return i;
+ }
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : array<i32, 10>;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ for(var i = 0; (i < 10); i++) {
+ if ((non_uniform_global[i] == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = i;
+ break;
+ }
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, WhileLoop) {
+ auto* src = R"(
+var<private> non_uniform_global : array<i32, 10>;
+
+fn foo() -> i32 {
+ var i = 0;
+ while (i < 10) {
+ if (non_uniform_global[i] == 0) {
+ return i;
+ }
+ i++;
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : array<i32, 10>;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ var i = 0;
+ while((i < 10)) {
+ if ((non_uniform_global[i] == 0)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = i;
+ break;
+ }
+ }
+ i++;
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, Switch) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ switch (non_uniform_global) {
+ case 0 {
+ return 0;
+ }
+ case 1 {
+ if (false) {
+ return 1;
+ }
+ bar = 6;
+ fallthrough;
+ }
+ case 2 {
+ bar = 5;
+ }
+ default {
+ return 42;
+ }
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ switch(non_uniform_global) {
+ case 0: {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ break;
+ }
+ }
+ case 1: {
+ if (false) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ break;
+ }
+ }
+ bar = 6;
+ fallthrough;
+ }
+ case 2: {
+ bar = 5;
+ }
+ default: {
+ {
+ tint_return_flag = true;
+ tint_return_value = 42;
+ break;
+ }
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(MergeReturnTest, ComplexNesting) {
+ auto* src = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ for (var i = 0; i < 10; i++) {
+ bar = i;
+
+ switch (non_uniform_global) {
+ case 0 {
+ return 0;
+ }
+ case 1 {
+ if (false) {
+ loop {
+ if (i == non_uniform_global) {
+ return 1;
+ }
+ continuing {
+ bar++;
+ break if (i == 7);
+ }
+ }
+ }
+ bar = 0;
+ }
+ default {
+ return 42;
+ }
+ }
+ }
+ return 0;
+}
+)";
+
+ auto* expect = R"(
+var<private> non_uniform_global : i32;
+
+var<private> bar : i32;
+
+fn foo() -> i32 {
+ var tint_return_flag : bool;
+ var tint_return_value : i32;
+ for(var i = 0; (i < 10); i++) {
+ bar = i;
+ switch(non_uniform_global) {
+ case 0: {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ break;
+ }
+ }
+ case 1: {
+ if (false) {
+ loop {
+ if ((i == non_uniform_global)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 1;
+ break;
+ }
+ }
+
+ continuing {
+ bar++;
+ break if (i == 7);
+ }
+ }
+ if (tint_return_flag) {
+ break;
+ }
+ }
+ bar = 0;
+ }
+ default: {
+ {
+ tint_return_flag = true;
+ tint_return_value = 42;
+ break;
+ }
+ }
+ }
+ if (tint_return_flag) {
+ break;
+ }
+ }
+ if (!(tint_return_flag)) {
+ {
+ tint_return_flag = true;
+ tint_return_value = 0;
+ }
+ }
+ return tint_return_value;
+}
+)";
+
+ auto got = Run<MergeReturn>(src);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+} // namespace
+} // namespace tint::transform
diff --git a/src/tint/transform/multiplanar_external_texture.cc b/src/tint/transform/multiplanar_external_texture.cc
index bc0d317..002b858 100644
--- a/src/tint/transform/multiplanar_external_texture.cc
+++ b/src/tint/transform/multiplanar_external_texture.cc
@@ -58,8 +58,8 @@
/// Symbol for the ExternalTextureParams struct
Symbol params_struct_sym;
- /// Symbol for the textureLoadExternal function
- Symbol texture_load_external_sym;
+ /// Symbol for the textureLoadExternal functions
+ utils::Hashmap<const sem::CallTarget*, Symbol, 2> texture_load_external_fns;
/// Symbol for the textureSampleExternal function
Symbol texture_sample_external_sym;
@@ -199,7 +199,7 @@
switch (builtin->Type()) {
case sem::BuiltinType::kTextureLoad:
- return createTextureLoad(expr, syms);
+ return createTextureLoad(call, syms);
case sem::BuiltinType::kTextureSampleLevel:
return createTextureSampleLevel(expr, syms);
case sem::BuiltinType::kTextureSampleBaseClampToEdge:
@@ -307,11 +307,11 @@
case sem::BuiltinType::kTextureSampleLevel:
// TODO(crbug.com/tint/1671): DEPRECATED
// textureSampleLevel(plane0, smp, coord, 0.0);
- single_plane_call = b.Call("textureSampleLevel", "plane0", "smp", "coord", 0_f);
+ single_plane_call = b.Call("textureSampleLevel", "plane0", "smp", "coord", 0_a);
// textureSampleLevel(plane0, smp, coord, 0.0);
- plane_0_call = b.Call("textureSampleLevel", "plane0", "smp", "coord", 0_f);
+ plane_0_call = b.Call("textureSampleLevel", "plane0", "smp", "coord", 0_a);
// textureSampleLevel(plane1, smp, coord, 0.0);
- plane_1_call = b.Call("textureSampleLevel", "plane1", "smp", "coord", 0_f);
+ plane_1_call = b.Call("textureSampleLevel", "plane1", "smp", "coord", 0_a);
break;
case sem::BuiltinType::kTextureSampleBaseClampToEdge:
stmts.Push(b.Decl(b.Let(
@@ -333,19 +333,19 @@
// textureSampleLevel(plane0, smp, plane0_clamped, 0.0);
single_plane_call =
- b.Call("textureSampleLevel", "plane0", "smp", "plane0_clamped", 0_f);
+ b.Call("textureSampleLevel", "plane0", "smp", "plane0_clamped", 0_a);
// textureSampleLevel(plane0, smp, plane0_clamped, 0.0);
- plane_0_call = b.Call("textureSampleLevel", "plane0", "smp", "plane0_clamped", 0_f);
+ plane_0_call = b.Call("textureSampleLevel", "plane0", "smp", "plane0_clamped", 0_a);
// textureSampleLevel(plane1, smp, plane1_clamped, 0.0);
- plane_1_call = b.Call("textureSampleLevel", "plane1", "smp", "plane1_clamped", 0_f);
+ plane_1_call = b.Call("textureSampleLevel", "plane1", "smp", "plane1_clamped", 0_a);
break;
case sem::BuiltinType::kTextureLoad:
// textureLoad(plane0, coord, 0);
- single_plane_call = b.Call("textureLoad", "plane0", "coord", 0_i);
+ single_plane_call = b.Call("textureLoad", "plane0", "coord", 0_a);
// textureLoad(plane0, coord, 0);
- plane_0_call = b.Call("textureLoad", "plane0", "coord", 0_i);
+ plane_0_call = b.Call("textureLoad", "plane0", "coord", 0_a);
// textureLoad(plane1, coord, 0);
- plane_1_call = b.Call("textureLoad", "plane1", "coord", 0_i);
+ plane_1_call = b.Call("textureLoad", "plane1", "coord", 0_a);
break;
default:
TINT_ICE(Transform, b.Diagnostics()) << "unhandled builtin: " << call_type;
@@ -356,7 +356,7 @@
// if ((params.numPlanes == 1u))
stmts.Push(
- b.If(b.Equal(b.MemberAccessor("params", "numPlanes"), b.Expr(1_u)),
+ b.If(b.Equal(b.MemberAccessor("params", "numPlanes"), b.Expr(1_a)),
b.Block(
// color = textureLoad(plane0, coord, 0).rgb;
b.Assign("color", b.MemberAccessor(single_plane_call, "rgb"))),
@@ -365,12 +365,12 @@
// params.yuvToRgbConversionMatrix;
b.Assign("color",
b.Mul(b.vec4<f32>(b.MemberAccessor(plane_0_call, "r"),
- b.MemberAccessor(plane_1_call, "rg"), 1_f),
+ b.MemberAccessor(plane_1_call, "rg"), 1_a),
b.MemberAccessor("params", "yuvToRgbConversionMatrix")))))));
// if (params.doYuvToRgbConversionOnly == 0u)
stmts.Push(
- b.If(b.Equal(b.MemberAccessor("params", "doYuvToRgbConversionOnly"), b.Expr(0_u)),
+ b.If(b.Equal(b.MemberAccessor("params", "doYuvToRgbConversionOnly"), b.Expr(0_a)),
b.Block(
// color = gammaConversion(color, gammaDecodeParams);
b.Assign("color", b.Call("gammaCorrection", "color",
@@ -383,7 +383,7 @@
b.MemberAccessor("params", "gammaEncodeParams"))))));
// return vec4<f32>(color, 1.f);
- stmts.Push(b.Return(b.vec4<f32>("color", 1_f)));
+ stmts.Push(b.Return(b.vec4<f32>("color", 1_a)));
return stmts;
}
@@ -485,44 +485,48 @@
}
/// Creates the textureLoadExternal function if needed and returns a call expression to it.
- /// @param expr the call expression being transformed
+ /// @param call the call expression being transformed
/// @param syms the expanded symbols to be used in the new call
/// @returns a call expression to textureLoadExternal
- const ast::CallExpression* createTextureLoad(const ast::CallExpression* expr,
- NewBindingSymbols syms) {
- const ast::Expression* plane_0_binding_param = ctx.Clone(expr->args[0]);
-
- if (expr->args.Length() != 2) {
+ const ast::CallExpression* createTextureLoad(const sem::Call* call, NewBindingSymbols syms) {
+ if (call->Arguments().Length() != 2) {
TINT_ICE(Transform, b.Diagnostics())
- << "expected textureLoad call with a texture_external "
- "to have 2 parameters, found "
- << expr->args.Length() << " parameters";
+ << "expected textureLoad call with a texture_external to have 2 arguments, found "
+ << call->Arguments().Length() << " arguments";
}
- // TextureLoadExternal calls the gammaCorrection function, so ensure it
- // exists.
+ auto& args = call->Arguments();
+
+ // TextureLoadExternal calls the gammaCorrection function, so ensure it exists.
if (!gamma_correction_sym.IsValid()) {
createGammaCorrectionFn();
}
- if (!texture_load_external_sym.IsValid()) {
- texture_load_external_sym = b.Symbols().New("textureLoadExternal");
+ auto texture_load_external_sym = texture_load_external_fns.GetOrCreate(call->Target(), [&] {
+ auto& sig = call->Target()->Signature();
+ auto* coord_ty = sig.Parameter(sem::ParameterUsage::kCoords)->Type();
- // Emit the textureLoadExternal function.
+ auto name = b.Symbols().New("textureLoadExternal");
+
+ // Emit the textureLoadExternal() function.
b.Func(
- texture_load_external_sym,
+ name,
utils::Vector{
b.Param("plane0", b.ty.sampled_texture(ast::TextureDimension::k2d, b.ty.f32())),
b.Param("plane1", b.ty.sampled_texture(ast::TextureDimension::k2d, b.ty.f32())),
- b.Param("coord", b.ty.vec2(b.ty.i32())),
+ b.Param("coord", CreateASTTypeFor(ctx, coord_ty)),
b.Param("params", b.ty.type_name(params_struct_sym)),
},
b.ty.vec4(b.ty.f32()), //
buildTextureBuiltinBody(sem::BuiltinType::kTextureLoad));
- }
- return b.Call(texture_load_external_sym, plane_0_binding_param, syms.plane_1,
- ctx.Clone(expr->args[1]), syms.params);
+ return name;
+ });
+
+ auto plane_0_binding_arg = ctx.Clone(args[0]->Declaration());
+
+ return b.Call(texture_load_external_sym, plane_0_binding_arg, syms.plane_1,
+ ctx.Clone(args[1]->Declaration()), syms.params);
}
};
diff --git a/src/tint/transform/multiplanar_external_texture_test.cc b/src/tint/transform/multiplanar_external_texture_test.cc
index 778f7db..dacbb1e 100644
--- a/src/tint/transform/multiplanar_external_texture_test.cc
+++ b/src/tint/transform/multiplanar_external_texture_test.cc
@@ -138,7 +138,7 @@
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- var dim : vec2<i32>;
+ var dim : vec2<u32>;
dim = textureDimensions(ext_tex);
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
@@ -173,7 +173,7 @@
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- var dim : vec2<i32>;
+ var dim : vec2<u32>;
dim = textureDimensions(ext_tex);
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
@@ -191,7 +191,7 @@
auto* src = R"(
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- var dim : vec2<i32>;
+ var dim : vec2<u32>;
dim = textureDimensions(ext_tex);
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
@@ -226,7 +226,7 @@
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- var dim : vec2<i32>;
+ var dim : vec2<u32>;
dim = textureDimensions(ext_tex);
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
@@ -291,17 +291,17 @@
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, coord, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0.0f).r, textureSampleLevel(plane1, smp, coord, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0).r, textureSampleLevel(plane1, smp, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -373,17 +373,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -445,17 +445,17 @@
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, coord, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0.0f).r, textureSampleLevel(plane1, smp, coord, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0).r, textureSampleLevel(plane1, smp, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -527,17 +527,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -564,7 +564,9 @@
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- return textureLoad(ext_tex, vec2<i32>(1, 1));
+ var signed = textureLoad(ext_tex, vec2<i32>(1));
+ var unsigned = textureLoad(ext_tex, vec2<u32>(1));
+ return signed + unsigned;
}
)";
@@ -604,22 +606,39 @@
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
+}
+
+fn textureLoadExternal_1(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<u32>, params : ExternalTextureParams) -> vec4<f32> {
+ var color : vec3<f32>;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
+ } else {
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4<f32>(color, 1);
}
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- return textureLoadExternal(ext_tex, ext_tex_plane_1, vec2<i32>(1, 1), ext_tex_params);
+ var signed = textureLoadExternal(ext_tex, ext_tex_plane_1, vec2<i32>(1), ext_tex_params);
+ var unsigned = textureLoadExternal_1(ext_tex, ext_tex_plane_1, vec2<u32>(1), ext_tex_params);
+ return (signed + unsigned);
}
)";
@@ -635,7 +654,9 @@
auto* src = R"(
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- return textureLoad(ext_tex, vec2<i32>(1, 1));
+ var signed = textureLoad(ext_tex, vec2<i32>(1));
+ var unsigned = textureLoad(ext_tex, vec2<u32>(1));
+ return signed + unsigned;
}
@group(0) @binding(0) var ext_tex : texture_external;
@@ -675,22 +696,39 @@
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
+}
+
+fn textureLoadExternal_1(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<u32>, params : ExternalTextureParams) -> vec4<f32> {
+ var color : vec3<f32>;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
+ } else {
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4<f32>(color, 1);
}
@fragment
fn main(@builtin(position) coord : vec4<f32>) -> @location(0) vec4<f32> {
- return textureLoadExternal(ext_tex, ext_tex_plane_1, vec2<i32>(1, 1), ext_tex_params);
+ var signed = textureLoadExternal(ext_tex, ext_tex_plane_1, vec2<i32>(1), ext_tex_params);
+ var unsigned = textureLoadExternal_1(ext_tex, ext_tex_plane_1, vec2<u32>(1), ext_tex_params);
+ return (signed + unsigned);
}
@group(0) @binding(0) var ext_tex : texture_2d<f32>;
@@ -753,32 +791,32 @@
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, coord, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0.0f).r, textureSampleLevel(plane1, smp, coord, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0).r, textureSampleLevel(plane1, smp, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -850,32 +888,32 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -937,32 +975,32 @@
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, coord, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0.0f).r, textureSampleLevel(plane1, smp, coord, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0).r, textureSampleLevel(plane1, smp, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -1034,32 +1072,32 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn textureLoadExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, coord : vec2<i32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureLoad(plane0, coord, 0i).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureLoad(plane0, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureLoad(plane0, coord, 0i).r, textureLoad(plane1, coord, 0i).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureLoad(plane0, coord, 0).r, textureLoad(plane1, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -1150,17 +1188,17 @@
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, coord, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, coord, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0.0f).r, textureSampleLevel(plane1, smp, coord, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, coord, 0).r, textureSampleLevel(plane1, smp, coord, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -1260,17 +1298,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
@fragment
@@ -1347,17 +1385,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
@@ -1443,17 +1481,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
@@ -1529,17 +1567,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(s : sampler, t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams) {
@@ -1626,17 +1664,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_2 : texture_2d<f32>, ext_tex_params_2 : ExternalTextureParams, s : sampler, t2 : texture_2d<f32>, ext_tex_plane_1_3 : texture_2d<f32>, ext_tex_params_3 : ExternalTextureParams) {
@@ -1733,17 +1771,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_2 : texture_2d<f32>, ext_tex_params_2 : ExternalTextureParams, s : sampler, t2 : texture_2d<f32>, ext_tex_plane_1_3 : texture_2d<f32>, ext_tex_params_3 : ExternalTextureParams) {
@@ -1827,17 +1865,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn nested(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
@@ -1926,17 +1964,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn nested(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
@@ -1968,7 +2006,7 @@
// even if there's no external texture declared at module scope.
TEST_F(MultiplanarExternalTextureTest, ExternalTexturePassedAsParamWithoutGlobalDecl) {
auto* src = R"(
-fn f(ext_tex : texture_external) -> vec2<i32> {
+fn f(ext_tex : texture_external) -> vec2<u32> {
return textureDimensions(ext_tex);
}
)";
@@ -1994,7 +2032,7 @@
gamutConversionMatrix : mat3x3<f32>,
}
-fn f(ext_tex : texture_2d<f32>, ext_tex_plane_1 : texture_2d<f32>, ext_tex_params : ExternalTextureParams) -> vec2<i32> {
+fn f(ext_tex : texture_2d<f32>, ext_tex_plane_1 : texture_2d<f32>, ext_tex_params : ExternalTextureParams) -> vec2<u32> {
return textureDimensions(ext_tex);
}
)";
@@ -2066,17 +2104,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
@@ -2163,17 +2201,17 @@
let plane1_half_texel = (vec2<f32>(0.5) / plane1_dims);
let plane1_clamped = clamp(coord, plane1_half_texel, (1 - plane1_half_texel));
var color : vec3<f32>;
- if ((params.numPlanes == 1u)) {
- color = textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).rgb;
+ if ((params.numPlanes == 1)) {
+ color = textureSampleLevel(plane0, smp, plane0_clamped, 0).rgb;
} else {
- color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0.0f).r, textureSampleLevel(plane1, smp, plane1_clamped, 0.0f).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ color = (vec4<f32>(textureSampleLevel(plane0, smp, plane0_clamped, 0).r, textureSampleLevel(plane1, smp, plane1_clamped, 0).rg, 1) * params.yuvToRgbConversionMatrix);
}
- if ((params.doYuvToRgbConversionOnly == 0u)) {
+ if ((params.doYuvToRgbConversionOnly == 0)) {
color = gammaCorrection(color, params.gammaDecodeParams);
color = (params.gamutConversionMatrix * color);
color = gammaCorrection(color, params.gammaEncodeParams);
}
- return vec4<f32>(color, 1.0f);
+ return vec4<f32>(color, 1);
}
fn f(t : texture_2d<f32>, ext_tex_plane_1_1 : texture_2d<f32>, ext_tex_params_1 : ExternalTextureParams, s : sampler) {
diff --git a/src/tint/transform/packed_vec3.cc b/src/tint/transform/packed_vec3.cc
new file mode 100644
index 0000000..dde5aca
--- /dev/null
+++ b/src/tint/transform/packed_vec3.cc
@@ -0,0 +1,194 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/transform/packed_vec3.h"
+
+#include <algorithm>
+#include <string>
+#include <utility>
+
+#include "src/tint/program_builder.h"
+#include "src/tint/sem/index_accessor_expression.h"
+#include "src/tint/sem/member_accessor_expression.h"
+#include "src/tint/sem/statement.h"
+#include "src/tint/sem/variable.h"
+#include "src/tint/utils/hashmap.h"
+#include "src/tint/utils/hashset.h"
+
+TINT_INSTANTIATE_TYPEINFO(tint::transform::PackedVec3);
+TINT_INSTANTIATE_TYPEINFO(tint::transform::PackedVec3::Attribute);
+
+using namespace tint::number_suffixes; // NOLINT
+
+namespace tint::transform {
+
+/// The PIMPL state for the PackedVec3 transform
+struct PackedVec3::State {
+ /// Constructor
+ /// @param c the CloneContext
+ explicit State(CloneContext& c) : ctx(c) {}
+
+ /// Runs the transform
+ void Run() {
+ // Packed vec3<T> struct members
+ utils::Hashset<const sem::StructMember*, 8> members;
+
+ // Find all the packed vector struct members, and apply the @internal(packed_vector)
+ // attribute.
+ for (auto* decl : ctx.src->AST().GlobalDeclarations()) {
+ if (auto* str = sem.Get<sem::Struct>(decl)) {
+ if (str->IsHostShareable()) {
+ for (auto* member : str->Members()) {
+ if (auto* vec = member->Type()->As<sem::Vector>()) {
+ if (vec->Width() == 3) {
+ members.Add(member);
+
+ // Apply the PackedVec3::Attribute to the member
+ auto* member_decl = member->Declaration();
+ auto name = ctx.Clone(member_decl->symbol);
+ auto* type = ctx.Clone(member_decl->type);
+ utils::Vector<const ast::Attribute*, 4> attrs{
+ b.ASTNodes().Create<Attribute>(b.ID(), b.AllocateNodeID()),
+ };
+ for (auto* attr : member_decl->attributes) {
+ attrs.Push(ctx.Clone(attr));
+ }
+ ctx.Replace(member_decl, b.Member(name, type, std::move(attrs)));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Walk the nodes, starting with the most deeply nested, finding all the AST expressions
+ // that load a whole packed vector (not a scalar / swizzle of the vector).
+ utils::Hashset<const sem::Expression*, 16> refs;
+ for (auto* node : ctx.src->ASTNodes().Objects()) {
+ Switch(
+ sem.Get(node), //
+ [&](const sem::StructMemberAccess* access) {
+ if (members.Contains(access->Member())) {
+ // Access to a packed vector member. Seed the expression tracking.
+ refs.Add(access);
+ }
+ },
+ [&](const sem::IndexAccessorExpression* access) {
+ // Not loading a whole packed vector. Ignore.
+ refs.Remove(access->Object());
+ },
+ [&](const sem::Swizzle* access) {
+ // Not loading a whole packed vector. Ignore.
+ refs.Remove(access->Object());
+ },
+ [&](const sem::VariableUser* user) {
+ auto* v = user->Variable();
+ if (v->Declaration()->Is<ast::Let>() && // if variable is let...
+ v->Type()->Is<sem::Pointer>() && // and let is a pointer...
+ refs.Contains(v->Initializer())) { // and pointer is to a packed vector...
+ refs.Add(user); // then propagate tracking to pointer usage
+ }
+ },
+ [&](const sem::Expression* expr) {
+ if (auto* unary = expr->Declaration()->As<ast::UnaryOpExpression>()) {
+ if (unary->op == ast::UnaryOp::kAddressOf ||
+ unary->op == ast::UnaryOp::kIndirection) {
+ // Memory access on the packed vector. Track these.
+ auto* inner = sem.Get(unary->expr);
+ if (refs.Remove(inner)) {
+ refs.Add(expr);
+ }
+ }
+ // Note: non-memory ops (e.g. '-') are ignored, leaving any tracked
+ // reference at the inner expression, so we'd cast, then apply the unary op.
+ }
+ },
+ [&](const sem::Statement* e) {
+ if (auto* assign = e->Declaration()->As<ast::AssignmentStatement>()) {
+ // We don't want to cast packed_vectors if they're being assigned to.
+ refs.Remove(sem.Get(assign->lhs));
+ }
+ });
+ }
+
+ // Wrap the load expressions with a cast to the unpacked type.
+ utils::Hashmap<const sem::Vector*, Symbol, 3> unpack_fns;
+ for (auto* ref : refs) {
+ // ref is either a packed vec3 that needs casting, or a pointer to a vec3 which we just
+ // leave alone.
+ if (auto* vec_ty = ref->Type()->UnwrapRef()->As<sem::Vector>()) {
+ auto* expr = ref->Declaration();
+ ctx.Replace(expr, [this, vec_ty, expr] { //
+ auto* packed = ctx.CloneWithoutTransform(expr);
+ return b.Construct(CreateASTTypeFor(ctx, vec_ty), packed);
+ });
+ }
+ }
+
+ ctx.Clone();
+ }
+
+ /// @returns true if this transform should be run for the given program
+ /// @param program the program to inspect
+ static bool ShouldRun(const Program* program) {
+ for (auto* decl : program->AST().GlobalDeclarations()) {
+ if (auto* str = program->Sem().Get<sem::Struct>(decl)) {
+ if (str->IsHostShareable()) {
+ for (auto* member : str->Members()) {
+ if (auto* vec = member->Type()->As<sem::Vector>()) {
+ if (vec->Width() == 3) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ private:
+ /// The clone context
+ CloneContext& ctx;
+ /// Alias to the semantic info in ctx.src
+ const sem::Info& sem = ctx.src->Sem();
+ /// Alias to the symbols in ctx.src
+ const SymbolTable& sym = ctx.src->Symbols();
+ /// Alias to the ctx.dst program builder
+ ProgramBuilder& b = *ctx.dst;
+};
+
+PackedVec3::Attribute::Attribute(ProgramID pid, ast::NodeID nid) : Base(pid, nid) {}
+PackedVec3::Attribute::~Attribute() = default;
+
+const PackedVec3::Attribute* PackedVec3::Attribute::Clone(CloneContext* ctx) const {
+ return ctx->dst->ASTNodes().Create<Attribute>(ctx->dst->ID(), ctx->dst->AllocateNodeID());
+}
+
+std::string PackedVec3::Attribute::InternalName() const {
+ return "packed_vector";
+}
+
+PackedVec3::PackedVec3() = default;
+PackedVec3::~PackedVec3() = default;
+
+bool PackedVec3::ShouldRun(const Program* program, const DataMap&) const {
+ return State::ShouldRun(program);
+}
+
+void PackedVec3::Run(CloneContext& ctx, const DataMap&, DataMap&) const {
+ State(ctx).Run();
+}
+
+} // namespace tint::transform
diff --git a/src/tint/transform/packed_vec3.h b/src/tint/transform/packed_vec3.h
new file mode 100644
index 0000000..9d899cb
--- /dev/null
+++ b/src/tint/transform/packed_vec3.h
@@ -0,0 +1,78 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_TINT_TRANSFORM_PACKED_VEC3_H_
+#define SRC_TINT_TRANSFORM_PACKED_VEC3_H_
+
+#include <string>
+
+#include "src/tint/ast/internal_attribute.h"
+#include "src/tint/transform/transform.h"
+
+namespace tint::transform {
+
+/// A transform to be used by the MSL backend which will:
+/// * Apply the `@internal('packed_vector')` attribute (PackedVec3::Attribute) to all host-sharable
+/// structure members that have a vec3<T> type.
+/// * Cast all direct (not sub-accessed) loads of these packed vectors to the 'unpacked' vec3<T>
+/// type before usage.
+///
+/// This transform papers over overload holes in the MSL standard library where an MSL
+/// `packed_vector` type cannot be interchangable used as a regular `vec` type.
+class PackedVec3 final : public Castable<PackedVec3, Transform> {
+ public:
+ /// Attribute is the attribute applied to padded vector structure members.
+ class Attribute final : public Castable<Attribute, ast::InternalAttribute> {
+ public:
+ /// Constructor
+ /// @param pid the identifier of the program that owns this node
+ /// @param nid the unique node identifier
+ Attribute(ProgramID pid, ast::NodeID nid);
+ /// Destructor
+ ~Attribute() override;
+
+ /// @returns "packed_vector".
+ std::string InternalName() const override;
+
+ /// Performs a deep clone of this object using the CloneContext `ctx`.
+ /// @param ctx the clone context
+ /// @return the newly cloned object
+ const Attribute* Clone(CloneContext* ctx) const override;
+ };
+
+ /// Constructor
+ PackedVec3();
+ /// Destructor
+ ~PackedVec3() override;
+
+ /// @param program the program to inspect
+ /// @param data optional extra transform-specific input data
+ /// @returns true if this transform should be run for the given program
+ bool ShouldRun(const Program* program, const DataMap& data = {}) const override;
+
+ private:
+ struct State;
+
+ /// Runs the transform using the CloneContext built for transforming a
+ /// program. Run() is responsible for calling Clone() on the CloneContext.
+ /// @param ctx the CloneContext primed with the input program and
+ /// ProgramBuilder
+ /// @param inputs optional extra transform-specific input data
+ /// @param outputs optional extra transform-specific output data
+ void Run(CloneContext& ctx, const DataMap& inputs, DataMap& outputs) const override;
+};
+
+} // namespace tint::transform
+
+#endif // SRC_TINT_TRANSFORM_PACKED_VEC3_H_
diff --git a/src/tint/transform/packed_vec3_test.cc b/src/tint/transform/packed_vec3_test.cc
new file mode 100644
index 0000000..0f5c92e
--- /dev/null
+++ b/src/tint/transform/packed_vec3_test.cc
@@ -0,0 +1,662 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/tint/transform/packed_vec3.h"
+
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "src/tint/transform/test_helper.h"
+#include "src/tint/utils/string.h"
+
+namespace tint::transform {
+namespace {
+
+using PackedVec3Test = TransformTest;
+
+TEST_F(PackedVec3Test, ShouldRun_EmptyModule) {
+ auto* src = R"()";
+
+ EXPECT_FALSE(ShouldRun<PackedVec3>(src));
+}
+
+TEST_F(PackedVec3Test, ShouldRun_NonHostSharableStruct) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+fn f() {
+ var v : S; // function address-space - not host sharable
+}
+)";
+
+ EXPECT_FALSE(ShouldRun<PackedVec3>(src));
+}
+
+TEST_F(PackedVec3Test, ShouldRun_Vec4Vec2) {
+ auto* src = R"(
+struct S {
+ v4 : vec4<f32>,
+ v2 : vec2<f32>,
+}
+
+@group(0) @binding(0) var<uniform> P : S; // Host sharable
+)";
+
+ EXPECT_FALSE(ShouldRun<PackedVec3>(src));
+}
+
+TEST_F(PackedVec3Test, ShouldRun_HostSharableStruct) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<uniform> P : S; // Host sharable
+)";
+
+ EXPECT_TRUE(ShouldRun<PackedVec3>(src));
+}
+
+TEST_F(PackedVec3Test, UniformAddressSpace) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<uniform> P : S;
+
+fn f() {
+ let x = P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<uniform> P : S;
+
+fn f() {
+ let x = vec3<f32>(P.v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, StorageAddressSpace) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = vec3<f32>(P.v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ExistingMemberAttributes) {
+ auto* src = R"(
+struct S {
+ @align(32) @size(64) v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector) @align(32) @size(64)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = vec3<f32>(P.v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, MultipleVectors) {
+ auto* src = R"(
+struct S {
+ v2_a : vec2<f32>,
+ v3_a : vec3<f32>,
+ v4_a : vec4<f32>,
+ v2_b : vec2<f32>,
+ v3_b : vec3<f32>,
+ v4_b : vec4<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let v2_a = P.v2_a;
+ let v3_a = P.v3_a;
+ let v4_a = P.v4_a;
+ let v2_b = P.v2_b;
+ let v3_b = P.v3_b;
+ let v4_b = P.v4_b;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ v2_a : vec2<f32>,
+ @internal(packed_vector)
+ v3_a : vec3<f32>,
+ v4_a : vec4<f32>,
+ v2_b : vec2<f32>,
+ @internal(packed_vector)
+ v3_b : vec3<f32>,
+ v4_b : vec4<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let v2_a = P.v2_a;
+ let v3_a = vec3<f32>(P.v3_a);
+ let v4_a = P.v4_a;
+ let v2_b = P.v2_b;
+ let v3_b = vec3<f32>(P.v3_b);
+ let v4_b = P.v4_b;
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, MixedAddressSpace) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ var f : S;
+ let x = f.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ var f : S;
+ let x = vec3<f32>(f.v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadMemberAccessChain) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v.yz.x;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v.yz.x;
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadVector) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = vec3<f32>(P.v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadIndexAccessor) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v[1];
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v[1];
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadViaStructPtrDirect) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = (*(&(*(&P)))).v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = vec3<f32>((*(&(*(&(P))))).v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadViaVectorPtrDirect) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = *(&(*(&(P.v))));
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = vec3<f32>(*(&(*(&(P.v)))));
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadViaStructPtrViaLet) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let p0 = &P;
+ let p1 = &(*(p0));
+ let a = (*p1).v;
+ let p2 = &(*(p1));
+ let b = (*p2).v;
+ let c = (*p2).v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let p0 = &(P);
+ let p1 = &(*(p0));
+ let a = vec3<f32>((*(p1)).v);
+ let p2 = &(*(p1));
+ let b = vec3<f32>((*(p2)).v);
+ let c = vec3<f32>((*(p2)).v);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadViaVectorPtrViaLet) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let p0 = &(P.v);
+ let p1 = &(*(p0));
+ let a = *p1;
+ let p2 = &(*(p1));
+ let b = *p2;
+ let c = *p2;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let p0 = &(P.v);
+ let p1 = &(*(p0));
+ let a = vec3<f32>(*(p1));
+ let p2 = &(*(p1));
+ let b = vec3<f32>(*(p2));
+ let c = vec3<f32>(*(p2));
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadUnaryOp) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = -P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = -(vec3<f32>(P.v));
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, ReadBinaryOp) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = P.v + P.v;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage> P : S;
+
+fn f() {
+ let x = (vec3<f32>(P.v) + vec3<f32>(P.v));
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, WriteVector) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v = vec3(1.23);
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v = vec3(1.23);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, WriteMemberAccess) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v.y = 1.23;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v.y = 1.23;
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+TEST_F(PackedVec3Test, WriteIndexAccessor) {
+ auto* src = R"(
+struct S {
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v[1] = 1.23;
+}
+)";
+
+ auto* expect = R"(
+struct S {
+ @internal(packed_vector)
+ v : vec3<f32>,
+}
+
+@group(0) @binding(0) var<storage, read_write> P : S;
+
+fn f() {
+ P.v[1] = 1.23;
+}
+)";
+
+ DataMap data;
+ auto got = Run<PackedVec3>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
+} // namespace
+} // namespace tint::transform
diff --git a/src/tint/transform/promote_side_effects_to_decl.cc b/src/tint/transform/promote_side_effects_to_decl.cc
index a913838..e36c416 100644
--- a/src/tint/transform/promote_side_effects_to_decl.cc
+++ b/src/tint/transform/promote_side_effects_to_decl.cc
@@ -281,11 +281,15 @@
if (var_user->ConstantValue()) {
return false;
}
- // Don't hoist read-only variables as they cannot receive
- // side-effects.
+ // Don't hoist read-only variables as they cannot receive side-effects.
if (var_user->Variable()->Access() == ast::Access::kRead) {
return false;
}
+ // Don't hoist textures / samplers as they can't be placed into a let, nor
+ // can they have side effects.
+ if (var_user->Variable()->Type()->IsAnyOf<sem::Texture, sem::Sampler>()) {
+ return false;
+ }
return true;
}
}
diff --git a/src/tint/transform/promote_side_effects_to_decl_test.cc b/src/tint/transform/promote_side_effects_to_decl_test.cc
index 899fcd8..f064834 100644
--- a/src/tint/transform/promote_side_effects_to_decl_test.cc
+++ b/src/tint/transform/promote_side_effects_to_decl_test.cc
@@ -4081,5 +4081,54 @@
EXPECT_EQ(expect, str(got));
}
+
+TEST_F(PromoteSideEffectsToDeclTest, TextureSamplerParameter) {
+ auto* src = R"(
+@group(0) @binding(0) var T : texture_2d<f32>;
+@group(0) @binding(1) var S : sampler;
+
+var<private> P : vec2<f32>;
+fn side_effects() -> vec2<f32> {
+ P += vec2(1.0);
+ return P;
+}
+
+fn f(t : texture_2d<f32>, s : sampler) -> vec4<f32> {
+ return textureSample(t, s, side_effects());
+}
+
+fn m() -> vec4<f32>{
+ return f(T, S);
+}
+)";
+
+ auto* expect = R"(
+@group(0) @binding(0) var T : texture_2d<f32>;
+
+@group(0) @binding(1) var S : sampler;
+
+var<private> P : vec2<f32>;
+
+fn side_effects() -> vec2<f32> {
+ P += vec2(1.0);
+ return P;
+}
+
+fn f(t : texture_2d<f32>, s : sampler) -> vec4<f32> {
+ let tint_symbol = side_effects();
+ return textureSample(t, s, tint_symbol);
+}
+
+fn m() -> vec4<f32> {
+ return f(T, S);
+}
+)";
+
+ DataMap data;
+ auto got = Run<PromoteSideEffectsToDecl>(src, data);
+
+ EXPECT_EQ(expect, str(got));
+}
+
} // namespace
} // namespace tint::transform
diff --git a/src/tint/transform/robustness.cc b/src/tint/transform/robustness.cc
index bac4344..a22f84f 100644
--- a/src/tint/transform/robustness.cc
+++ b/src/tint/transform/robustness.cc
@@ -166,6 +166,32 @@
auto* coords_arg = expr->args[static_cast<size_t>(coords_idx)];
auto* coords_ty = builtin->Parameters()[static_cast<size_t>(coords_idx)]->Type();
+ auto width_of = [&](const sem::Type* ty) {
+ if (auto* vec = ty->As<sem::Vector>()) {
+ return vec->Width();
+ }
+ return 1u;
+ };
+ auto scalar_or_vec_ty = [&](const ast::Type* scalar, uint32_t width) -> const ast::Type* {
+ if (width > 1) {
+ return b.ty.vec(scalar, width);
+ }
+ return scalar;
+ };
+ auto scalar_or_vec = [&](const ast::Expression* scalar,
+ uint32_t width) -> const ast::Expression* {
+ if (width > 1) {
+ return b.Construct(b.ty.vec(nullptr, width), scalar);
+ }
+ return scalar;
+ };
+ auto cast_to_signed = [&](const ast::Expression* val, uint32_t width) {
+ return b.Construct(scalar_or_vec_ty(b.ty.i32(), width), val);
+ };
+ auto cast_to_unsigned = [&](const ast::Expression* val, uint32_t width) {
+ return b.Construct(scalar_or_vec_ty(b.ty.u32(), width), val);
+ };
+
// If the level is provided, then we need to clamp this. As the level is
// used by textureDimensions() and the texture[Load|Store]() calls, we need
// to clamp both usages.
@@ -174,41 +200,68 @@
std::function<const ast::Expression*()> level_arg;
if (level_idx >= 0) {
level_arg = [&] {
- auto* arg = expr->args[static_cast<size_t>(level_idx)];
- auto* num_levels = b.Call("textureNumLevels", ctx.Clone(texture_arg));
- auto* zero = b.Expr(0_i);
- auto* max = ctx.dst->Sub(num_levels, 1_i);
- auto* clamped = b.Call("clamp", ctx.Clone(arg), zero, max);
- return clamped;
+ const auto* arg = expr->args[static_cast<size_t>(level_idx)];
+ const auto* target_ty =
+ builtin->Parameters()[static_cast<size_t>(level_idx)]->Type();
+ const auto* num_levels = b.Call("textureNumLevels", ctx.Clone(texture_arg));
+
+ // TODO(crbug.com/tint/1526) remove when num_levels returns u32
+ num_levels = cast_to_unsigned(num_levels, 1u);
+
+ const auto* unsigned_max = b.Sub(num_levels, 1_a);
+ if (target_ty->is_signed_integer_scalar()) {
+ const auto* signed_max = cast_to_signed(unsigned_max, 1u);
+ return b.Call("clamp", ctx.Clone(arg), 0_a, signed_max);
+ } else {
+ return b.Call("min", ctx.Clone(arg), unsigned_max);
+ }
};
}
// Clamp the coordinates argument
{
- auto* texture_dims =
+ const auto* target_ty = coords_ty;
+ const auto width = width_of(target_ty);
+ const auto* texture_dims =
level_arg ? b.Call("textureDimensions", ctx.Clone(texture_arg), level_arg())
: b.Call("textureDimensions", ctx.Clone(texture_arg));
- auto* zero = b.Construct(CreateASTTypeFor(ctx, coords_ty));
- auto* max =
- ctx.dst->Sub(texture_dims, b.Construct(CreateASTTypeFor(ctx, coords_ty), 1_i));
- auto* clamped_coords = b.Call("clamp", ctx.Clone(coords_arg), zero, max);
- ctx.Replace(coords_arg, clamped_coords);
+
+ // TODO(crbug.com/tint/1526) remove when texture_dims returns u32 or vecN<u32>
+ texture_dims = cast_to_unsigned(texture_dims, width);
+
+ // texture_dims is u32 or vecN<u32>
+ const auto* unsigned_max = b.Sub(texture_dims, scalar_or_vec(b.Expr(1_a), width));
+ if (target_ty->is_signed_scalar_or_vector()) {
+ const auto* zero = scalar_or_vec(b.Expr(0_a), width);
+ const auto* signed_max = cast_to_signed(unsigned_max, width);
+ ctx.Replace(coords_arg, b.Call("clamp", ctx.Clone(coords_arg), zero, signed_max));
+ } else {
+ ctx.Replace(coords_arg, b.Call("min", ctx.Clone(coords_arg), unsigned_max));
+ }
}
// Clamp the array_index argument, if provided
if (array_idx >= 0) {
+ auto* target_ty = builtin->Parameters()[static_cast<size_t>(array_idx)]->Type();
auto* arg = expr->args[static_cast<size_t>(array_idx)];
auto* num_layers = b.Call("textureNumLayers", ctx.Clone(texture_arg));
- auto* zero = b.Expr(0_i);
- auto* max = ctx.dst->Sub(num_layers, 1_i);
- auto* clamped = b.Call("clamp", ctx.Clone(arg), zero, max);
- ctx.Replace(arg, clamped);
+
+ // TODO(crbug.com/tint/1526) remove when num_layers returns u32
+ num_layers = cast_to_unsigned(num_layers, 1u);
+
+ const auto* unsigned_max = b.Sub(num_layers, 1_a);
+ if (target_ty->is_signed_integer_scalar()) {
+ const auto* signed_max = cast_to_signed(unsigned_max, 1u);
+ ctx.Replace(arg, b.Call("clamp", ctx.Clone(arg), 0_a, signed_max));
+ } else {
+ ctx.Replace(arg, b.Call("min", ctx.Clone(arg), unsigned_max));
+ }
}
// Clamp the level argument, if provided
if (level_idx >= 0) {
auto* arg = expr->args[static_cast<size_t>(level_idx)];
- ctx.Replace(arg, level_arg ? level_arg() : ctx.dst->Expr(0_i));
+ ctx.Replace(arg, level_arg ? level_arg() : ctx.dst->Expr(0_a));
}
return nullptr; // Clone, which will use the argument replacements above.
diff --git a/src/tint/transform/robustness_test.cc b/src/tint/transform/robustness_test.cc
index fe2f343..16d958f 100644
--- a/src/tint/transform/robustness_test.cc
+++ b/src/tint/transform/robustness_test.cc
@@ -787,12 +787,12 @@
@group(0) @binding(0) var tex_depth_2d_arr : texture_depth_2d_array;
@group(0) @binding(0) var tex_external : texture_external;
-fn f() {
+fn signed() {
var array_idx : i32;
var level_idx : i32;
var sample_idx : i32;
- textureLoad(tex_1d, 1, level_idx);
+ textureLoad(tex_1d, 1i, level_idx);
textureLoad(tex_2d, vec2<i32>(1, 2), level_idx);
textureLoad(tex_2d_arr, vec2<i32>(1, 2), array_idx, level_idx);
textureLoad(tex_3d, vec3<i32>(1, 2, 3), level_idx);
@@ -801,6 +801,21 @@
textureLoad(tex_depth_2d_arr, vec2<i32>(1, 2), array_idx, level_idx);
textureLoad(tex_external, vec2<i32>(1, 2));
}
+
+fn unsigned() {
+ var array_idx : u32;
+ var level_idx : u32;
+ var sample_idx : u32;
+
+ textureLoad(tex_1d, 1u, level_idx);
+ textureLoad(tex_2d, vec2<u32>(1, 2), level_idx);
+ textureLoad(tex_2d_arr, vec2<u32>(1, 2), array_idx, level_idx);
+ textureLoad(tex_3d, vec3<u32>(1, 2, 3), level_idx);
+ textureLoad(tex_ms_2d, vec2<u32>(1, 2), sample_idx);
+ textureLoad(tex_depth_2d, vec2<u32>(1, 2), level_idx);
+ textureLoad(tex_depth_2d_arr, vec2<u32>(1, 2), array_idx, level_idx);
+ textureLoad(tex_external, vec2<u32>(1, 2));
+}
)";
auto* expect =
@@ -821,18 +836,32 @@
@group(0) @binding(0) var tex_external : texture_external;
-fn f() {
+fn signed() {
var array_idx : i32;
var level_idx : i32;
var sample_idx : i32;
- textureLoad(tex_1d, clamp(1, i32(), (textureDimensions(tex_1d, clamp(level_idx, 0i, (textureNumLevels(tex_1d) - 1i))) - i32(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_1d) - 1i)));
- textureLoad(tex_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_2d, clamp(level_idx, 0i, (textureNumLevels(tex_2d) - 1i))) - vec2<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_2d) - 1i)));
- textureLoad(tex_2d_arr, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_2d_arr, clamp(level_idx, 0i, (textureNumLevels(tex_2d_arr) - 1i))) - vec2<i32>(1i))), clamp(array_idx, 0i, (textureNumLayers(tex_2d_arr) - 1i)), clamp(level_idx, 0i, (textureNumLevels(tex_2d_arr) - 1i)));
- textureLoad(tex_3d, clamp(vec3<i32>(1, 2, 3), vec3<i32>(), (textureDimensions(tex_3d, clamp(level_idx, 0i, (textureNumLevels(tex_3d) - 1i))) - vec3<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_3d) - 1i)));
- textureLoad(tex_ms_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_ms_2d) - vec2<i32>(1i))), sample_idx);
- textureLoad(tex_depth_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_depth_2d, clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d) - 1i))) - vec2<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d) - 1i)));
- textureLoad(tex_depth_2d_arr, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_depth_2d_arr, clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d_arr) - 1i))) - vec2<i32>(1i))), clamp(array_idx, 0i, (textureNumLayers(tex_depth_2d_arr) - 1i)), clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d_arr) - 1i)));
- textureLoad(tex_external, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_external) - vec2<i32>(1i))));
+ textureLoad(tex_1d, clamp(1i, 0, i32((u32(textureDimensions(tex_1d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_1d)) - 1))))) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_1d)) - 1))));
+ textureLoad(tex_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_2d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d)) - 1))))) - vec2(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d)) - 1))));
+ textureLoad(tex_2d_arr, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_2d_arr, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d_arr)) - 1))))) - vec2(1)))), clamp(array_idx, 0, i32((u32(textureNumLayers(tex_2d_arr)) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d_arr)) - 1))));
+ textureLoad(tex_3d, clamp(vec3<i32>(1, 2, 3), vec3(0), vec3<i32>((vec3<u32>(textureDimensions(tex_3d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_3d)) - 1))))) - vec3(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_3d)) - 1))));
+ textureLoad(tex_ms_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_ms_2d)) - vec2(1)))), sample_idx);
+ textureLoad(tex_depth_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_depth_2d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d)) - 1))))) - vec2(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d)) - 1))));
+ textureLoad(tex_depth_2d_arr, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_depth_2d_arr, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d_arr)) - 1))))) - vec2(1)))), clamp(array_idx, 0, i32((u32(textureNumLayers(tex_depth_2d_arr)) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d_arr)) - 1))));
+ textureLoad(tex_external, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_external)) - vec2(1)))));
+}
+
+fn unsigned() {
+ var array_idx : u32;
+ var level_idx : u32;
+ var sample_idx : u32;
+ textureLoad(tex_1d, min(1u, (u32(textureDimensions(tex_1d, min(level_idx, (u32(textureNumLevels(tex_1d)) - 1)))) - 1)), min(level_idx, (u32(textureNumLevels(tex_1d)) - 1)));
+ textureLoad(tex_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_2d, min(level_idx, (u32(textureNumLevels(tex_2d)) - 1)))) - vec2(1))), min(level_idx, (u32(textureNumLevels(tex_2d)) - 1)));
+ textureLoad(tex_2d_arr, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_2d_arr, min(level_idx, (u32(textureNumLevels(tex_2d_arr)) - 1)))) - vec2(1))), min(array_idx, (u32(textureNumLayers(tex_2d_arr)) - 1)), min(level_idx, (u32(textureNumLevels(tex_2d_arr)) - 1)));
+ textureLoad(tex_3d, min(vec3<u32>(1, 2, 3), (vec3<u32>(textureDimensions(tex_3d, min(level_idx, (u32(textureNumLevels(tex_3d)) - 1)))) - vec3(1))), min(level_idx, (u32(textureNumLevels(tex_3d)) - 1)));
+ textureLoad(tex_ms_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_ms_2d)) - vec2(1))), sample_idx);
+ textureLoad(tex_depth_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_depth_2d, min(level_idx, (u32(textureNumLevels(tex_depth_2d)) - 1)))) - vec2(1))), min(level_idx, (u32(textureNumLevels(tex_depth_2d)) - 1)));
+ textureLoad(tex_depth_2d_arr, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_depth_2d_arr, min(level_idx, (u32(textureNumLevels(tex_depth_2d_arr)) - 1)))) - vec2(1))), min(array_idx, (u32(textureNumLayers(tex_depth_2d_arr)) - 1)), min(level_idx, (u32(textureNumLevels(tex_depth_2d_arr)) - 1)));
+ textureLoad(tex_external, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_external)) - vec2(1))));
}
)";
@@ -844,12 +873,12 @@
// Clamp textureLoad() coord, array_index and level values
TEST_F(RobustnessTest, TextureLoad_Clamp_OutOfOrder) {
auto* src = R"(
-fn f() {
+fn signed() {
var array_idx : i32;
var level_idx : i32;
var sample_idx : i32;
- textureLoad(tex_1d, 1, level_idx);
+ textureLoad(tex_1d, 1i, level_idx);
textureLoad(tex_2d, vec2<i32>(1, 2), level_idx);
textureLoad(tex_2d_arr, vec2<i32>(1, 2), array_idx, level_idx);
textureLoad(tex_3d, vec3<i32>(1, 2, 3), level_idx);
@@ -859,6 +888,21 @@
textureLoad(tex_external, vec2<i32>(1, 2));
}
+fn unsigned() {
+ var array_idx : u32;
+ var level_idx : u32;
+ var sample_idx : u32;
+
+ textureLoad(tex_1d, 1u, level_idx);
+ textureLoad(tex_2d, vec2<u32>(1, 2), level_idx);
+ textureLoad(tex_2d_arr, vec2<u32>(1, 2), array_idx, level_idx);
+ textureLoad(tex_3d, vec3<u32>(1, 2, 3), level_idx);
+ textureLoad(tex_ms_2d, vec2<u32>(1, 2), sample_idx);
+ textureLoad(tex_depth_2d, vec2<u32>(1, 2), level_idx);
+ textureLoad(tex_depth_2d_arr, vec2<u32>(1, 2), array_idx, level_idx);
+ textureLoad(tex_external, vec2<u32>(1, 2));
+}
+
@group(0) @binding(0) var tex_1d : texture_1d<f32>;
@group(0) @binding(0) var tex_2d : texture_2d<f32>;
@group(0) @binding(0) var tex_2d_arr : texture_2d_array<f32>;
@@ -871,18 +915,32 @@
auto* expect =
R"(
-fn f() {
+fn signed() {
var array_idx : i32;
var level_idx : i32;
var sample_idx : i32;
- textureLoad(tex_1d, clamp(1, i32(), (textureDimensions(tex_1d, clamp(level_idx, 0i, (textureNumLevels(tex_1d) - 1i))) - i32(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_1d) - 1i)));
- textureLoad(tex_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_2d, clamp(level_idx, 0i, (textureNumLevels(tex_2d) - 1i))) - vec2<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_2d) - 1i)));
- textureLoad(tex_2d_arr, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_2d_arr, clamp(level_idx, 0i, (textureNumLevels(tex_2d_arr) - 1i))) - vec2<i32>(1i))), clamp(array_idx, 0i, (textureNumLayers(tex_2d_arr) - 1i)), clamp(level_idx, 0i, (textureNumLevels(tex_2d_arr) - 1i)));
- textureLoad(tex_3d, clamp(vec3<i32>(1, 2, 3), vec3<i32>(), (textureDimensions(tex_3d, clamp(level_idx, 0i, (textureNumLevels(tex_3d) - 1i))) - vec3<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_3d) - 1i)));
- textureLoad(tex_ms_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_ms_2d) - vec2<i32>(1i))), sample_idx);
- textureLoad(tex_depth_2d, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_depth_2d, clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d) - 1i))) - vec2<i32>(1i))), clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d) - 1i)));
- textureLoad(tex_depth_2d_arr, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_depth_2d_arr, clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d_arr) - 1i))) - vec2<i32>(1i))), clamp(array_idx, 0i, (textureNumLayers(tex_depth_2d_arr) - 1i)), clamp(level_idx, 0i, (textureNumLevels(tex_depth_2d_arr) - 1i)));
- textureLoad(tex_external, clamp(vec2<i32>(1, 2), vec2<i32>(), (textureDimensions(tex_external) - vec2<i32>(1i))));
+ textureLoad(tex_1d, clamp(1i, 0, i32((u32(textureDimensions(tex_1d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_1d)) - 1))))) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_1d)) - 1))));
+ textureLoad(tex_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_2d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d)) - 1))))) - vec2(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d)) - 1))));
+ textureLoad(tex_2d_arr, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_2d_arr, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d_arr)) - 1))))) - vec2(1)))), clamp(array_idx, 0, i32((u32(textureNumLayers(tex_2d_arr)) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_2d_arr)) - 1))));
+ textureLoad(tex_3d, clamp(vec3<i32>(1, 2, 3), vec3(0), vec3<i32>((vec3<u32>(textureDimensions(tex_3d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_3d)) - 1))))) - vec3(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_3d)) - 1))));
+ textureLoad(tex_ms_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_ms_2d)) - vec2(1)))), sample_idx);
+ textureLoad(tex_depth_2d, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_depth_2d, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d)) - 1))))) - vec2(1)))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d)) - 1))));
+ textureLoad(tex_depth_2d_arr, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_depth_2d_arr, clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d_arr)) - 1))))) - vec2(1)))), clamp(array_idx, 0, i32((u32(textureNumLayers(tex_depth_2d_arr)) - 1))), clamp(level_idx, 0, i32((u32(textureNumLevels(tex_depth_2d_arr)) - 1))));
+ textureLoad(tex_external, clamp(vec2<i32>(1, 2), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex_external)) - vec2(1)))));
+}
+
+fn unsigned() {
+ var array_idx : u32;
+ var level_idx : u32;
+ var sample_idx : u32;
+ textureLoad(tex_1d, min(1u, (u32(textureDimensions(tex_1d, min(level_idx, (u32(textureNumLevels(tex_1d)) - 1)))) - 1)), min(level_idx, (u32(textureNumLevels(tex_1d)) - 1)));
+ textureLoad(tex_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_2d, min(level_idx, (u32(textureNumLevels(tex_2d)) - 1)))) - vec2(1))), min(level_idx, (u32(textureNumLevels(tex_2d)) - 1)));
+ textureLoad(tex_2d_arr, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_2d_arr, min(level_idx, (u32(textureNumLevels(tex_2d_arr)) - 1)))) - vec2(1))), min(array_idx, (u32(textureNumLayers(tex_2d_arr)) - 1)), min(level_idx, (u32(textureNumLevels(tex_2d_arr)) - 1)));
+ textureLoad(tex_3d, min(vec3<u32>(1, 2, 3), (vec3<u32>(textureDimensions(tex_3d, min(level_idx, (u32(textureNumLevels(tex_3d)) - 1)))) - vec3(1))), min(level_idx, (u32(textureNumLevels(tex_3d)) - 1)));
+ textureLoad(tex_ms_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_ms_2d)) - vec2(1))), sample_idx);
+ textureLoad(tex_depth_2d, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_depth_2d, min(level_idx, (u32(textureNumLevels(tex_depth_2d)) - 1)))) - vec2(1))), min(level_idx, (u32(textureNumLevels(tex_depth_2d)) - 1)));
+ textureLoad(tex_depth_2d_arr, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_depth_2d_arr, min(level_idx, (u32(textureNumLevels(tex_depth_2d_arr)) - 1)))) - vec2(1))), min(array_idx, (u32(textureNumLayers(tex_depth_2d_arr)) - 1)), min(level_idx, (u32(textureNumLevels(tex_depth_2d_arr)) - 1)));
+ textureLoad(tex_external, min(vec2<u32>(1, 2), (vec2<u32>(textureDimensions(tex_external)) - vec2(1))));
}
@group(0) @binding(0) var tex_1d : texture_1d<f32>;
@@ -918,12 +976,19 @@
@group(0) @binding(3) var tex3d : texture_storage_3d<rgba8sint, write>;
-fn f() {
- textureStore(tex1d, 10, vec4<i32>());
+fn signed() {
+ textureStore(tex1d, 10i, vec4<i32>());
textureStore(tex2d, vec2<i32>(10, 20), vec4<i32>());
- textureStore(tex2d_arr, vec2<i32>(10, 20), 50, vec4<i32>());
+ textureStore(tex2d_arr, vec2<i32>(10, 20), 50i, vec4<i32>());
textureStore(tex3d, vec3<i32>(10, 20, 30), vec4<i32>());
}
+
+fn unsigned() {
+ textureStore(tex1d, 10u, vec4<i32>());
+ textureStore(tex2d, vec2<u32>(10, 20), vec4<i32>());
+ textureStore(tex2d_arr, vec2<u32>(10, 20), 50u, vec4<i32>());
+ textureStore(tex3d, vec3<u32>(10, 20, 30), vec4<i32>());
+}
)";
auto* expect = R"(
@@ -935,11 +1000,18 @@
@group(0) @binding(3) var tex3d : texture_storage_3d<rgba8sint, write>;
-fn f() {
- textureStore(tex1d, clamp(10, i32(), (textureDimensions(tex1d) - i32(1i))), vec4<i32>());
- textureStore(tex2d, clamp(vec2<i32>(10, 20), vec2<i32>(), (textureDimensions(tex2d) - vec2<i32>(1i))), vec4<i32>());
- textureStore(tex2d_arr, clamp(vec2<i32>(10, 20), vec2<i32>(), (textureDimensions(tex2d_arr) - vec2<i32>(1i))), clamp(50, 0i, (textureNumLayers(tex2d_arr) - 1i)), vec4<i32>());
- textureStore(tex3d, clamp(vec3<i32>(10, 20, 30), vec3<i32>(), (textureDimensions(tex3d) - vec3<i32>(1i))), vec4<i32>());
+fn signed() {
+ textureStore(tex1d, clamp(10i, 0, i32((u32(textureDimensions(tex1d)) - 1))), vec4<i32>());
+ textureStore(tex2d, clamp(vec2<i32>(10, 20), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex2d)) - vec2(1)))), vec4<i32>());
+ textureStore(tex2d_arr, clamp(vec2<i32>(10, 20), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex2d_arr)) - vec2(1)))), clamp(50i, 0, i32((u32(textureNumLayers(tex2d_arr)) - 1))), vec4<i32>());
+ textureStore(tex3d, clamp(vec3<i32>(10, 20, 30), vec3(0), vec3<i32>((vec3<u32>(textureDimensions(tex3d)) - vec3(1)))), vec4<i32>());
+}
+
+fn unsigned() {
+ textureStore(tex1d, min(10u, (u32(textureDimensions(tex1d)) - 1)), vec4<i32>());
+ textureStore(tex2d, min(vec2<u32>(10, 20), (vec2<u32>(textureDimensions(tex2d)) - vec2(1))), vec4<i32>());
+ textureStore(tex2d_arr, min(vec2<u32>(10, 20), (vec2<u32>(textureDimensions(tex2d_arr)) - vec2(1))), min(50u, (u32(textureNumLayers(tex2d_arr)) - 1)), vec4<i32>());
+ textureStore(tex3d, min(vec3<u32>(10, 20, 30), (vec3<u32>(textureDimensions(tex3d)) - vec3(1))), vec4<i32>());
}
)";
@@ -951,13 +1023,20 @@
// Clamp textureStore() coord, array_index and level values
TEST_F(RobustnessTest, TextureStore_Clamp_OutOfOrder) {
auto* src = R"(
-fn f() {
- textureStore(tex1d, 10, vec4<i32>());
+fn signed() {
+ textureStore(tex1d, 10i, vec4<i32>());
textureStore(tex2d, vec2<i32>(10, 20), vec4<i32>());
- textureStore(tex2d_arr, vec2<i32>(10, 20), 50, vec4<i32>());
+ textureStore(tex2d_arr, vec2<i32>(10, 20), 50i, vec4<i32>());
textureStore(tex3d, vec3<i32>(10, 20, 30), vec4<i32>());
}
+fn unsigned() {
+ textureStore(tex1d, 10u, vec4<i32>());
+ textureStore(tex2d, vec2<u32>(10, 20), vec4<i32>());
+ textureStore(tex2d_arr, vec2<u32>(10, 20), 50u, vec4<i32>());
+ textureStore(tex3d, vec3<u32>(10, 20, 30), vec4<i32>());
+}
+
@group(0) @binding(0) var tex1d : texture_storage_1d<rgba8sint, write>;
@group(0) @binding(1) var tex2d : texture_storage_2d<rgba8sint, write>;
@@ -969,11 +1048,18 @@
)";
auto* expect = R"(
-fn f() {
- textureStore(tex1d, clamp(10, i32(), (textureDimensions(tex1d) - i32(1i))), vec4<i32>());
- textureStore(tex2d, clamp(vec2<i32>(10, 20), vec2<i32>(), (textureDimensions(tex2d) - vec2<i32>(1i))), vec4<i32>());
- textureStore(tex2d_arr, clamp(vec2<i32>(10, 20), vec2<i32>(), (textureDimensions(tex2d_arr) - vec2<i32>(1i))), clamp(50, 0i, (textureNumLayers(tex2d_arr) - 1i)), vec4<i32>());
- textureStore(tex3d, clamp(vec3<i32>(10, 20, 30), vec3<i32>(), (textureDimensions(tex3d) - vec3<i32>(1i))), vec4<i32>());
+fn signed() {
+ textureStore(tex1d, clamp(10i, 0, i32((u32(textureDimensions(tex1d)) - 1))), vec4<i32>());
+ textureStore(tex2d, clamp(vec2<i32>(10, 20), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex2d)) - vec2(1)))), vec4<i32>());
+ textureStore(tex2d_arr, clamp(vec2<i32>(10, 20), vec2(0), vec2<i32>((vec2<u32>(textureDimensions(tex2d_arr)) - vec2(1)))), clamp(50i, 0, i32((u32(textureNumLayers(tex2d_arr)) - 1))), vec4<i32>());
+ textureStore(tex3d, clamp(vec3<i32>(10, 20, 30), vec3(0), vec3<i32>((vec3<u32>(textureDimensions(tex3d)) - vec3(1)))), vec4<i32>());
+}
+
+fn unsigned() {
+ textureStore(tex1d, min(10u, (u32(textureDimensions(tex1d)) - 1)), vec4<i32>());
+ textureStore(tex2d, min(vec2<u32>(10, 20), (vec2<u32>(textureDimensions(tex2d)) - vec2(1))), vec4<i32>());
+ textureStore(tex2d_arr, min(vec2<u32>(10, 20), (vec2<u32>(textureDimensions(tex2d_arr)) - vec2(1))), min(50u, (u32(textureNumLayers(tex2d_arr)) - 1)), vec4<i32>());
+ textureStore(tex3d, min(vec3<u32>(10, 20, 30), (vec3<u32>(textureDimensions(tex3d)) - vec3(1))), vec4<i32>());
}
@group(0) @binding(0) var tex1d : texture_storage_1d<rgba8sint, write>;
diff --git a/src/tint/transform/transform.cc b/src/tint/transform/transform.cc
index 3bcac6b..3e03411 100644
--- a/src/tint/transform/transform.cc
+++ b/src/tint/transform/transform.cc
@@ -114,10 +114,14 @@
if (a->IsRuntimeSized()) {
return ctx.dst->ty.array(el, nullptr, std::move(attrs));
}
- if (auto* override = std::get_if<sem::OverrideArrayCount>(&a->Count())) {
+ if (auto* override = std::get_if<sem::NamedOverrideArrayCount>(&a->Count())) {
auto* count = ctx.Clone(override->variable->Declaration());
return ctx.dst->ty.array(el, count, std::move(attrs));
}
+ if (auto* override = std::get_if<sem::UnnamedOverrideArrayCount>(&a->Count())) {
+ auto* count = ctx.Clone(override->expr->Declaration());
+ return ctx.dst->ty.array(el, count, std::move(attrs));
+ }
if (auto count = a->ConstantCount()) {
return ctx.dst->ty.array(el, u32(count.value()), std::move(attrs));
}
diff --git a/src/tint/transform/vertex_pulling.cc b/src/tint/transform/vertex_pulling.cc
index 2ec12d5..00b5a06 100644
--- a/src/tint/transform/vertex_pulling.cc
+++ b/src/tint/transform/vertex_pulling.cc
@@ -882,8 +882,18 @@
}
// Find entry point
- auto* func = ctx.src->AST().Functions().Find(ctx.src->Symbols().Get(cfg.entry_point_name),
- ast::PipelineStage::kVertex);
+ const ast::Function* func = nullptr;
+ for (auto* fn : ctx.src->AST().Functions()) {
+ if (fn->PipelineStage() == ast::PipelineStage::kVertex) {
+ if (func != nullptr) {
+ ctx.dst->Diagnostics().add_error(
+ diag::System::Transform,
+ "VertexPulling found more than one vertex entry point");
+ return;
+ }
+ func = fn;
+ }
+ }
if (func == nullptr) {
ctx.dst->Diagnostics().add_error(diag::System::Transform,
"Vertex stage entry point not found");
diff --git a/src/tint/transform/vertex_pulling.h b/src/tint/transform/vertex_pulling.h
index 255a49a..6dd35bc 100644
--- a/src/tint/transform/vertex_pulling.h
+++ b/src/tint/transform/vertex_pulling.h
@@ -135,6 +135,8 @@
/// code, but these are types that the data may arrive as. We need to convert
/// these smaller types into the base types such as `f32` and `u32` for the
/// shader to use.
+///
+/// The SingleEntryPoint transform must have run before VertexPulling.
class VertexPulling final : public Castable<VertexPulling, Transform> {
public:
/// Configuration options for the transform
@@ -152,9 +154,6 @@
/// @returns this Config
Config& operator=(const Config&);
- /// The entry point to add assignments into
- std::string entry_point_name;
-
/// The vertex state descriptor, containing info about attributes
VertexStateDescriptor vertex_state;
@@ -163,7 +162,7 @@
uint32_t pulling_group = 4u;
/// Reflect the fields of this class so that it can be used by tint::ForeachField()
- TINT_REFLECT(entry_point_name, vertex_state, pulling_group);
+ TINT_REFLECT(vertex_state, pulling_group);
};
/// Constructor
diff --git a/src/tint/transform/vertex_pulling_test.cc b/src/tint/transform/vertex_pulling_test.cc
index 5fb8b1c..7c774c5 100644
--- a/src/tint/transform/vertex_pulling_test.cc
+++ b/src/tint/transform/vertex_pulling_test.cc
@@ -35,18 +35,21 @@
EXPECT_EQ(expect, str(got));
}
-TEST_F(VertexPullingTest, Error_InvalidEntryPoint) {
+TEST_F(VertexPullingTest, Error_MultipleEntryPoint) {
auto* src = R"(
@vertex
fn main() -> @builtin(position) vec4<f32> {
return vec4<f32>();
}
+@vertex
+fn main2() -> @builtin(position) vec4<f32> {
+ return vec4<f32>();
+}
)";
- auto* expect = "error: Vertex stage entry point not found";
+ auto* expect = "error: VertexPulling found more than one vertex entry point";
VertexPulling::Config cfg;
- cfg.entry_point_name = "_";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -64,7 +67,6 @@
auto* expect = "error: Vertex stage entry point not found";
VertexPulling::Config cfg;
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -87,7 +89,6 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{15, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -116,7 +117,6 @@
)";
VertexPulling::Config cfg;
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -153,7 +153,6 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -190,7 +189,6 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{4, VertexStepMode::kInstance, {{VertexFormat::kFloat32, 0, 0}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -228,7 +226,6 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.pulling_group = 5;
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -274,7 +271,6 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -332,7 +328,6 @@
{{VertexFormat::kFloat32, 0, 1}},
},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -411,7 +406,6 @@
{{VertexFormat::kFloat32, 0, 1}},
},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -490,7 +484,6 @@
{{VertexFormat::kFloat32, 0, 1}},
},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -566,7 +559,6 @@
{{VertexFormat::kFloat32, 0, 1}},
},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -642,7 +634,6 @@
{{VertexFormat::kFloat32, 0, 1}},
},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -684,7 +675,6 @@
cfg.vertex_state = {{{16,
VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -738,7 +728,6 @@
{12, VertexStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
{16, VertexStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -788,7 +777,6 @@
cfg.vertex_state = {{{16,
VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -933,7 +921,6 @@
{VertexFormat::kSint32, 64, 26}, {VertexFormat::kSint32x2, 64, 27},
{VertexFormat::kSint32x3, 64, 28}, {VertexFormat::kSint32x4, 64, 29},
}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -1079,7 +1066,6 @@
{VertexFormat::kSint32, 63, 26}, {VertexFormat::kSint32x2, 63, 27},
{VertexFormat::kSint32x3, 63, 28}, {VertexFormat::kSint32x4, 63, 29},
}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
@@ -1224,7 +1210,6 @@
{VertexFormat::kSint32, 64, 26}, {VertexFormat::kSint32x2, 64, 27},
{VertexFormat::kSint32x3, 64, 28}, {VertexFormat::kSint32x4, 64, 29},
}}}};
- cfg.entry_point_name = "main";
DataMap data;
data.Add<VertexPulling::Config>(cfg);
diff --git a/src/tint/utils/result.h b/src/tint/utils/result.h
index baca65f..41fda19 100644
--- a/src/tint/utils/result.h
+++ b/src/tint/utils/result.h
@@ -16,6 +16,7 @@
#define SRC_TINT_UTILS_RESULT_H_
#include <ostream>
+#include <utility>
#include <variant>
#include "src/tint/debug.h"
@@ -47,10 +48,20 @@
: value{success} {}
/// Constructor
+ /// @param success the success result
+ Result(SUCCESS_TYPE&& success) // NOLINT(runtime/explicit):
+ : value(std::move(SUCCESS_TYPE(std::move(success)))) {}
+
+ /// Constructor
/// @param failure the failure result
Result(const FAILURE_TYPE& failure) // NOLINT(runtime/explicit):
: value{failure} {}
+ /// Constructor
+ /// @param failure the failure result
+ Result(FAILURE_TYPE&& failure) // NOLINT(runtime/explicit):
+ : value{std::move(failure)} {}
+
/// Copy constructor with success / failure casting
/// @param other the Result to copy
template <typename S,
@@ -91,6 +102,13 @@
return std::get<SUCCESS_TYPE>(value);
}
+ /// @returns the success value
+ /// @warning attempting to call this when the Result holds an failure value will result in UB.
+ SUCCESS_TYPE&& Move() {
+ Validate();
+ return std::get<SUCCESS_TYPE>(std::move(value));
+ }
+
/// @returns the failure value
/// @warning attempting to call this when the Result holds a success value will result in UB.
const FAILURE_TYPE& Failure() const {
diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc
index fc9de73..ab78722 100644
--- a/src/tint/writer/glsl/generator_impl.cc
+++ b/src/tint/writer/glsl/generator_impl.cc
@@ -1335,8 +1335,44 @@
auto* texture_type = TypeOf(texture)->UnwrapRef()->As<sem::Texture>();
+ auto emit_signed_int_type = [&](const sem::Type* ty) {
+ uint32_t width = 0;
+ sem::Type::ElementOf(ty, &width);
+ if (width > 1) {
+ out << "ivec" << width;
+ } else {
+ out << "int";
+ }
+ };
+
+ auto emit_unsigned_int_type = [&](const sem::Type* ty) {
+ uint32_t width = 0;
+ sem::Type::ElementOf(ty, &width);
+ if (width > 1) {
+ out << "uvec" << width;
+ } else {
+ out << "uint";
+ }
+ };
+
+ auto emit_expr_as_signed = [&](const ast::Expression* e) {
+ auto* ty = TypeOf(e)->UnwrapRef();
+ if (!ty->is_unsigned_scalar_or_vector()) {
+ return EmitExpression(out, e);
+ }
+ emit_signed_int_type(ty);
+ ScopedParen sp(out);
+ return EmitExpression(out, e);
+ };
+
switch (builtin->Type()) {
case sem::BuiltinType::kTextureDimensions: {
+ // textureDimensions() returns an unsigned scalar / vector in WGSL.
+ // textureSize() / imageSize() returns a signed scalar / vector in GLSL.
+ // Cast.
+ emit_unsigned_int_type(call->Type());
+ ScopedParen sp(out);
+
if (texture_type->Is<sem::StorageTexture>()) {
out << "imageSize(";
} else {
@@ -1353,7 +1389,7 @@
!texture_type->Is<sem::DepthMultisampledTexture>()) {
out << ", ";
if (auto* level_arg = arg(Usage::kLevel)) {
- if (!EmitExpression(out, level_arg)) {
+ if (!emit_expr_as_signed(level_arg)) {
return false;
}
} else {
@@ -1370,6 +1406,12 @@
return true;
}
case sem::BuiltinType::kTextureNumLayers: {
+ // textureNumLayers() returns an unsigned scalar in WGSL.
+ // textureSize() / imageSize() returns a signed scalar / vector in GLSL.
+ // Cast.
+ out << "uint";
+ ScopedParen sp(out);
+
if (texture_type->Is<sem::StorageTexture>()) {
out << "imageSize(";
} else {
@@ -1387,7 +1429,7 @@
!texture_type->Is<sem::DepthMultisampledTexture>()) {
out << ", ";
if (auto* level_arg = arg(Usage::kLevel)) {
- if (!EmitExpression(out, level_arg)) {
+ if (!emit_expr_as_signed(level_arg)) {
return false;
}
} else {
@@ -1398,6 +1440,12 @@
return true;
}
case sem::BuiltinType::kTextureNumLevels: {
+ // textureNumLevels() returns an unsigned scalar in WGSL.
+ // textureQueryLevels() returns a signed scalar in GLSL.
+ // Cast.
+ out << "uint";
+ ScopedParen sp(out);
+
out << "textureQueryLevels(";
if (!EmitExpression(out, texture)) {
return false;
@@ -1406,6 +1454,12 @@
return true;
}
case sem::BuiltinType::kTextureNumSamples: {
+ // textureNumSamples() returns an unsigned scalar in WGSL.
+ // textureSamples() returns a signed scalar in GLSL.
+ // Cast.
+ out << "uint";
+ ScopedParen sp(out);
+
out << "textureSamples(";
if (!EmitExpression(out, texture)) {
return false;
@@ -1501,12 +1555,11 @@
param_coords = AppendVector(&builder_, param_coords, depth_ref)->Declaration();
}
- if (!EmitExpression(out, param_coords)) {
+ if (!emit_expr_as_signed(param_coords)) {
return false;
}
- for (auto usage :
- {Usage::kLevel, Usage::kDdx, Usage::kDdy, Usage::kSampleIndex, Usage::kValue}) {
+ for (auto usage : {Usage::kLevel, Usage::kDdx, Usage::kDdy, Usage::kSampleIndex}) {
if (auto* e = arg(usage)) {
out << ", ";
if (usage == Usage::kLevel && is_depth) {
@@ -1517,12 +1570,19 @@
return false;
}
out << ")";
- } else if (!EmitExpression(out, e)) {
+ } else if (!emit_expr_as_signed(e)) {
return false;
}
}
}
+ if (auto* e = arg(Usage::kValue)) {
+ out << ", ";
+ if (!EmitExpression(out, e)) {
+ return false;
+ }
+ }
+
// GLSL's textureGather always requires a refZ parameter.
if (is_depth && builtin->Type() == sem::BuiltinType::kTextureGather) {
out << ", 0.0";
@@ -1543,7 +1603,7 @@
for (auto usage : {Usage::kOffset, Usage::kComponent, Usage::kBias}) {
if (auto* e = arg(usage)) {
out << ", ";
- if (!EmitExpression(out, e)) {
+ if (!emit_expr_as_signed(e)) {
return false;
}
}
diff --git a/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc b/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc
index 8a22798..8fc9844 100644
--- a/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc
+++ b/src/tint/writer/glsl/generator_impl_builtin_texture_test.cc
@@ -63,27 +63,27 @@
case ValidTextureOverload::kGather2dF32:
return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0))";
case ValidTextureOverload::kGather2dOffsetF32:
- return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4), 0))";
+ return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(3, 4), int(0u)))";
case ValidTextureOverload::kGather2dArrayF32:
return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0))";
case ValidTextureOverload::kGather2dArrayOffsetF32:
- return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5), 0))";
+ return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3u)), ivec2(4, 5), int(0u)))";
case ValidTextureOverload::kGatherCubeF32:
return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0))";
case ValidTextureOverload::kGatherCubeArrayF32:
- return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0))";
+ return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4u)), int(0u))";
case ValidTextureOverload::kGatherDepth2dF32:
return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0))";
case ValidTextureOverload::kGatherDepth2dOffsetF32:
return R"(textureGatherOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 0.0, ivec2(3, 4))";
case ValidTextureOverload::kGatherDepth2dArrayF32:
- return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0))";
+ return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3u)), 0.0))";
case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
return R"(textureGatherOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), 0.0, ivec2(4, 5)))";
case ValidTextureOverload::kGatherDepthCubeF32:
return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 0.0))";
case ValidTextureOverload::kGatherDepthCubeArrayF32:
- return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0))";
+ return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4u)), 0.0))";
case ValidTextureOverload::kGatherCompareDepth2dF32:
return R"(textureGather(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
@@ -95,7 +95,7 @@
case ValidTextureOverload::kGatherCompareDepthCubeF32:
return R"(textureGather(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
- return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
+ return R"(textureGather(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4u)), 5.0f))";
case ValidTextureOverload::kNumLayers2dArray:
case ValidTextureOverload::kNumLayersDepth2dArray:
case ValidTextureOverload::kNumLayersCubeArray:
@@ -125,7 +125,7 @@
case ValidTextureOverload::kSample2dArrayF32:
return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)));)";
case ValidTextureOverload::kSample2dArrayOffsetF32:
- return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3u)), ivec2(4, 5));)";
case ValidTextureOverload::kSample3dF32:
return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSample3dOffsetF32:
@@ -145,13 +145,13 @@
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 0.0f));)";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
- return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 0.0f);)";
+ return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4u)), 0.0f);)";
case ValidTextureOverload::kSampleBias2dF32:
return R"(texture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleBias2dOffsetF32:
return R"(textureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), ivec2(4, 5), 3.0f);)";
case ValidTextureOverload::kSampleBias2dArrayF32:
- return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
+ return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4u)), 3.0f);)";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), ivec2(5, 6), 4.0f);)";
case ValidTextureOverload::kSampleBias3dF32:
@@ -179,13 +179,13 @@
case ValidTextureOverload::kSampleLevelCubeArrayF32:
return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
case ValidTextureOverload::kSampleLevelDepth2dF32:
- return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f), float(3));)";
+ return R"(textureLod(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f), float(3u));)";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
return R"(textureLodOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 0.0f), float(3), ivec2(4, 5));)";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
- return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f), float(4));)";
+ return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3u), 0.0f), float(4u));)";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
- return R"(textureLodOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 0.0f), float(4), ivec2(5, 6));)";
+ return R"(textureLodOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3u), 0.0f), float(4u), ivec2(5, 6));)";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(textureLod(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 0.0f), float(4)))";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
@@ -197,7 +197,7 @@
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));)";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
- return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
+ return R"(textureGradOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(3u)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
@@ -205,7 +205,7 @@
case ValidTextureOverload::kSampleGradCubeF32:
return R"(textureGrad(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGradCubeArrayF32:
- return R"(textureGrad(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), vec3(5.0f, 6.0f, 7.0f), vec3(8.0f, 9.0f, 10.0f));)";
+ return R"(textureGrad(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4u)), vec3(5.0f, 6.0f, 7.0f), vec3(8.0f, 9.0f, 10.0f));)";
case ValidTextureOverload::kSampleCompareDepth2dF32:
return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
@@ -213,55 +213,60 @@
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f));)";
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
- return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4), 3.0f), ivec2(5, 6));)";
+ return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4u), 3.0f), ivec2(5, 6));)";
case ValidTextureOverload::kSampleCompareDepthCubeF32:
return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f));)";
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
- return R"(yyytexture(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f);)";
+ return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
- return R"(yyytextureOffset(tint_symbol_sampler, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), ivec2(4, 5));)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
- return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(4)), 3.0f);)";
+ return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f));)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
- return R"(textureOffset(tint_symbol_sampler, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
+ return R"(textureOffset(tint_symbol_sampler, vec4(1.0f, 2.0f, float(3), 4.0f), ivec2(5, 6));)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
- return R"(texture(tint_symbol_sampler, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
+ return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, 4.0f));)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
return R"(texture(tint_symbol_sampler, vec4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
case ValidTextureOverload::kLoad1dLevelF32:
+ return R"(texelFetch(tint_symbol_2, int(1u), int(3u));)";
case ValidTextureOverload::kLoad1dLevelU32:
case ValidTextureOverload::kLoad1dLevelI32:
return R"(texelFetch(tint_symbol_2, 1, 3);)";
- case ValidTextureOverload::kLoad2dLevelF32:
case ValidTextureOverload::kLoad2dLevelU32:
- case ValidTextureOverload::kLoad2dLevelI32:
return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
+ case ValidTextureOverload::kLoad2dLevelF32:
+ case ValidTextureOverload::kLoad2dLevelI32:
+ return R"(texelFetch(tint_symbol_2, ivec2(uvec2(1u, 2u)), int(3u));)";
case ValidTextureOverload::kLoad2dArrayLevelF32:
case ValidTextureOverload::kLoad2dArrayLevelU32:
- case ValidTextureOverload::kLoad2dArrayLevelI32:
case ValidTextureOverload::kLoad3dLevelF32:
case ValidTextureOverload::kLoad3dLevelU32:
- case ValidTextureOverload::kLoad3dLevelI32:
return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4);)";
- case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+ case ValidTextureOverload::kLoad2dArrayLevelI32:
+ case ValidTextureOverload::kLoad3dLevelI32:
+ return R"(texelFetch(tint_symbol_2, ivec3(uvec3(1u, 2u, 3u)), int(4u));)";
case ValidTextureOverload::kLoadMultisampled2dF32:
case ValidTextureOverload::kLoadMultisampled2dU32:
- case ValidTextureOverload::kLoadMultisampled2dI32:
return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
+ case ValidTextureOverload::kLoadMultisampled2dI32:
+ return R"(texelFetch(tint_symbol_2, ivec2(uvec2(1u, 2u)), int(3u));)";
case ValidTextureOverload::kLoadDepth2dLevelF32:
return R"(texelFetch(tint_symbol_2, ivec2(1, 2), 3);)";
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
- return R"(texelFetch(tint_symbol_2, ivec3(1, 2, 3), 4);)";
+ return R"(texelFetch(tint_symbol_2, ivec3(uvec3(1u, 2u, 3u)), int(4u));)";
+ case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+ return R"(texelFetch(tint_symbol_2, ivec2(uvec2(1u, 2u)), int(3u)).x;)";
case ValidTextureOverload::kStoreWO1dRgba32float:
return R"(imageStore(tint_symbol, 1, vec4(2.0f, 3.0f, 4.0f, 5.0f));)";
case ValidTextureOverload::kStoreWO2dRgba32float:
return R"(imageStore(tint_symbol, ivec2(1, 2), vec4(3.0f, 4.0f, 5.0f, 6.0f));)";
case ValidTextureOverload::kStoreWO2dArrayRgba32float:
- return R"(imageStore(tint_symbol, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
+ return R"(imageStore(tint_symbol, ivec3(uvec3(1u, 2u, 3u)), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
case ValidTextureOverload::kStoreWO3dRgba32float:
- return R"(imageStore(tint_symbol, ivec3(1, 2, 3), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
+ return R"(imageStore(tint_symbol, ivec3(uvec3(1u, 2u, 3u)), vec4(4.0f, 5.0f, 6.0f, 7.0f));)";
}
return "<unmatched texture overload>";
} // NOLINT - Ignore the length of this function
diff --git a/src/tint/writer/glsl/generator_impl_import_test.cc b/src/tint/writer/glsl/generator_impl_import_test.cc
index b18206c..d21d6db 100644
--- a/src/tint/writer/glsl/generator_impl_import_test.cc
+++ b/src/tint/writer/glsl/generator_impl_import_test.cc
@@ -92,14 +92,15 @@
auto param = GetParam();
auto* ident = Expr(param.name);
- auto* expr = Call(ident, vec3<f32>(1_f, 2_f, 3_f));
+ auto* expr = Call(ident, vec3<f32>(0.1_f, 0.2_f, 0.3_f));
WrapInFunction(expr);
GeneratorImpl& gen = Build();
std::stringstream out;
ASSERT_TRUE(gen.EmitCall(out, expr)) << gen.error();
- EXPECT_EQ(out.str(), std::string(param.glsl_name) + "(vec3(1.0f, 2.0f, 3.0f))");
+ EXPECT_EQ(out.str(),
+ std::string(param.glsl_name) + "(vec3(0.100000001f, 0.200000003f, 0.300000012f))");
}
INSTANTIATE_TEST_SUITE_P(GlslGeneratorImplTest_Import,
GlslImportData_SingleVectorParamTest,
diff --git a/src/tint/writer/hlsl/generator_impl.cc b/src/tint/writer/hlsl/generator_impl.cc
index e42274d..d9c3479 100644
--- a/src/tint/writer/hlsl/generator_impl.cc
+++ b/src/tint/writer/hlsl/generator_impl.cc
@@ -162,6 +162,7 @@
polyfills.acosh = transform::BuiltinPolyfill::Level::kFull;
polyfills.asinh = true;
polyfills.atanh = transform::BuiltinPolyfill::Level::kFull;
+ polyfills.clamp_int = true;
// TODO(crbug.com/tint/1449): Some of these can map to HLSL's `firstbitlow`
// and `firstbithigh`.
polyfills.count_leading_zeros = true;
diff --git a/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc b/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc
index b996b70..4b15133 100644
--- a/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc
@@ -139,23 +139,23 @@
case ValidTextureOverload::kGather2dArrayF32:
return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
case ValidTextureOverload::kGather2dArrayOffsetF32:
- return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
+ return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, float(3u)), int2(4, 5)))";
case ValidTextureOverload::kGatherCubeF32:
return R"(tint_symbol.GatherRed(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kGatherCubeArrayF32:
- return R"(tint_symbol.GatherRed(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
+ return R"(tint_symbol.GatherRed(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u))))";
case ValidTextureOverload::kGatherDepth2dF32:
return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kGatherDepth2dOffsetF32:
return R"(tint_symbol.Gather(tint_symbol_1, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kGatherDepth2dArrayF32:
- return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3))))";
+ return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3u))))";
case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
case ValidTextureOverload::kGatherDepthCubeF32:
return R"(tint_symbol.Gather(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kGatherDepthCubeArrayF32:
- return R"(tint_symbol.Gather(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))))";
+ return R"(tint_symbol.Gather(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u))))";
case ValidTextureOverload::kGatherCompareDepth2dF32:
return R"(tint_symbol.GatherCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
@@ -167,7 +167,7 @@
case ValidTextureOverload::kGatherCompareDepthCubeF32:
return R"(tint_symbol.GatherCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
- return R"(tint_symbol.GatherCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
+ return R"(tint_symbol.GatherCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u)), 5.0f))";
case ValidTextureOverload::kNumLayers2dArray:
case ValidTextureOverload::kNumLayersDepth2dArray:
case ValidTextureOverload::kNumLayersCubeArray:
@@ -217,7 +217,7 @@
case ValidTextureOverload::kSample2dArrayF32:
return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)));)";
case ValidTextureOverload::kSample2dArrayOffsetF32:
- return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3)), int2(4, 5));)";
+ return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, float(3u)), int2(4, 5));)";
case ValidTextureOverload::kSample3dF32:
return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSample3dOffsetF32:
@@ -237,13 +237,13 @@
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(tint_symbol.Sample(tint_symbol_1, float3(1.0f, 2.0f, 3.0f)).x;)";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
- return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4))).x;)";
+ return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u))).x;)";
case ValidTextureOverload::kSampleBias2dF32:
return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleBias2dOffsetF32:
return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
case ValidTextureOverload::kSampleBias2dArrayF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4u)), 3.0f);)";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
case ValidTextureOverload::kSampleBias3dF32:
@@ -271,13 +271,13 @@
case ValidTextureOverload::kSampleLevelCubeArrayF32:
return R"(tint_symbol.SampleLevel(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
case ValidTextureOverload::kSampleLevelDepth2dF32:
- return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3).x;)";
+ return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3u).x;)";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3, int2(4, 5)).x;)";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
- return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4).x;)";
+ return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3u)), 4u).x;)";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
- return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4, int2(5, 6)).x;)";
+ return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, float(3u)), 4u, int2(5, 6)).x;)";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(tint_symbol.SampleLevel(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4).x;)";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
@@ -289,7 +289,7 @@
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f));)";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
- return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(6, 7));)";
+ return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, float(3u)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(6, 7));)";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
@@ -297,7 +297,7 @@
case ValidTextureOverload::kSampleGradCubeF32:
return R"(tint_symbol.SampleGrad(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGradCubeArrayF32:
- return R"(tint_symbol.SampleGrad(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f));)";
+ return R"(tint_symbol.SampleGrad(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f));)";
case ValidTextureOverload::kSampleCompareDepth2dF32:
return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
@@ -305,7 +305,7 @@
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
- return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
+ return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4u)), 3.0f, int2(5, 6));)";
case ValidTextureOverload::kSampleCompareDepthCubeF32:
return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
@@ -315,45 +315,50 @@
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
- return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f);)";
+ return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
- return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6));)";
+ return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f);)";
case ValidTextureOverload::kLoad1dLevelF32:
+ return R"(tint_symbol.Load(uint2(1u, 3u));)";
case ValidTextureOverload::kLoad1dLevelU32:
case ValidTextureOverload::kLoad1dLevelI32:
return R"(tint_symbol.Load(int2(1, 3));)";
- case ValidTextureOverload::kLoad2dLevelF32:
case ValidTextureOverload::kLoad2dLevelU32:
- case ValidTextureOverload::kLoad2dLevelI32:
return R"(tint_symbol.Load(int3(1, 2, 3));)";
+ case ValidTextureOverload::kLoad2dLevelF32:
+ case ValidTextureOverload::kLoad2dLevelI32:
+ return R"(tint_symbol.Load(uint3(1u, 2u, 3u));)";
case ValidTextureOverload::kLoad2dArrayLevelF32:
case ValidTextureOverload::kLoad2dArrayLevelU32:
- case ValidTextureOverload::kLoad2dArrayLevelI32:
case ValidTextureOverload::kLoad3dLevelF32:
case ValidTextureOverload::kLoad3dLevelU32:
- case ValidTextureOverload::kLoad3dLevelI32:
return R"(tint_symbol.Load(int4(1, 2, 3, 4));)";
- case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+ case ValidTextureOverload::kLoad2dArrayLevelI32:
+ case ValidTextureOverload::kLoad3dLevelI32:
+ return R"(tint_symbol.Load(uint4(1u, 2u, 3u, 4u));)";
case ValidTextureOverload::kLoadMultisampled2dF32:
case ValidTextureOverload::kLoadMultisampled2dU32:
- case ValidTextureOverload::kLoadMultisampled2dI32:
return R"(tint_symbol.Load(int2(1, 2), 3);)";
+ case ValidTextureOverload::kLoadMultisampled2dI32:
+ return R"(tint_symbol.Load(uint2(1u, 2u), 3u);)";
case ValidTextureOverload::kLoadDepth2dLevelF32:
return R"(tint_symbol.Load(int3(1, 2, 3)).x;)";
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
- return R"(tint_symbol.Load(int4(1, 2, 3, 4)).x;)";
+ return R"(tint_symbol.Load(uint4(1u, 2u, 3u, 4u)).x;)";
+ case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+ return R"(tint_symbol.Load(uint3(1u, 2u, uint(0)), 3u).x;)";
case ValidTextureOverload::kStoreWO1dRgba32float:
return R"(tint_symbol[1] = float4(2.0f, 3.0f, 4.0f, 5.0f);)";
case ValidTextureOverload::kStoreWO2dRgba32float:
return R"(tint_symbol[int2(1, 2)] = float4(3.0f, 4.0f, 5.0f, 6.0f);)";
case ValidTextureOverload::kStoreWO2dArrayRgba32float:
- return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
+ return R"(tint_symbol[uint3(1u, 2u, 3u)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
case ValidTextureOverload::kStoreWO3dRgba32float:
- return R"(tint_symbol[int3(1, 2, 3)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
+ return R"(tint_symbol[uint3(1u, 2u, 3u)] = float4(4.0f, 5.0f, 6.0f, 7.0f);)";
}
return "<unmatched texture overload>";
} // NOLINT - Ignore the length of this function
diff --git a/src/tint/writer/hlsl/generator_impl_import_test.cc b/src/tint/writer/hlsl/generator_impl_import_test.cc
index 14094ad..e953afb 100644
--- a/src/tint/writer/hlsl/generator_impl_import_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_import_test.cc
@@ -92,14 +92,15 @@
auto param = GetParam();
auto* ident = Expr(param.name);
- auto* expr = Call(ident, vec3<f32>(1_f, 2_f, 3_f));
+ auto* expr = Call(ident, vec3<f32>(0.1_f, 0.2_f, 0.3_f));
WrapInFunction(expr);
GeneratorImpl& gen = Build();
std::stringstream out;
ASSERT_TRUE(gen.EmitCall(out, expr)) << gen.error();
- EXPECT_EQ(out.str(), std::string(param.hlsl_name) + "(float3(1.0f, 2.0f, 3.0f))");
+ EXPECT_EQ(out.str(),
+ std::string(param.hlsl_name) + "(float3(0.100000001f, 0.200000003f, 0.300000012f))");
}
INSTANTIATE_TEST_SUITE_P(HlslGeneratorImplTest_Import,
HlslImportData_SingleVectorParamTest,
diff --git a/src/tint/writer/msl/generator_impl.cc b/src/tint/writer/msl/generator_impl.cc
index 28478b8..43633b5 100644
--- a/src/tint/writer/msl/generator_impl.cc
+++ b/src/tint/writer/msl/generator_impl.cc
@@ -66,6 +66,7 @@
#include "src/tint/transform/expand_compound_assignment.h"
#include "src/tint/transform/manager.h"
#include "src/tint/transform/module_scope_var_to_entry_point_param.h"
+#include "src/tint/transform/packed_vec3.h"
#include "src/tint/transform/promote_initializers_to_let.h"
#include "src/tint/transform/promote_side_effects_to_decl.h"
#include "src/tint/transform/remove_phonies.h"
@@ -154,32 +155,6 @@
std::ostream& s;
};
-class ScopedCast {
- public:
- ScopedCast(GeneratorImpl* generator,
- std::ostream& stream,
- const sem::Type* curr_type,
- const sem::Type* target_type)
- : s(stream) {
- auto* target_vec_type = target_type->As<sem::Vector>();
-
- // If we need to promote from scalar to vector, cast the scalar to the
- // vector element type.
- if (curr_type->is_scalar() && target_vec_type) {
- target_type = target_vec_type->type();
- }
-
- // Cast
- generator->EmitType(s, target_type, "");
- s << "(";
- }
-
- ~ScopedCast() { s << ")"; }
-
- private:
- std::ostream& s;
-};
-
} // namespace
SanitizedResult::SanitizedResult() = default;
@@ -196,6 +171,7 @@
transform::BuiltinPolyfill::Builtins polyfills;
polyfills.acosh = transform::BuiltinPolyfill::Level::kRangeCheck;
polyfills.atanh = transform::BuiltinPolyfill::Level::kRangeCheck;
+ polyfills.clamp_int = true;
polyfills.extract_bits = transform::BuiltinPolyfill::Level::kClampParameters;
polyfills.first_leading_bit = true;
polyfills.first_trailing_bit = true;
@@ -259,6 +235,7 @@
// it assumes that the form of the array length argument is &var.array.
manager.Add<transform::ArrayLengthFromUniform>();
manager.Add<transform::ModuleScopeVarToEntryPointParam>();
+ manager.Add<transform::PackedVec3>();
data.Add<transform::ArrayLengthFromUniform::Config>(std::move(array_length_from_uniform_cfg));
data.Add<transform::CanonicalizeEntryPointIO::Config>(std::move(entry_point_io_cfg));
auto out = manager.Run(in, data);
@@ -554,18 +531,8 @@
ScopedParen sp(out);
{
ScopedBitCast lhs_uint_cast(this, out, lhs_type, unsigned_type_of(target_type));
-
- // In case the type is packed, cast to our own type in order to remove the packing.
- // Otherwise, this just casts to itself.
- if (lhs_type->is_signed_integer_vector()) {
- ScopedCast lhs_self_cast(this, out, lhs_type, lhs_type);
- if (!EmitExpression(out, expr->lhs)) {
- return false;
- }
- } else {
- if (!EmitExpression(out, expr->lhs)) {
- return false;
- }
+ if (!EmitExpression(out, expr->lhs)) {
+ return false;
}
}
if (!emit_op()) {
@@ -573,18 +540,8 @@
}
{
ScopedBitCast rhs_uint_cast(this, out, rhs_type, unsigned_type_of(target_type));
-
- // In case the type is packed, cast to our own type in order to remove the packing.
- // Otherwise, this just casts to itself.
- if (rhs_type->is_signed_integer_vector()) {
- ScopedCast rhs_self_cast(this, out, rhs_type, rhs_type);
- if (!EmitExpression(out, expr->rhs)) {
- return false;
- }
- } else {
- if (!EmitExpression(out, expr->rhs)) {
- return false;
- }
+ if (!EmitExpression(out, expr->rhs)) {
+ return false;
}
}
return true;
@@ -601,18 +558,8 @@
ScopedParen sp(out);
{
ScopedBitCast lhs_uint_cast(this, out, lhs_type, unsigned_type_of(lhs_type));
-
- // In case the type is packed, cast to our own type in order to remove the packing.
- // Otherwise, this just casts to itself.
- if (lhs_type->is_signed_integer_vector()) {
- ScopedCast lhs_self_cast(this, out, lhs_type, lhs_type);
- if (!EmitExpression(out, expr->lhs)) {
- return false;
- }
- } else {
- if (!EmitExpression(out, expr->lhs)) {
- return false;
- }
+ if (!EmitExpression(out, expr->lhs)) {
+ return false;
}
}
if (!emit_op()) {
@@ -1092,9 +1039,7 @@
};
if (dims.size() == 1) {
- out << "int(";
get_dim(dims[0]);
- out << ")";
} else {
EmitType(out, TypeOf(expr)->UnwrapRef(), "");
out << "(";
@@ -1109,27 +1054,24 @@
return true;
}
case sem::BuiltinType::kTextureNumLayers: {
- out << "int(";
if (!texture_expr()) {
return false;
}
- out << ".get_array_size())";
+ out << ".get_array_size()";
return true;
}
case sem::BuiltinType::kTextureNumLevels: {
- out << "int(";
if (!texture_expr()) {
return false;
}
- out << ".get_num_mip_levels())";
+ out << ".get_num_mip_levels()";
return true;
}
case sem::BuiltinType::kTextureNumSamples: {
- out << "int(";
if (!texture_expr()) {
return false;
}
- out << ".get_num_samples())";
+ out << ".get_num_samples()";
return true;
}
default:
@@ -2785,41 +2727,6 @@
return false;
}
-bool GeneratorImpl::EmitPackedType(std::ostream& out,
- const sem::Type* type,
- const std::string& name) {
- auto* vec = type->As<sem::Vector>();
- if (vec && vec->Width() == 3) {
- out << "packed_";
- if (!EmitType(out, vec, "")) {
- return false;
- }
-
- if (vec->is_float_vector() && !matrix_packed_vector_overloads_) {
- // Overload operators for matrix-vector arithmetic where the vector
- // operand is packed, as these overloads to not exist in the metal
- // namespace.
- TextBuffer b;
- TINT_DEFER(helpers_.Append(b));
- line(&b) << R"(template<typename T, int N, int M>
-inline vec<T, M> operator*(matrix<T, N, M> lhs, packed_vec<T, N> rhs) {
- return lhs * vec<T, N>(rhs);
-}
-
-template<typename T, int N, int M>
-inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
- return vec<T, M>(lhs) * rhs;
-}
-)";
- matrix_packed_vector_overloads_ = true;
- }
-
- return true;
- }
-
- return EmitType(out, type, name);
-}
-
bool GeneratorImpl::EmitStructType(TextBuffer* b, const sem::Struct* str) {
line(b) << "struct " << StructName(str) << " {";
@@ -2866,14 +2773,15 @@
}
add_byte_offset_comment(out, msl_offset);
+ }
- if (!EmitPackedType(out, mem->Type(), mem_name)) {
- return false;
+ if (auto* decl = mem->Declaration()) {
+ if (ast::HasAttribute<transform::PackedVec3::Attribute>(decl->attributes)) {
+ out << "packed_";
}
- } else {
- if (!EmitType(out, mem->Type(), mem_name)) {
- return false;
- }
+ }
+ if (!EmitType(out, mem->Type(), mem_name)) {
+ return false;
}
auto* ty = mem->Type();
@@ -2939,6 +2847,7 @@
[&](const ast::StructMemberOffsetAttribute*) { return true; },
[&](const ast::StructMemberAlignAttribute*) { return true; },
[&](const ast::StructMemberSizeAttribute*) { return true; },
+ [&](const transform::PackedVec3::Attribute*) { return true; },
[&](Default) {
TINT_ICE(Writer, diagnostics_)
<< "unhandled struct member attribute: " << attr->Name();
diff --git a/src/tint/writer/msl/generator_impl.h b/src/tint/writer/msl/generator_impl.h
index 188bfea..c3e1ac0 100644
--- a/src/tint/writer/msl/generator_impl.h
+++ b/src/tint/writer/msl/generator_impl.h
@@ -328,14 +328,6 @@
/// @param sc the address space to generate
/// @returns true if the address space is emitted
bool EmitAddressSpace(std::ostream& out, ast::AddressSpace sc);
- /// Handles generating an MSL-packed storage type.
- /// If the type does not have a packed form, the standard non-packed form is
- /// emitted.
- /// @param out the output of the type stream
- /// @param type the type to generate
- /// @param name the name of the variable, only used for array emission
- /// @returns true if the type is emitted
- bool EmitPackedType(std::ostream& out, const sem::Type* type, const std::string& name);
/// Handles generating a struct declaration
/// @param buffer the text buffer that the type declaration will be written to
/// @param str the struct to generate
@@ -431,8 +423,8 @@
/// Non-empty only if an invariant attribute has been generated.
std::string invariant_define_name_;
- /// True if matrix-packed_vector operator overloads have been generated.
- bool matrix_packed_vector_overloads_ = false;
+ /// The generated name for the packed vec3 type.
+ std::string packed_vec3_ty_;
/// Unique name of the tint_array<T, N> template.
/// Non-empty only if the template has been generated.
diff --git a/src/tint/writer/msl/generator_impl_binary_test.cc b/src/tint/writer/msl/generator_impl_binary_test.cc
index e08c420..fc03507 100644
--- a/src/tint/writer/msl/generator_impl_binary_test.cc
+++ b/src/tint/writer/msl/generator_impl_binary_test.cc
@@ -128,18 +128,14 @@
}
using Op = ast::BinaryOp;
constexpr BinaryData signed_overflow_defined_behaviour_chained_cases[] = {
- {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) << b))) << "
- "b))",
+ {R"(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) << b))) << b)))",
Op::kShiftLeft},
- {"((a >> b) >> b)", Op::kShiftRight},
- {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + "
- "as_type<uint>(b)))) + as_type<uint>(b)))",
+ {R"(((a >> b) >> b))", Op::kShiftRight},
+ {R"(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + as_type<uint>(b)))) + as_type<uint>(b))))",
Op::kAdd},
- {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) - "
- "as_type<uint>(b)))) - as_type<uint>(b)))",
+ {R"(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) - as_type<uint>(b)))) - as_type<uint>(b))))",
Op::kSubtract},
- {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) * "
- "as_type<uint>(b)))) * as_type<uint>(b)))",
+ {R"(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) * as_type<uint>(b)))) * as_type<uint>(b))))",
Op::kMultiply}};
INSTANTIATE_TEST_SUITE_P(MslGeneratorImplTest,
MslBinaryTest_SignedOverflowDefinedBehaviour_Chained,
diff --git a/src/tint/writer/msl/generator_impl_builtin_texture_test.cc b/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
index dd4a92f..ef5b427 100644
--- a/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
+++ b/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
@@ -24,7 +24,7 @@
switch (overload) {
case ValidTextureOverload::kDimensions1d:
case ValidTextureOverload::kDimensionsStorageWO1d:
- return R"(int(texture.get_width(0)))";
+ return R"(texture.get_width(0))";
case ValidTextureOverload::kDimensions2d:
case ValidTextureOverload::kDimensions2dArray:
case ValidTextureOverload::kDimensionsCube:
@@ -37,10 +37,10 @@
case ValidTextureOverload::kDimensionsDepthMultisampled2d:
case ValidTextureOverload::kDimensionsStorageWO2d:
case ValidTextureOverload::kDimensionsStorageWO2dArray:
- return R"(int2(texture.get_width(), texture.get_height()))";
+ return R"(uint2(texture.get_width(), texture.get_height()))";
case ValidTextureOverload::kDimensions3d:
case ValidTextureOverload::kDimensionsStorageWO3d:
- return R"(int3(texture.get_width(), texture.get_height(), texture.get_depth()))";
+ return R"(uint3(texture.get_width(), texture.get_height(), texture.get_depth()))";
case ValidTextureOverload::kDimensions2dLevel:
case ValidTextureOverload::kDimensionsCubeLevel:
case ValidTextureOverload::kDimensionsCubeArrayLevel:
@@ -49,9 +49,9 @@
case ValidTextureOverload::kDimensionsDepth2dArrayLevel:
case ValidTextureOverload::kDimensionsDepthCubeLevel:
case ValidTextureOverload::kDimensionsDepthCubeArrayLevel:
- return R"(int2(texture.get_width(1), texture.get_height(1)))";
+ return R"(uint2(texture.get_width(1), texture.get_height(1)))";
case ValidTextureOverload::kDimensions3dLevel:
- return R"(int3(texture.get_width(1), texture.get_height(1), texture.get_depth(1)))";
+ return R"(uint3(texture.get_width(1), texture.get_height(1), texture.get_depth(1)))";
case ValidTextureOverload::kGather2dF32:
return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(0), component::x))";
case ValidTextureOverload::kGather2dOffsetF32:
@@ -59,23 +59,23 @@
case ValidTextureOverload::kGather2dArrayF32:
return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(0), component::x))";
case ValidTextureOverload::kGather2dArrayOffsetF32:
- return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5), component::x))";
+ return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3u, int2(4, 5), component::x))";
case ValidTextureOverload::kGatherCubeF32:
return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), component::x))";
case ValidTextureOverload::kGatherCubeArrayF32:
- return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4, component::x))";
+ return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4u, component::x))";
case ValidTextureOverload::kGatherDepth2dF32:
return R"(texture.gather(sampler, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kGatherDepth2dOffsetF32:
return R"(texture.gather(sampler, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kGatherDepth2dArrayF32:
- return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3))";
+ return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3u))";
case ValidTextureOverload::kGatherDepth2dArrayOffsetF32:
return R"(texture.gather(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
case ValidTextureOverload::kGatherDepthCubeF32:
return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kGatherDepthCubeArrayF32:
- return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
+ return R"(texture.gather(sampler, float3(1.0f, 2.0f, 3.0f), 4u))";
case ValidTextureOverload::kGatherCompareDepth2dF32:
return R"(texture.gather_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kGatherCompareDepth2dOffsetF32:
@@ -87,13 +87,13 @@
case ValidTextureOverload::kGatherCompareDepthCubeF32:
return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kGatherCompareDepthCubeArrayF32:
- return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
+ return R"(texture.gather_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4u, 5.0f))";
case ValidTextureOverload::kNumLayers2dArray:
case ValidTextureOverload::kNumLayersCubeArray:
case ValidTextureOverload::kNumLayersDepth2dArray:
case ValidTextureOverload::kNumLayersDepthCubeArray:
case ValidTextureOverload::kNumLayersStorageWO2dArray:
- return R"(int(texture.get_array_size()))";
+ return R"(texture.get_array_size())";
case ValidTextureOverload::kNumLevels2d:
case ValidTextureOverload::kNumLevels2dArray:
case ValidTextureOverload::kNumLevels3d:
@@ -103,10 +103,10 @@
case ValidTextureOverload::kNumLevelsDepth2dArray:
case ValidTextureOverload::kNumLevelsDepthCube:
case ValidTextureOverload::kNumLevelsDepthCubeArray:
- return R"(int(texture.get_num_mip_levels()))";
+ return R"(texture.get_num_mip_levels())";
case ValidTextureOverload::kNumSamplesDepthMultisampled2d:
case ValidTextureOverload::kNumSamplesMultisampled2d:
- return R"(int(texture.get_num_samples()))";
+ return R"(texture.get_num_samples())";
case ValidTextureOverload::kSample1dF32:
return R"(texture.sample(sampler, 1.0f))";
case ValidTextureOverload::kSample2dF32:
@@ -116,7 +116,7 @@
case ValidTextureOverload::kSample2dArrayF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3))";
case ValidTextureOverload::kSample2dArrayOffsetF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, int2(4, 5)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3u, int2(4, 5)))";
case ValidTextureOverload::kSample3dF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSample3dOffsetF32:
@@ -136,13 +136,13 @@
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
- return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4))";
+ return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4u))";
case ValidTextureOverload::kSampleBias2dF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f)))";
case ValidTextureOverload::kSampleBias2dOffsetF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), bias(3.0f), int2(4, 5)))";
case ValidTextureOverload::kSampleBias2dArrayF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), 4, bias(3.0f)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), 4u, bias(3.0f)))";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, bias(4.0f), int2(5, 6)))";
case ValidTextureOverload::kSampleBias3dF32:
@@ -170,13 +170,13 @@
case ValidTextureOverload::kSampleLevelCubeArrayF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, level(5.0f)))";
case ValidTextureOverload::kSampleLevelDepth2dF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3u)))";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), level(3), int2(4, 5)))";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3u, level(4u)))";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, level(4), int2(5, 6)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3u, level(4u), int2(5, 6)))";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), level(4)))";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
@@ -188,7 +188,7 @@
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
- return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(6, 7)))";
+ return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3u, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(6, 7)))";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
@@ -196,7 +196,7 @@
case ValidTextureOverload::kSampleGradCubeF32:
return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), gradientcube(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
case ValidTextureOverload::kSampleGradCubeArrayF32:
- return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
+ return R"(texture.sample(sampler, float3(1.0f, 2.0f, 3.0f), 4u, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
case ValidTextureOverload::kSampleCompareDepth2dF32:
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
@@ -204,66 +204,65 @@
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
- return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
+ return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4u, 3.0f, int2(5, 6)))";
case ValidTextureOverload::kSampleCompareDepthCubeF32:
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
- return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
+ return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, level(0)))";
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
- return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
+ return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, level(0), int2(4, 5)))";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
- return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
+ return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f, level(0)))";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
- return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
+ return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3, 4.0f, level(0), int2(5, 6)))";
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
- return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
+ return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f, level(0)))";
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
- return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
+ return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f, level(0)))";
case ValidTextureOverload::kLoad1dLevelF32:
- return R"(texture.read(uint(1), 0))";
+ return R"(texture.read(uint(1u), 0))";
case ValidTextureOverload::kLoad1dLevelU32:
return R"(texture.read(uint(1), 0))";
case ValidTextureOverload::kLoad1dLevelI32:
return R"(texture.read(uint(1), 0))";
case ValidTextureOverload::kLoad2dLevelF32:
- return R"(texture.read(uint2(int2(1, 2)), 3))";
+ return R"(texture.read(uint2(uint2(1u, 2u)), 3u))";
case ValidTextureOverload::kLoad2dLevelU32:
return R"(texture.read(uint2(int2(1, 2)), 3))";
- case ValidTextureOverload::kLoad2dLevelI32:
- return R"(texture.read(uint2(int2(1, 2)), 3))";
case ValidTextureOverload::kLoad2dArrayLevelF32:
return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
case ValidTextureOverload::kLoad2dArrayLevelU32:
return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
case ValidTextureOverload::kLoad2dArrayLevelI32:
- return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+ return R"(texture.read(uint2(uint2(1u, 2u)), 3u, 4u))";
case ValidTextureOverload::kLoad3dLevelF32:
return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
case ValidTextureOverload::kLoad3dLevelU32:
return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
case ValidTextureOverload::kLoad3dLevelI32:
- return R"(texture.read(uint3(int3(1, 2, 3)), 4))";
+ return R"(texture.read(uint3(uint3(1u, 2u, 3u)), 4u))";
case ValidTextureOverload::kLoadMultisampled2dF32:
- return R"(texture.read(uint2(int2(1, 2)), 3))";
case ValidTextureOverload::kLoadMultisampled2dU32:
return R"(texture.read(uint2(int2(1, 2)), 3))";
+ case ValidTextureOverload::kLoad2dLevelI32:
case ValidTextureOverload::kLoadMultisampled2dI32:
- return R"(texture.read(uint2(int2(1, 2)), 3))";
+ return R"(texture.read(uint2(uint2(1u, 2u)), 3u))";
case ValidTextureOverload::kLoadDepth2dLevelF32:
- case ValidTextureOverload::kLoadDepthMultisampled2dF32:
return R"(texture.read(uint2(int2(1, 2)), 3))";
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
- return R"(texture.read(uint2(int2(1, 2)), 3, 4))";
+ return R"(texture.read(uint2(uint2(1u, 2u)), 3u, 4u))";
+ case ValidTextureOverload::kLoadDepthMultisampled2dF32:
+ return R"(texture.read(uint2(uint2(1u, 2u)), 3u))";
case ValidTextureOverload::kStoreWO1dRgba32float:
return R"(texture.write(float4(2.0f, 3.0f, 4.0f, 5.0f), uint(1)))";
case ValidTextureOverload::kStoreWO2dRgba32float:
return R"(texture.write(float4(3.0f, 4.0f, 5.0f, 6.0f), uint2(int2(1, 2))))";
case ValidTextureOverload::kStoreWO2dArrayRgba32float:
- return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint2(int2(1, 2)), 3))";
+ return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint2(uint2(1u, 2u)), 3u))";
case ValidTextureOverload::kStoreWO3dRgba32float:
- return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint3(int3(1, 2, 3))))";
+ return R"(texture.write(float4(4.0f, 5.0f, 6.0f, 7.0f), uint3(uint3(1u, 2u, 3u))))";
}
return "<unmatched texture overload>";
} // NOLINT - Ignore the length of this function
diff --git a/src/tint/writer/msl/generator_impl_type_test.cc b/src/tint/writer/msl/generator_impl_type_test.cc
index bc9767a..27de589 100644
--- a/src/tint/writer/msl/generator_impl_type_test.cc
+++ b/src/tint/writer/msl/generator_impl_type_test.cc
@@ -60,7 +60,7 @@
// Size and alignments taken from the MSL spec:
// https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
DECLARE_TYPE(float2, 8, 8);
-DECLARE_TYPE(packed_float3, 12, 4);
+DECLARE_TYPE(float3, 12, 4);
DECLARE_TYPE(float4, 16, 16);
DECLARE_TYPE(float2x2, 16, 8);
DECLARE_TYPE(float2x3, 32, 16);
@@ -301,7 +301,7 @@
FIELD(0x0100, float2, 0, c) \
FIELD(0x0108, uint, 0, d) \
FIELD(0x010c, int8_t, 4, tint_pad_2) \
- FIELD(0x0110, packed_float3, 0, e) \
+ FIELD(0x0110, float3, 0, e) \
FIELD(0x011c, uint, 0, f) \
FIELD(0x0120, float4, 0, g) \
FIELD(0x0130, uint, 0, h) \
@@ -641,7 +641,7 @@
/* 0x0100 */ float2 tint_pad_33;
/* 0x0108 */ uint tint_pad_1;
/* 0x010c */ tint_array<int8_t, 4> tint_pad_12;
- /* 0x0110 */ packed_float3 tint_pad_3;
+ /* 0x0110 */ float3 tint_pad_3;
/* 0x011c */ uint tint_pad_7;
/* 0x0120 */ float4 tint_pad_25;
/* 0x0130 */ uint tint_pad_5;
diff --git a/src/tint/writer/spirv/builder.cc b/src/tint/writer/spirv/builder.cc
index 91b16b4..97a29f3 100644
--- a/src/tint/writer/spirv/builder.cc
+++ b/src/tint/writer/spirv/builder.cc
@@ -2937,9 +2937,9 @@
return false;
}
auto level = Operand(0u);
- if (arg(Usage::kLevel)->Type()->UnwrapRef()->Is<sem::I32>()) {
- // Depth textures have i32 parameters for the level, but SPIR-V expects
- // F32. Cast.
+ if (arg(Usage::kLevel)->Type()->UnwrapRef()->IsAnyOf<sem::I32, sem::U32>()) {
+ // Depth textures have i32 or u32 parameters for the level, but SPIR-V expects f32.
+ // Cast.
auto f32_type_id = GenerateTypeIfNeeded(builder_.create<sem::F32>());
if (f32_type_id == 0) {
return 0;
@@ -3238,13 +3238,19 @@
return false;
}
- // values_equal := original_value == value
+ // https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpAtomicCompareExchange
+ // According to SPIR-V spec, during the atomic steps of OpAtomicCompareExchange, the new
+ // value will be stored only if original value equals to comparator, and the result of
+ // OpAtomicCompareExchange is the original value. Therefore to check if the exchanging
+ // has been executed, we should compare the result original_value to comparator.
+
+ // values_equal := original_value == comparator
auto values_equal = result_op();
if (!push_function_inst(spv::Op::OpIEqual, {
Operand(bool_type),
values_equal,
original_value,
- value,
+ Operand(comparator),
})) {
return false;
}
diff --git a/src/tint/writer/spirv/builder_builtin_test.cc b/src/tint/writer/spirv/builder_builtin_test.cc
index dddc475..3c97da7 100644
--- a/src/tint/writer/spirv/builder_builtin_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_test.cc
@@ -3622,11 +3622,11 @@
auto* expected_instructions = R"(%17 = OpAccessChain %16 %1 %14
%20 = OpAtomicCompareExchange %4 %17 %13 %14 %14 %18 %19
-%21 = OpIEqual %12 %20 %18
+%21 = OpIEqual %12 %20 %19
%10 = OpCompositeConstruct %11 %20 %21
%26 = OpAccessChain %25 %1 %13
%29 = OpAtomicCompareExchange %5 %26 %13 %14 %14 %27 %28
-%30 = OpIEqual %12 %29 %27
+%30 = OpIEqual %12 %29 %28
%22 = OpCompositeConstruct %23 %29 %30
OpReturn
)";
diff --git a/src/tint/writer/spirv/builder_builtin_texture_test.cc b/src/tint/writer/spirv/builder_builtin_texture_test.cc
index b5fcc9c..793371b 100644
--- a/src/tint/writer/spirv/builder_builtin_texture_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_texture_test.cc
@@ -42,12 +42,13 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
-%11 = OpConstant %9 0
+%9 = OpTypeInt 32 0
+%11 = OpTypeInt 32 1
+%12 = OpConstant %11 0
)",
R"(
%10 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %10 %11
+%8 = OpImageQuerySizeLod %9 %10 %12
)",
R"(
OpCapability Sampled1D
@@ -63,13 +64,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 0
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -84,13 +86,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 1
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -105,14 +108,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 0
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -128,14 +132,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 1
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -151,13 +156,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 3
-%12 = OpConstant %10 0
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 0
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -172,13 +178,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 3
-%12 = OpConstant %10 1
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 1
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -193,13 +200,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 0
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -214,13 +222,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 1
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -235,14 +244,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 0
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -259,14 +269,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 1
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -283,7 +294,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
)",
R"(
@@ -303,13 +314,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 0
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -324,13 +336,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 1
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -345,14 +358,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 0
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -368,14 +382,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 1
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -391,13 +406,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 0
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 0
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -412,13 +428,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
-%12 = OpConstant %10 1
+%12 = OpTypeInt 32 1
+%13 = OpConstant %12 1
)",
R"(
%11 = OpLoad %3 %1
-%8 = OpImageQuerySizeLod %9 %11 %12
+%8 = OpImageQuerySizeLod %9 %11 %13
)",
R"(
OpCapability ImageQuery
@@ -433,14 +450,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 0
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 0
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -457,14 +475,15 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
-%14 = OpConstant %10 1
+%14 = OpTypeInt 32 1
+%15 = OpConstant %14 1
)",
R"(
%13 = OpLoad %3 %1
-%11 = OpImageQuerySizeLod %12 %13 %14
+%11 = OpImageQuerySizeLod %12 %13 %15
%8 = OpVectorShuffle %9 %11 %11 0 1
)",
R"(
@@ -481,7 +500,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
)",
R"(
@@ -501,7 +520,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -521,7 +540,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
)",
R"(
@@ -541,7 +560,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 2
%12 = OpTypeVector %10 3
)",
@@ -563,7 +582,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%10 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
%9 = OpTypeVector %10 3
)",
R"(
@@ -614,18 +633,19 @@
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%17 = OpConstantComposite %14 %15 %16
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstantNull %18
-%20 = OpTypeVector %18 2
-%21 = OpConstant %18 3
-%22 = OpConstant %18 4
-%23 = OpConstantComposite %20 %21 %22
+%21 = OpTypeInt 32 1
+%20 = OpTypeVector %21 2
+%22 = OpConstant %21 3
+%23 = OpConstant %21 4
+%24 = OpConstantComposite %20 %22 %23
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%8 = OpImageGather %9 %13 %17 %19 ConstOffset %23
+%8 = OpImageGather %9 %13 %17 %19 ConstOffset %24
)",
R"(
)"};
@@ -671,21 +691,22 @@
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 3
%21 = OpConstantNull %18
-%22 = OpTypeVector %18 2
-%23 = OpConstant %18 4
-%24 = OpConstant %18 5
-%25 = OpConstantComposite %22 %23 %24
+%23 = OpTypeInt 32 1
+%22 = OpTypeVector %23 2
+%24 = OpConstant %23 4
+%25 = OpConstant %23 5
+%26 = OpConstantComposite %22 %24 %25
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21 ConstOffset %25
+%8 = OpImageGather %9 %13 %20 %21 ConstOffset %26
)",
R"(
)"};
@@ -730,7 +751,7 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 4
%21 = OpConstantNull %18
)",
@@ -738,7 +759,7 @@
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageGather %9 %13 %20 %21
)",
@@ -815,17 +836,18 @@
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 3
-%21 = OpConstant %18 0
+%21 = OpTypeInt 32 1
+%22 = OpConstant %21 0
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
+%8 = OpImageGather %9 %13 %20 %22
)",
R"(
)"};
@@ -902,17 +924,18 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 4
-%21 = OpConstant %18 0
+%21 = OpTypeInt 32 1
+%22 = OpConstant %21 0
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
-%8 = OpImageGather %9 %13 %20 %21
+%8 = OpImageGather %9 %13 %20 %22
)",
R"(
OpCapability SampledCubeArray
@@ -1072,7 +1095,7 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 4
%21 = OpConstant %4 5
)",
@@ -1080,7 +1103,7 @@
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageDrefGather %9 %13 %20 %21
)",
@@ -1096,13 +1119,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
+%13 = OpTypeInt 32 1
+%14 = OpConstant %13 0
)",
R"(
%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
+%10 = OpImageQuerySizeLod %11 %12 %14
%8 = OpCompositeExtract %9 %10 2
)",
R"(
@@ -1117,13 +1141,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
+%13 = OpTypeInt 32 1
+%14 = OpConstant %13 0
)",
R"(
%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
+%10 = OpImageQuerySizeLod %11 %12 %14
%8 = OpCompositeExtract %9 %10 2
)",
R"(
@@ -1139,13 +1164,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
+%13 = OpTypeInt 32 1
+%14 = OpConstant %13 0
)",
R"(
%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
+%10 = OpImageQuerySizeLod %11 %12 %14
%8 = OpCompositeExtract %9 %10 2
)",
R"(
@@ -1160,13 +1186,14 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
%11 = OpTypeVector %9 3
-%13 = OpConstant %9 0
+%13 = OpTypeInt 32 1
+%14 = OpConstant %13 0
)",
R"(
%12 = OpLoad %3 %1
-%10 = OpImageQuerySizeLod %11 %12 %13
+%10 = OpImageQuerySizeLod %11 %12 %14
%8 = OpCompositeExtract %9 %10 2
)",
R"(
@@ -1182,7 +1209,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
%11 = OpTypeVector %9 3
)",
R"(
@@ -1202,7 +1229,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1220,7 +1247,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1238,7 +1265,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1256,7 +1283,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1274,7 +1301,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1293,7 +1320,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1311,7 +1338,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1329,7 +1356,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1347,7 +1374,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1366,7 +1393,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1384,7 +1411,7 @@
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
-%9 = OpTypeInt 32 1
+%9 = OpTypeInt 32 0
)",
R"(
%10 = OpLoad %3 %1
@@ -1514,20 +1541,21 @@
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 3
-%21 = OpTypeVector %18 2
-%22 = OpConstant %18 4
-%23 = OpConstant %18 5
-%24 = OpConstantComposite %21 %22 %23
+%22 = OpTypeInt 32 1
+%21 = OpTypeVector %22 2
+%23 = OpConstant %22 4
+%24 = OpConstant %22 5
+%25 = OpConstantComposite %21 %23 %24
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleImplicitLod %9 %13 %20 ConstOffset %24
+%8 = OpImageSampleImplicitLod %9 %13 %20 ConstOffset %25
)",
R"(
)"};
@@ -1805,14 +1833,14 @@
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%17 = OpConstant %4 3
-%19 = OpTypeInt 32 1
+%19 = OpTypeInt 32 0
%20 = OpConstant %19 4
)",
R"(
%11 = OpLoad %7 %5
%12 = OpLoad %3 %1
%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
+%18 = OpConvertUToF %4 %20
%21 = OpCompositeConstruct %10 %15 %16 %17 %18
%9 = OpImageSampleImplicitLod %10 %14 %21
%8 = OpCompositeExtract %4 %9 0
@@ -1892,7 +1920,7 @@
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 4
%21 = OpConstant %4 3
)",
@@ -1900,7 +1928,7 @@
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
)",
@@ -2308,7 +2336,7 @@
%16 = OpConstant %4 1
%17 = OpConstant %4 2
%18 = OpConstantComposite %15 %16 %17
-%20 = OpTypeInt 32 1
+%20 = OpTypeInt 32 0
%21 = OpConstant %20 3
)",
R"(
@@ -2369,7 +2397,7 @@
%15 = OpTypeVector %4 3
%16 = OpConstant %4 1
%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
+%19 = OpTypeInt 32 0
%20 = OpConstant %19 3
%23 = OpConstant %19 4
)",
@@ -2377,7 +2405,7 @@
%11 = OpLoad %7 %5
%12 = OpLoad %3 %1
%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
+%18 = OpConvertUToF %4 %20
%21 = OpCompositeConstruct %15 %16 %17 %18
%22 = OpConvertSToF %4 %23
%9 = OpImageSampleExplicitLod %10 %14 %21 Lod %22
@@ -2400,22 +2428,23 @@
%15 = OpTypeVector %4 3
%16 = OpConstant %4 1
%17 = OpConstant %4 2
-%19 = OpTypeInt 32 1
+%19 = OpTypeInt 32 0
%20 = OpConstant %19 3
%23 = OpConstant %19 4
-%24 = OpTypeVector %19 2
-%25 = OpConstant %19 5
-%26 = OpConstant %19 6
-%27 = OpConstantComposite %24 %25 %26
+%25 = OpTypeInt 32 1
+%24 = OpTypeVector %25 2
+%26 = OpConstant %25 5
+%27 = OpConstant %25 6
+%28 = OpConstantComposite %24 %26 %27
)",
R"(
%11 = OpLoad %7 %5
%12 = OpLoad %3 %1
%14 = OpSampledImage %13 %12 %11
-%18 = OpConvertSToF %4 %20
+%18 = OpConvertUToF %4 %20
%21 = OpCompositeConstruct %15 %16 %17 %18
%22 = OpConvertSToF %4 %23
-%9 = OpImageSampleExplicitLod %10 %14 %21 Lod|ConstOffset %22 %27
+%9 = OpImageSampleExplicitLod %10 %14 %21 Lod|ConstOffset %22 %28
%8 = OpCompositeExtract %4 %9 0
)",
R"(
@@ -2598,7 +2627,7 @@
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 3
%21 = OpTypeVector %4 2
%22 = OpConstant %4 4
@@ -2607,18 +2636,19 @@
%25 = OpConstant %4 6
%26 = OpConstant %4 7
%27 = OpConstantComposite %21 %25 %26
-%28 = OpTypeVector %18 2
-%29 = OpConstant %18 6
-%30 = OpConstant %18 7
-%31 = OpConstantComposite %28 %29 %30
+%29 = OpTypeInt 32 1
+%28 = OpTypeVector %29 2
+%30 = OpConstant %29 6
+%31 = OpConstant %29 7
+%32 = OpConstantComposite %28 %30 %31
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
-%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|ConstOffset %24 %27 %31
+%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|ConstOffset %24 %27 %32
)",
R"(
)"};
@@ -2745,7 +2775,7 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
-%18 = OpTypeInt 32 1
+%18 = OpTypeInt 32 0
%19 = OpConstant %18 4
%21 = OpTypeVector %4 3
%22 = OpConstant %4 5
@@ -2761,7 +2791,7 @@
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
-%17 = OpConvertSToF %4 %19
+%17 = OpConvertUToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %25 %29
)",
@@ -2865,21 +2895,22 @@
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
-%17 = OpTypeInt 32 1
+%17 = OpTypeInt 32 0
%18 = OpConstant %17 4
%20 = OpConstant %4 3
-%21 = OpTypeVector %17 2
-%22 = OpConstant %17 5
-%23 = OpConstant %17 6
-%24 = OpConstantComposite %21 %22 %23
+%22 = OpTypeInt 32 1
+%21 = OpTypeVector %22 2
+%23 = OpConstant %22 5
+%24 = OpConstant %22 6
+%25 = OpConstantComposite %21 %23 %24
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
-%16 = OpConvertSToF %4 %18
+%16 = OpConvertUToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
-%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20 ConstOffset %24
+%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20 ConstOffset %25
)",
R"(
)"};
@@ -3011,8 +3042,8 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
+%18 = OpConstant %17 3
+%20 = OpConstant %4 4
%21 = OpConstant %4 0
)",
R"(
@@ -3040,8 +3071,8 @@
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 1
-%18 = OpConstant %17 4
-%20 = OpConstant %4 3
+%18 = OpConstant %17 3
+%20 = OpConstant %4 4
%21 = OpConstant %4 0
%22 = OpTypeVector %17 2
%23 = OpConstant %17 5
@@ -3127,7 +3158,7 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%11 = OpTypeInt 32 1
+%11 = OpTypeInt 32 0
%12 = OpConstant %11 1
%13 = OpConstant %11 3
)",
@@ -3192,7 +3223,7 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%12 = OpTypeInt 32 1
+%12 = OpTypeInt 32 0
%11 = OpTypeVector %12 2
%13 = OpConstant %12 1
%14 = OpConstant %12 2
@@ -3240,15 +3271,16 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 2
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstantComposite %11 %12 %13
-%15 = OpConstant %4 3
+%12 = OpTypeInt 32 0
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
)",
R"(
%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %14 Lod %15
+%8 = OpImageFetch %9 %10 %15 Lod %16
)",
R"(
)"};
@@ -3313,16 +3345,17 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 3
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstant %4 3
-%15 = OpConstantComposite %11 %12 %13 %14
-%16 = OpConstant %4 4
+%12 = OpTypeInt 32 0
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
)",
R"(
%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
+%8 = OpImageFetch %9 %10 %16 Lod %17
)",
R"(
)"};
@@ -3387,16 +3420,17 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 3
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstant %4 3
-%15 = OpConstantComposite %11 %12 %13 %14
-%16 = OpConstant %4 4
+%12 = OpTypeInt 32 0
+%11 = OpTypeVector %12 3
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstant %12 3
+%16 = OpConstantComposite %11 %13 %14 %15
+%17 = OpConstant %12 4
)",
R"(
%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %15 Lod %16
+%8 = OpImageFetch %9 %10 %16 Lod %17
)",
R"(
)"};
@@ -3459,15 +3493,16 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVector %4 4
-%11 = OpTypeVector %4 2
-%12 = OpConstant %4 1
-%13 = OpConstant %4 2
-%14 = OpConstantComposite %11 %12 %13
-%15 = OpConstant %4 3
+%12 = OpTypeInt 32 0
+%11 = OpTypeVector %12 2
+%13 = OpConstant %12 1
+%14 = OpConstant %12 2
+%15 = OpConstantComposite %11 %13 %14
+%16 = OpConstant %12 3
)",
R"(
%10 = OpLoad %3 %1
-%8 = OpImageFetch %9 %10 %14 Sample %15
+%8 = OpImageFetch %9 %10 %15 Sample %16
)",
R"(
)"};
@@ -3507,7 +3542,7 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%10 = OpTypeVector %4 4
-%13 = OpTypeInt 32 1
+%13 = OpTypeInt 32 0
%12 = OpTypeVector %13 3
%14 = OpConstant %13 1
%15 = OpConstant %13 2
@@ -3526,24 +3561,23 @@
return {
R"(
%4 = OpTypeFloat 32
-%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
+%3 = OpTypeImage %4 2D 0 0 1 1 Unknown
%2 = OpTypePointer UniformConstant %3
%1 = OpVariable %2 UniformConstant
%7 = OpTypeSampler
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%10 = OpTypeVector %4 4
-%13 = OpTypeInt 32 1
-%12 = OpTypeVector %13 3
+%13 = OpTypeInt 32 0
+%12 = OpTypeVector %13 2
%14 = OpConstant %13 1
%15 = OpConstant %13 2
-%16 = OpConstant %13 3
-%17 = OpConstantComposite %12 %14 %15 %16
-%18 = OpConstant %13 4
+%16 = OpConstantComposite %12 %14 %15
+%17 = OpConstant %13 3
)",
R"(
%11 = OpLoad %3 %1
-%9 = OpImageFetch %10 %11 %17 Sample %18
+%9 = OpImageFetch %10 %11 %16 Sample %17
%8 = OpCompositeExtract %4 %9 0
)",
R"(
@@ -3615,7 +3649,7 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVoid
-%12 = OpTypeInt 32 1
+%12 = OpTypeInt 32 0
%11 = OpTypeVector %12 3
%13 = OpConstant %12 1
%14 = OpConstant %12 2
@@ -3645,7 +3679,7 @@
%6 = OpTypePointer UniformConstant %7
%5 = OpVariable %6 UniformConstant
%9 = OpTypeVoid
-%12 = OpTypeInt 32 1
+%12 = OpTypeInt 32 0
%11 = OpTypeVector %12 3
%13 = OpConstant %12 1
%14 = OpConstant %12 2
diff --git a/src/tint/writer/spirv/generator_impl.cc b/src/tint/writer/spirv/generator_impl.cc
index 8d80a62..f75f1f2 100644
--- a/src/tint/writer/spirv/generator_impl.cc
+++ b/src/tint/writer/spirv/generator_impl.cc
@@ -25,6 +25,7 @@
#include "src/tint/transform/expand_compound_assignment.h"
#include "src/tint/transform/for_loop_to_loop.h"
#include "src/tint/transform/manager.h"
+#include "src/tint/transform/merge_return.h"
#include "src/tint/transform/promote_side_effects_to_decl.h"
#include "src/tint/transform/remove_phonies.h"
#include "src/tint/transform/remove_unreachable_statements.h"
@@ -51,6 +52,7 @@
transform::BuiltinPolyfill::Builtins polyfills;
polyfills.acosh = transform::BuiltinPolyfill::Level::kRangeCheck;
polyfills.atanh = transform::BuiltinPolyfill::Level::kRangeCheck;
+ polyfills.clamp_int = true;
polyfills.count_leading_zeros = true;
polyfills.count_trailing_zeros = true;
polyfills.extract_bits = transform::BuiltinPolyfill::Level::kClampParameters;
@@ -84,6 +86,7 @@
manager.Add<transform::VectorizeScalarMatrixInitializers>();
manager.Add<transform::VectorizeMatrixConversions>();
manager.Add<transform::WhileToLoop>(); // ZeroInitWorkgroupMemory
+ manager.Add<transform::MergeReturn>();
manager.Add<transform::CanonicalizeEntryPointIO>();
manager.Add<transform::AddEmptyEntryPoint>();
manager.Add<transform::AddBlockAttribute>();