tint: Allow signed / unsigned texture builtin params
Bug: tint:1526
Change-Id: I301a9ba6e94b162a1ffb436be3e3212b723b7401
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106682
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/ast/builtin_texture_helper_test.cc b/src/tint/ast/builtin_texture_helper_test.cc
index 37d4d65..b21fae4 100644
--- a/src/tint/ast/builtin_texture_helper_test.cc
+++ b/src/tint/ast/builtin_texture_helper_test.cc
@@ -464,7 +464,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 +475,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 +504,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 +516,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 +544,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 +601,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 +611,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 +655,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 +665,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 +771,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,7 +782,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
5_f); // depth_ref
},
},
@@ -1009,7 +1009,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 +1020,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 +1185,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 +1195,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 +1241,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 +1252,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 +1515,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 +1525,7 @@
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1_f, 2_f), // coords
- 3_i); // level
+ 3_u); // level
},
},
{
@@ -1553,8 +1553,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 +1564,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 +1573,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 +1585,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 +1697,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 +1710,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 +1783,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 +1795,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 +1863,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 +1875,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
},
@@ -1921,16 +1921,16 @@
{
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 +1966,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 +1996,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 +2045,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 +2092,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 +2137,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 +2167,18 @@
{
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
},
},
{
@@ -2216,8 +2216,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 +2226,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 +2243,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/intrinsics.def b/src/tint/intrinsics.def
index 478be0d..54f2a85 100644
--- a/src/tint/intrinsics.def
+++ b/src/tint/intrinsics.def
@@ -555,50 +555,50 @@
@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, C: iu32>(texture: texture_1d<T>, level: C) -> 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, C: iu32>(texture: texture_2d<T>, level: C) -> 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, C: iu32>(texture: texture_2d_array<T>, level: C) -> 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, C: iu32>(texture: texture_3d<T>, level: C) -> 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, C: iu32>(texture: texture_cube<T>, level: C) -> 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, C: iu32>(texture: texture_cube_array<T>, level: C) -> 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<C: iu32>(texture: texture_depth_2d, level: C) -> vec2<i32>
fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
+fn textureDimensions<C: iu32>(texture: texture_depth_2d_array, level: C) -> vec2<i32>
fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
+fn textureDimensions<C: iu32>(texture: texture_depth_cube, level: C) -> vec2<i32>
fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
+fn textureDimensions<C: iu32>(texture: texture_depth_cube_array, level: C) -> 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 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>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<T>
+fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C, @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>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32>
+fn textureGather<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, 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
@@ -619,84 +619,84 @@
@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<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32>
+@stage("fragment") fn textureSample<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> f32
+@stage("fragment") fn textureSample<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, bias: f32) -> vec4<f32>
+@stage("fragment") fn textureSampleBias<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, 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<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32
+@stage("fragment") fn textureSampleCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, 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<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32
+fn textureSampleCompareLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, 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<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, 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<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, level: f32) -> vec4<f32>
+fn textureSampleLevel<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, level: f32) -> vec4<f32>
+fn textureSampleLevel<C: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C) -> f32
+fn textureSampleLevel<C: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C) -> f32
+fn textureSampleLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel<C: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: C) -> f32
+fn textureSampleLevel<C: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: C, level: C) -> 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>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_1d<T>, coords: C, level: C) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: C) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: C, level: C) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: C) -> vec4<T>
+fn textureLoad<T: fiu32, C: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: C) -> vec4<T>
+fn textureLoad<C: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: C) -> f32
+fn textureLoad<C: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: C, level: C) -> f32
+fn textureLoad<C: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: C) -> 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)
diff --git a/src/tint/resolver/builtin_validation_test.cc b/src/tint/resolver/builtin_validation_test.cc
index 3cea975..a0581d9 100644
--- a/src/tint/resolver/builtin_validation_test.cc
+++ b/src/tint/resolver/builtin_validation_test.cc
@@ -443,20 +443,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/intrinsic_table.inl b/src/tint/resolver/intrinsic_table.inl
index 657b44a..361a669 100644
--- a/src/tint/resolver/intrinsic_table.inl
+++ b/src/tint/resolver/intrinsic_table.inl
@@ -2748,228 +2748,228 @@
/* [8] */ 0,
/* [9] */ 0,
/* [10] */ 22,
- /* [11] */ 1,
- /* [12] */ 2,
+ /* [11] */ 0,
+ /* [12] */ 1,
/* [13] */ 0,
/* [14] */ 22,
- /* [15] */ 1,
+ /* [15] */ 0,
/* [16] */ 0,
/* [17] */ 0,
/* [18] */ 22,
/* [19] */ 0,
- /* [20] */ 1,
+ /* [20] */ 2,
/* [21] */ 0,
/* [22] */ 22,
- /* [23] */ 0,
+ /* [23] */ 1,
/* [24] */ 0,
/* [25] */ 0,
/* [26] */ 22,
- /* [27] */ 0,
+ /* [27] */ 1,
/* [28] */ 2,
/* [29] */ 0,
/* [30] */ 21,
/* [31] */ 0,
/* [32] */ 0,
- /* [33] */ 21,
- /* [34] */ 0,
- /* [35] */ 2,
+ /* [33] */ 43,
+ /* [34] */ 5,
+ /* [35] */ 6,
/* [36] */ 21,
/* [37] */ 0,
- /* [38] */ 7,
- /* [39] */ 21,
- /* [40] */ 1,
- /* [41] */ 0,
- /* [42] */ 21,
- /* [43] */ 0,
+ /* [38] */ 2,
+ /* [39] */ 42,
+ /* [40] */ 5,
+ /* [41] */ 6,
+ /* [42] */ 41,
+ /* [43] */ 5,
/* [44] */ 6,
- /* [45] */ 48,
+ /* [45] */ 42,
/* [46] */ 0,
- /* [47] */ 0,
- /* [48] */ 21,
- /* [49] */ 0,
- /* [50] */ 3,
- /* [51] */ 21,
- /* [52] */ 0,
- /* [53] */ 5,
- /* [54] */ 43,
- /* [55] */ 5,
+ /* [47] */ 1,
+ /* [48] */ 40,
+ /* [49] */ 5,
+ /* [50] */ 6,
+ /* [51] */ 43,
+ /* [52] */ 4,
+ /* [53] */ 6,
+ /* [54] */ 42,
+ /* [55] */ 4,
/* [56] */ 6,
- /* [57] */ 42,
- /* [58] */ 5,
+ /* [57] */ 41,
+ /* [58] */ 4,
/* [59] */ 6,
- /* [60] */ 41,
- /* [61] */ 5,
- /* [62] */ 6,
+ /* [60] */ 21,
+ /* [61] */ 0,
+ /* [62] */ 7,
/* [63] */ 40,
- /* [64] */ 5,
+ /* [64] */ 4,
/* [65] */ 6,
/* [66] */ 43,
- /* [67] */ 4,
+ /* [67] */ 3,
/* [68] */ 6,
- /* [69] */ 42,
- /* [70] */ 4,
- /* [71] */ 6,
- /* [72] */ 41,
- /* [73] */ 4,
+ /* [69] */ 21,
+ /* [70] */ 1,
+ /* [71] */ 0,
+ /* [72] */ 42,
+ /* [73] */ 3,
/* [74] */ 6,
- /* [75] */ 40,
- /* [76] */ 4,
+ /* [75] */ 41,
+ /* [76] */ 3,
/* [77] */ 6,
- /* [78] */ 43,
- /* [79] */ 3,
- /* [80] */ 6,
- /* [81] */ 42,
- /* [82] */ 3,
- /* [83] */ 6,
+ /* [78] */ 48,
+ /* [79] */ 0,
+ /* [80] */ 0,
+ /* [81] */ 43,
+ /* [82] */ 0,
+ /* [83] */ 1,
/* [84] */ 41,
- /* [85] */ 3,
- /* [86] */ 6,
+ /* [85] */ 0,
+ /* [86] */ 1,
/* [87] */ 40,
- /* [88] */ 3,
- /* [89] */ 6,
- /* [90] */ 42,
+ /* [88] */ 0,
+ /* [89] */ 1,
+ /* [90] */ 21,
/* [91] */ 0,
- /* [92] */ 1,
- /* [93] */ 43,
+ /* [92] */ 5,
+ /* [93] */ 21,
/* [94] */ 0,
- /* [95] */ 1,
- /* [96] */ 41,
+ /* [95] */ 6,
+ /* [96] */ 21,
/* [97] */ 0,
- /* [98] */ 1,
- /* [99] */ 40,
+ /* [98] */ 3,
+ /* [99] */ 46,
/* [100] */ 0,
- /* [101] */ 1,
- /* [102] */ 46,
- /* [103] */ 0,
- /* [104] */ 0,
- /* [105] */ 9,
+ /* [101] */ 0,
+ /* [102] */ 40,
+ /* [103] */ 3,
+ /* [104] */ 6,
+ /* [105] */ 10,
/* [106] */ 7,
/* [107] */ 10,
- /* [108] */ 7,
- /* [109] */ 20,
- /* [110] */ 7,
- /* [111] */ 20,
- /* [112] */ 8,
- /* [113] */ 20,
+ /* [108] */ 1,
+ /* [109] */ 10,
+ /* [110] */ 8,
+ /* [111] */ 10,
+ /* [112] */ 5,
+ /* [113] */ 10,
/* [114] */ 0,
- /* [115] */ 11,
+ /* [115] */ 9,
/* [116] */ 0,
- /* [117] */ 19,
- /* [118] */ 7,
- /* [119] */ 19,
- /* [120] */ 8,
- /* [121] */ 19,
+ /* [117] */ 10,
+ /* [118] */ 6,
+ /* [119] */ 10,
+ /* [120] */ 2,
+ /* [121] */ 11,
/* [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,
+ /* [123] */ 9,
+ /* [124] */ 2,
+ /* [125] */ 9,
+ /* [126] */ 1,
+ /* [127] */ 9,
+ /* [128] */ 6,
+ /* [129] */ 9,
+ /* [130] */ 5,
+ /* [131] */ 11,
+ /* [132] */ 7,
+ /* [133] */ 9,
+ /* [134] */ 8,
+ /* [135] */ 9,
/* [136] */ 7,
- /* [137] */ 17,
- /* [138] */ 8,
- /* [139] */ 17,
+ /* [137] */ 45,
+ /* [138] */ 0,
+ /* [139] */ 28,
/* [140] */ 0,
- /* [141] */ 28,
+ /* [141] */ 29,
/* [142] */ 0,
- /* [143] */ 29,
- /* [144] */ 0,
- /* [145] */ 9,
- /* [146] */ 5,
- /* [147] */ 30,
+ /* [143] */ 11,
+ /* [144] */ 1,
+ /* [145] */ 30,
+ /* [146] */ 0,
+ /* [147] */ 31,
/* [148] */ 0,
- /* [149] */ 16,
- /* [150] */ 7,
- /* [151] */ 31,
+ /* [149] */ 11,
+ /* [150] */ 8,
+ /* [151] */ 32,
/* [152] */ 0,
- /* [153] */ 10,
- /* [154] */ 5,
- /* [155] */ 16,
- /* [156] */ 8,
- /* [157] */ 32,
+ /* [153] */ 33,
+ /* [154] */ 0,
+ /* [155] */ 11,
+ /* [156] */ 5,
+ /* [157] */ 34,
/* [158] */ 0,
- /* [159] */ 33,
- /* [160] */ 0,
- /* [161] */ 34,
- /* [162] */ 0,
- /* [163] */ 16,
+ /* [159] */ 11,
+ /* [160] */ 6,
+ /* [161] */ 11,
+ /* [162] */ 2,
+ /* [163] */ 12,
/* [164] */ 0,
- /* [165] */ 15,
+ /* [165] */ 20,
/* [166] */ 7,
- /* [167] */ 15,
- /* [168] */ 8,
- /* [169] */ 15,
- /* [170] */ 0,
- /* [171] */ 45,
+ /* [167] */ 12,
+ /* [168] */ 7,
+ /* [169] */ 12,
+ /* [170] */ 8,
+ /* [171] */ 13,
/* [172] */ 0,
- /* [173] */ 14,
+ /* [173] */ 13,
/* [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,
- /* [205] */ 10,
- /* [206] */ 6,
- /* [207] */ 10,
+ /* [175] */ 47,
+ /* [176] */ 0,
+ /* [177] */ 13,
+ /* [178] */ 8,
+ /* [179] */ 14,
+ /* [180] */ 0,
+ /* [181] */ 14,
+ /* [182] */ 7,
+ /* [183] */ 14,
+ /* [184] */ 8,
+ /* [185] */ 15,
+ /* [186] */ 0,
+ /* [187] */ 15,
+ /* [188] */ 7,
+ /* [189] */ 15,
+ /* [190] */ 8,
+ /* [191] */ 16,
+ /* [192] */ 0,
+ /* [193] */ 16,
+ /* [194] */ 7,
+ /* [195] */ 16,
+ /* [196] */ 8,
+ /* [197] */ 17,
+ /* [198] */ 0,
+ /* [199] */ 17,
+ /* [200] */ 7,
+ /* [201] */ 17,
+ /* [202] */ 8,
+ /* [203] */ 18,
+ /* [204] */ 0,
+ /* [205] */ 18,
+ /* [206] */ 7,
+ /* [207] */ 18,
/* [208] */ 8,
- /* [209] */ 28,
- /* [210] */ 7,
- /* [211] */ 29,
+ /* [209] */ 19,
+ /* [210] */ 0,
+ /* [211] */ 28,
/* [212] */ 7,
- /* [213] */ 30,
- /* [214] */ 7,
- /* [215] */ 9,
- /* [216] */ 2,
- /* [217] */ 9,
- /* [218] */ 1,
+ /* [213] */ 49,
+ /* [214] */ 0,
+ /* [215] */ 29,
+ /* [216] */ 7,
+ /* [217] */ 30,
+ /* [218] */ 7,
/* [219] */ 31,
/* [220] */ 7,
- /* [221] */ 9,
- /* [222] */ 6,
- /* [223] */ 32,
- /* [224] */ 7,
- /* [225] */ 33,
+ /* [221] */ 19,
+ /* [222] */ 7,
+ /* [223] */ 19,
+ /* [224] */ 8,
+ /* [225] */ 32,
/* [226] */ 7,
- /* [227] */ 9,
- /* [228] */ 8,
- /* [229] */ 47,
+ /* [227] */ 33,
+ /* [228] */ 7,
+ /* [229] */ 20,
/* [230] */ 0,
- /* [231] */ 49,
- /* [232] */ 0,
+ /* [231] */ 20,
+ /* [232] */ 8,
/* [233] */ 26,
/* [234] */ 27,
/* [235] */ 38,
@@ -3315,7 +3315,7 @@
{
/* [65] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [66] */
@@ -3325,62 +3325,62 @@
{
/* [67] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [68] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [69] */
/* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [70] */
/* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [71] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [72] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [73] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [74] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [75] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [76] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [77] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [78] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [79] */
@@ -3390,87 +3390,87 @@
{
/* [80] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[135],
},
{
/* [83] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [84] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [85] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [86] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [87] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [88] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [89] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [90] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[219],
+ },
+ {
+ /* [91] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [86] */
+ /* [92] */
/* usage */ ParameterUsage::kCoords,
/* matcher indices */ &kMatcherIndices[105],
},
{
- /* [87] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [88] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [89] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [90] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [91] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
- },
- {
- /* [92] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
/* [93] */
- /* usage */ ParameterUsage::kCoords,
+ /* usage */ ParameterUsage::kDdx,
/* matcher indices */ &kMatcherIndices[105],
},
{
/* [94] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [95] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[111],
},
{
/* [96] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [97] */
@@ -3480,27 +3480,27 @@
{
/* [98] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[1],
},
{
/* [101] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [102] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [103] */
@@ -3510,52 +3510,52 @@
{
/* [104] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [105] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [106] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [107] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [108] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [109] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [110] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [113] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [114] */
@@ -3590,32 +3590,32 @@
{
/* [120] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [121] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [122] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [125] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [126] */
@@ -3630,12 +3630,12 @@
{
/* [128] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [129] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [130] */
@@ -3645,12 +3645,12 @@
{
/* [131] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [132] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [133] */
@@ -3660,32 +3660,32 @@
{
/* [134] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [137] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [138] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[227],
},
{
/* [139] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [140] */
@@ -3695,52 +3695,52 @@
{
/* [141] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [142] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [143] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [144] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
- },
- {
- /* [145] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
- },
- {
- /* [146] */
- /* usage */ ParameterUsage::kCoords,
+ /* usage */ ParameterUsage::kDdx,
/* matcher indices */ &kMatcherIndices[105],
},
{
+ /* [143] */
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [144] */
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
+ },
+ {
+ /* [145] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[145],
+ },
+ {
+ /* [146] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
/* [147] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [148] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [149] */
/* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [150] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [151] */
@@ -3750,52 +3750,52 @@
{
/* [152] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [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[141],
},
{
/* [157] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [158] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [159] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [160] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [161] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [162] */
@@ -3804,18 +3804,18 @@
},
{
/* [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[4],
},
{
/* [165] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [166] */
@@ -3825,22 +3825,22 @@
{
/* [167] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[129],
},
{
/* [170] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[219],
},
{
/* [171] */
@@ -3850,47 +3850,47 @@
{
/* [172] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [173] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [174] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[111],
},
{
/* [175] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [176] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [177] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[129],
},
{
/* [180] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [181] */
@@ -3900,17 +3900,17 @@
{
/* [182] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [183] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [184] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [185] */
@@ -3920,152 +3920,152 @@
{
/* [186] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [187] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [190] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [191] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [192] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [193] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [194] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [195] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [196] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [197] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[129],
},
{
/* [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[153],
},
{
/* [202] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [203] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [204] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [205] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [206] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[159],
- },
- {
- /* [207] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [208] */
+ /* [203] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [204] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
+ },
+ {
+ /* [205] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[227],
+ },
+ {
+ /* [206] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [207] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [208] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [209] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [210] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[219],
},
{
/* [211] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [212] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [213] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [214] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[111],
},
{
/* [215] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [216] */
@@ -4075,17 +4075,17 @@
{
/* [217] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[129],
},
{
/* [220] */
@@ -4100,12 +4100,12 @@
{
/* [222] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [223] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [224] */
@@ -4115,57 +4115,57 @@
{
/* [225] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [226] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [227] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [228] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [229] */
- /* usage */ ParameterUsage::kBias,
+ /* usage */ ParameterUsage::kDepthRef,
/* matcher indices */ &kMatcherIndices[4],
},
{
+ /* [229] */
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
+ },
+ {
/* [230] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [231] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
- },
- {
- /* [232] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [233] */
+ /* [232] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [233] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [234] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [235] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[227],
},
{
/* [236] */
@@ -4175,167 +4175,167 @@
{
/* [237] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [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[4],
},
{
/* [240] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [241] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[147],
- },
- {
- /* [242] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [243] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [244] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [245] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
- },
- {
- /* [246] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [247] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [248] */
- /* usage */ ParameterUsage::kDdx,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [249] */
- /* usage */ ParameterUsage::kDdy,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [250] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
- },
- {
- /* [251] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
- },
- {
- /* [252] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [253] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [254] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [255] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
- },
- {
- /* [256] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [257] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [258] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [259] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [260] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
- },
- {
- /* [261] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [262] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [263] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [264] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [265] */
/* usage */ ParameterUsage::kTexture,
/* matcher indices */ &kMatcherIndices[237],
},
{
- /* [266] */
+ /* [241] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [267] */
+ /* [242] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [243] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [244] */
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [245] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
+ },
+ {
+ /* [246] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
+ },
+ {
+ /* [247] */
/* usage */ ParameterUsage::kCoords,
/* matcher indices */ &kMatcherIndices[105],
},
{
- /* [268] */
+ /* [248] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [249] */
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
+ },
+ {
+ /* [250] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[215],
+ },
+ {
+ /* [251] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [252] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [253] */
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [254] */
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [255] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
+ },
+ {
+ /* [256] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
+ },
+ {
+ /* [257] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [258] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [259] */
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
+ },
+ {
+ /* [260] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
+ },
+ {
+ /* [261] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
+ },
+ {
+ /* [262] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [263] */
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
+ },
+ {
+ /* [264] */
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
+ },
+ {
+ /* [265] */
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
+ },
+ {
+ /* [266] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[145],
+ },
+ {
+ /* [267] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [268] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [269] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [270] */
@@ -4350,47 +4350,47 @@
{
/* [272] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [273] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [274] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [275] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[225],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [276] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [277] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [278] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [279] */
- /* usage */ ParameterUsage::kLevel,
+ /* usage */ ParameterUsage::kDepthRef,
/* matcher indices */ &kMatcherIndices[4],
},
{
/* [280] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[225],
},
{
/* [281] */
@@ -4404,13 +4404,13 @@
},
{
/* [283] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDdx,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [284] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kDdy,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [285] */
@@ -4425,22 +4425,22 @@
{
/* [287] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [288] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [289] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [290] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [291] */
@@ -4450,22 +4450,22 @@
{
/* [292] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [293] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [294] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [295] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[217],
},
{
/* [296] */
@@ -4475,57 +4475,57 @@
{
/* [297] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [298] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [299] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [300] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [301] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [302] */
- /* usage */ ParameterUsage::kDepthRef,
+ /* usage */ ParameterUsage::kLevel,
/* matcher indices */ &kMatcherIndices[4],
},
{
/* [303] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [304] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [305] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [306] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [307] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [308] */
@@ -4535,77 +4535,77 @@
{
/* [309] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [310] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [311] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [312] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [313] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [314] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [315] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [316] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
+ },
+ {
+ /* [317] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
+ },
+ {
+ /* [318] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
+ },
+ {
+ /* [319] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[219],
+ },
+ {
+ /* [320] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [317] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [318] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [319] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
- },
- {
- /* [320] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
- },
- {
/* [321] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [322] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[111],
},
{
/* [323] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[227],
},
{
/* [324] */
@@ -4615,37 +4615,37 @@
{
/* [325] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [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[238],
},
{
/* [328] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[157],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [329] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [330] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [331] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [332] */
@@ -4659,28 +4659,28 @@
},
{
/* [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[238],
},
{
/* [336] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [337] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [338] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [339] */
@@ -4695,17 +4695,17 @@
{
/* [341] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [342] */
/* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [343] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [344] */
@@ -4715,137 +4715,137 @@
{
/* [345] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [346] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kOffset,
+ /* matcher indices */ &kMatcherIndices[129],
},
{
/* [347] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [348] */
/* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [349] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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::kTexture,
+ /* matcher indices */ &kMatcherIndices[151],
+ },
+ {
+ /* [353] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [353] */
+ /* [354] */
/* usage */ ParameterUsage::kCoords,
/* matcher indices */ &kMatcherIndices[105],
},
{
- /* [354] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
/* [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],
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [360] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [361] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [362] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [363] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[39],
},
{
/* [364] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[115],
+ },
+ {
+ /* [365] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [366] */
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[159],
+ },
+ {
+ /* [367] */
+ /* usage */ ParameterUsage::kComponent,
+ /* matcher indices */ &kMatcherIndices[12],
+ },
+ {
+ /* [368] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[141],
+ },
+ {
+ /* [369] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [365] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [366] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [367] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[69],
- },
- {
- /* [368] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [369] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
/* [370] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [371] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[213],
+ /* matcher indices */ &kMatcherIndices[219],
},
{
/* [372] */
@@ -4859,13 +4859,13 @@
},
{
/* [374] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [375] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [376] */
@@ -4875,12 +4875,12 @@
{
/* [377] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [378] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [379] */
@@ -4895,17 +4895,17 @@
{
/* [381] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [382] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [383] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[219],
},
{
/* [384] */
@@ -4919,113 +4919,113 @@
},
{
/* [386] */
- /* usage */ ParameterUsage::kOffset,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [387] */
- /* usage */ ParameterUsage::kComponent,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [388] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
- },
- {
- /* [389] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [390] */
+ /* [389] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
+ },
+ {
+ /* [390] */
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [391] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[57],
+ /* matcher indices */ &kMatcherIndices[225],
},
{
/* [392] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [393] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [394] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
- },
- {
- /* [395] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [396] */
- /* usage */ ParameterUsage::kY,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [397] */
- /* usage */ ParameterUsage::kZ,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [398] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [399] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
- },
- {
- /* [400] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[234],
- },
- {
- /* [401] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
- },
- {
- /* [402] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [403] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[235],
- },
- {
- /* [404] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
+ /* [393] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [394] */
+ /* usage */ ParameterUsage::kBias,
+ /* matcher indices */ &kMatcherIndices[4],
+ },
+ {
+ /* [395] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
+ },
+ {
+ /* [396] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [397] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [398] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [399] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [400] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [401] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [402] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [403] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
+ },
+ {
+ /* [404] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
+ },
+ {
/* [405] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [406] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [407] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [408] */
@@ -5039,68 +5039,68 @@
},
{
/* [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[236],
},
{
/* [412] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
- },
- {
- /* [413] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [414] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
- },
- {
- /* [415] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
- },
- {
- /* [416] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[234],
},
{
- /* [417] */
+ /* [413] */
/* usage */ ParameterUsage::kCoords,
/* matcher indices */ &kMatcherIndices[105],
},
{
- /* [418] */
+ /* [414] */
/* usage */ ParameterUsage::kDepthRef,
/* matcher indices */ &kMatcherIndices[4],
},
{
- /* [419] */
+ /* [415] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[72],
+ },
+ {
+ /* [416] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[115],
+ },
+ {
+ /* [417] */
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [418] */
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[131],
+ },
+ {
+ /* [419] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [420] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [421] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [422] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [423] */
@@ -5115,12 +5115,12 @@
{
/* [425] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [426] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [427] */
@@ -5135,137 +5135,137 @@
{
/* [429] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [430] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [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[115],
},
{
/* [433] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [434] */
- /* usage */ ParameterUsage::kDepthRef,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[155],
},
{
/* [435] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[219],
+ /* matcher indices */ &kMatcherIndices[145],
},
{
/* [436] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [437] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kArrayIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [438] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [439] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[223],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [440] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [441] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [442] */
- /* usage */ ParameterUsage::kBias,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [443] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[237],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [444] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[234],
},
{
/* [445] */
- /* usage */ ParameterUsage::kArrayIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [446] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kDepthRef,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [447] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[240],
+ /* matcher indices */ &kMatcherIndices[141],
},
{
/* [448] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [449] */
- /* usage */ ParameterUsage::kSampleIndex,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [450] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [451] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [452] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [453] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [454] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [455] */
- /* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [456] */
@@ -5280,97 +5280,97 @@
{
/* [458] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [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[115],
+ },
+ {
+ /* [462] */
+ /* usage */ ParameterUsage::kX,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [463] */
+ /* usage */ ParameterUsage::kYz,
+ /* matcher indices */ &kMatcherIndices[115],
+ },
+ {
+ /* [464] */
+ /* usage */ ParameterUsage::kW,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [465] */
+ /* usage */ ParameterUsage::kXy,
+ /* matcher indices */ &kMatcherIndices[115],
+ },
+ {
+ /* [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[236],
+ },
+ {
+ /* [469] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [470] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [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,7 +5420,7 @@
{
/* [486] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[236],
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [487] */
@@ -5430,57 +5430,57 @@
{
/* [488] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [489] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[54],
+ /* matcher indices */ &kMatcherIndices[225],
},
{
/* [490] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [491] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [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],
+ /* usage */ ParameterUsage::kZ,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [495] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[63],
+ /* matcher indices */ &kMatcherIndices[219],
},
{
/* [496] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [497] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[195],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
},
{
/* [498] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [499] */
@@ -5490,112 +5490,112 @@
{
/* [500] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [501] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[211],
},
{
/* [502] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [503] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[4],
+ },
+ {
+ /* [504] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
+ },
+ {
+ /* [505] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
+ },
+ {
+ /* [506] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[121],
+ },
+ {
+ /* [507] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
+ },
+ {
+ /* [508] */
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
+ },
+ {
+ /* [509] */
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[105],
+ },
+ {
+ /* [510] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [511] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[35],
+ },
+ {
+ /* [512] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[35],
+ },
+ {
+ /* [513] */
/* 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],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [515] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [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 +5629,108 @@
},
{
/* [528] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[209],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[0],
},
{
/* [529] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [530] */
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[1],
+ },
+ {
+ /* [531] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
+ },
+ {
+ /* [532] */
/* usage */ ParameterUsage::kSampler,
/* matcher indices */ &kMatcherIndices[233],
},
{
- /* [530] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[4],
- },
- {
- /* [531] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
- },
- {
- /* [532] */
- /* usage */ ParameterUsage::kYz,
- /* matcher indices */ &kMatcherIndices[131],
- },
- {
/* [533] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [534] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[75],
+ /* matcher indices */ &kMatcherIndices[239],
},
{
/* [535] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [536] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[197],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [537] */
- /* usage */ ParameterUsage::kX,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[215],
},
{
/* [538] */
- /* usage */ ParameterUsage::kY,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [539] */
- /* usage */ ParameterUsage::kZw,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [540] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[78],
+ /* matcher indices */ &kMatcherIndices[239],
},
{
/* [541] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[153],
+ /* usage */ ParameterUsage::kSampler,
+ /* matcher indices */ &kMatcherIndices[233],
},
{
/* [542] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [543] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[102],
},
{
/* [544] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [545] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kValue,
/* matcher indices */ &kMatcherIndices[131],
},
{
/* [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[115],
},
{
/* [548] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[131],
},
{
/* [549] */
@@ -5745,7 +5745,7 @@
{
/* [551] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [552] */
@@ -5760,97 +5760,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[113],
},
{
/* [557] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[131],
},
{
/* [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[155],
},
{
/* [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[115],
},
{
/* [563] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[107],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[155],
},
{
/* [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[113],
},
{
/* [566] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[155],
},
{
/* [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[159],
},
{
/* [570] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[84],
+ /* matcher indices */ &kMatcherIndices[240],
},
{
/* [571] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [572] */
- /* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* usage */ ParameterUsage::kSampleIndex,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [573] */
@@ -5885,232 +5885,232 @@
{
/* [579] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[238],
+ /* matcher indices */ &kMatcherIndices[42],
},
{
/* [580] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
- },
- {
- /* [581] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
- },
- {
- /* [582] */
- /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[115],
},
{
+ /* [581] */
+ /* usage */ ParameterUsage::kValue,
+ /* matcher indices */ &kMatcherIndices[159],
+ },
+ {
+ /* [582] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
+ },
+ {
/* [583] */
- /* usage */ ParameterUsage::kNone,
+ /* usage */ ParameterUsage::kCoords,
/* matcher indices */ &kMatcherIndices[115],
},
{
/* [584] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [585] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[87],
+ /* matcher indices */ &kMatcherIndices[33],
},
{
/* [586] */
/* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[111],
},
{
/* [587] */
/* usage */ ParameterUsage::kValue,
- /* matcher indices */ &kMatcherIndices[133],
+ /* matcher indices */ &kMatcherIndices[159],
},
{
/* [588] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* matcher indices */ &kMatcherIndices[139],
},
{
/* [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[12],
},
{
/* [591] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[211],
+ /* matcher indices */ &kMatcherIndices[157],
},
{
/* [592] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [593] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kSampleIndex,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [594] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[239],
+ /* matcher indices */ &kMatcherIndices[147],
},
{
/* [595] */
- /* usage */ ParameterUsage::kSampler,
- /* matcher indices */ &kMatcherIndices[233],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[107],
},
{
/* [596] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[105],
+ /* usage */ ParameterUsage::kLevel,
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [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[235],
},
{
/* [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[34],
},
{
/* [609] */
- /* usage */ ParameterUsage::kXyz,
- /* matcher indices */ &kMatcherIndices[123],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[239],
},
{
/* [610] */
- /* usage */ ParameterUsage::kW,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kCoords,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [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[139],
},
{
/* [624] */
/* usage */ ParameterUsage::kLevel,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[12],
},
{
/* [625] */
@@ -6120,107 +6120,107 @@
{
/* [626] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[42],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [627] */
/* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[143],
+ /* matcher indices */ &kMatcherIndices[141],
},
{
/* [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[145],
},
{
/* [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[147],
},
{
/* [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[151],
},
{
/* [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[153],
},
{
/* [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 +6230,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,7 +6250,7 @@
{
/* [652] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [653] */
@@ -6260,17 +6260,17 @@
{
/* [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] */
@@ -6280,32 +6280,32 @@
{
/* [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 +6315,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[20],
},
{
/* [668] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [669] */
@@ -6355,12 +6355,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 +6375,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[20],
},
{
/* [680] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [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 +6420,37 @@
{
/* [686] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
- },
- {
- /* [687] */
- /* usage */ ParameterUsage::kNone,
/* matcher indices */ &kMatcherIndices[1],
},
{
+ /* [687] */
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
+ },
+ {
/* [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 +6470,37 @@
{
/* [696] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [697] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [698] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [699] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [700] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [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 +6515,7 @@
{
/* [705] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [706] */
@@ -6525,7 +6525,7 @@
{
/* [707] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [708] */
@@ -6560,7 +6560,7 @@
{
/* [714] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [715] */
@@ -6570,82 +6570,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[35],
},
{
/* [727] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [728] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [729] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [730] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [731] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [732] */
@@ -6660,67 +6660,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[67],
},
{
/* [741] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [742] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[96],
},
{
/* [743] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [744] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [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 +6740,32 @@
{
/* [750] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [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 +6785,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[115],
},
{
/* [762] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kZ,
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [763] */
@@ -6814,28 +6814,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[115],
},
{
/* [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 +6845,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 +6880,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 +6904,88 @@
},
{
/* [783] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kXy,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [784] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kZw,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [785] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[0],
+ /* usage */ ParameterUsage::kXyz,
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [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[113],
},
{
/* [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[115],
},
{
/* [792] */
- /* usage */ ParameterUsage::kCoords,
- /* matcher indices */ &kMatcherIndices[145],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [793] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [794] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[51],
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [795] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [796] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[53],
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [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 +6995,7 @@
{
/* [801] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [802] */
@@ -7015,17 +7015,17 @@
{
/* [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[240],
},
{
/* [808] */
@@ -7034,183 +7034,183 @@
},
{
/* [809] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [810] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [811] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [812] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[153],
},
{
/* [813] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[151],
},
{
/* [814] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[147],
},
{
/* [815] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[145],
},
{
/* [816] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[141],
},
{
/* [817] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[139],
},
{
/* [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[235],
},
{
/* [820] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [821] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[153],
},
{
/* [822] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[145],
},
{
/* [823] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[239],
},
{
/* [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[240],
},
{
/* [829] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[235],
},
{
/* [830] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[236],
},
{
/* [831] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[237],
},
{
/* [832] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[238],
},
{
/* [833] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[157],
},
{
/* [834] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[153],
},
{
/* [835] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[151],
},
{
/* [836] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[147],
},
{
/* [837] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[145],
},
{
/* [838] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[4],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[141],
},
{
/* [839] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[36],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[139],
},
{
/* [840] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [841] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[22],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [842] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [843] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [844] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [845] */
@@ -7225,32 +7225,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[165],
},
{
/* [853] */
@@ -7315,12 +7315,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 +7335,12 @@
{
/* [869] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [870] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[33],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [871] */
@@ -7365,137 +7365,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[131],
},
{
/* [879] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[131],
},
{
/* [880] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [881] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [882] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[240],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[135],
},
{
/* [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[4],
},
{
/* [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[4],
},
{
/* [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[4],
},
{
/* [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 +7550,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[4],
},
{
/* [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[4],
},
{
/* [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[231],
},
{
/* [920] */
- /* usage */ ParameterUsage::kTexture,
- /* matcher indices */ &kMatcherIndices[99],
+ /* usage */ ParameterUsage::kNone,
+ /* matcher indices */ &kMatcherIndices[4],
},
{
/* [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[4],
},
{
/* [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[4],
},
{
/* [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[4],
},
{
/* [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[34],
},
{
/* [934] */
@@ -7665,12 +7665,12 @@
{
/* [935] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[229],
},
{
/* [936] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[44],
+ /* matcher indices */ &kMatcherIndices[35],
},
{
/* [937] */
@@ -7680,7 +7680,7 @@
{
/* [938] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[223],
},
{
/* [939] */
@@ -7695,12 +7695,12 @@
{
/* [941] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[113],
+ /* matcher indices */ &kMatcherIndices[221],
},
{
/* [942] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[112],
+ /* matcher indices */ &kMatcherIndices[110],
},
{
/* [943] */
@@ -7710,12 +7710,12 @@
{
/* [944] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[119],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [945] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [946] */
@@ -7725,12 +7725,12 @@
{
/* [947] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[117],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [948] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[131],
+ /* matcher indices */ &kMatcherIndices[115],
},
{
/* [949] */
@@ -7739,98 +7739,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[125],
},
{
/* [952] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [953] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [954] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [955] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[217],
+ /* matcher indices */ &kMatcherIndices[125],
},
{
/* [956] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[209],
},
{
/* [957] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[123],
+ /* matcher indices */ &kMatcherIndices[113],
},
{
/* [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[107],
},
{
/* [963] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[107],
},
{
/* [964] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[107],
},
{
/* [965] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[107],
},
{
/* [966] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[203],
+ /* matcher indices */ &kMatcherIndices[107],
},
{
/* [967] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[121],
+ /* matcher indices */ &kMatcherIndices[207],
},
{
/* [968] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[115],
+ /* matcher indices */ &kMatcherIndices[121],
},
{
/* [969] */
@@ -7840,32 +7840,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 +7875,42 @@
{
/* [977] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[1],
},
{
/* [978] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[143],
},
{
/* [979] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[143],
},
{
/* [980] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[143],
},
{
/* [981] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[193],
+ /* matcher indices */ &kMatcherIndices[143],
},
{
/* [982] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[127],
+ /* matcher indices */ &kMatcherIndices[205],
},
{
/* [983] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[189],
+ /* matcher indices */ &kMatcherIndices[163],
},
{
/* [984] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[30],
},
{
/* [985] */
@@ -7920,57 +7920,57 @@
{
/* [986] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[185],
+ /* matcher indices */ &kMatcherIndices[167],
},
{
/* [987] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[187],
+ /* matcher indices */ &kMatcherIndices[169],
},
{
/* [988] */
- /* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[125],
+ /* usage */ ParameterUsage::kTexture,
+ /* matcher indices */ &kMatcherIndices[157],
},
{
/* [989] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[183],
+ /* matcher indices */ &kMatcherIndices[171],
},
{
/* [990] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [991] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[18],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [992] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[179],
+ /* matcher indices */ &kMatcherIndices[173],
},
{
/* [993] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[181],
+ /* matcher indices */ &kMatcherIndices[177],
},
{
/* [994] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[30],
+ /* matcher indices */ &kMatcherIndices[36],
},
{
/* [995] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[177],
+ /* matcher indices */ &kMatcherIndices[179],
},
{
/* [996] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[1],
+ /* matcher indices */ &kMatcherIndices[20],
},
{
/* [997] */
@@ -7980,97 +7980,97 @@
{
/* [998] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[173],
+ /* matcher indices */ &kMatcherIndices[181],
},
{
/* [999] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[175],
+ /* matcher indices */ &kMatcherIndices[183],
},
{
/* [1000] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[12],
+ /* matcher indices */ &kMatcherIndices[203],
},
{
/* [1001] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[169],
+ /* matcher indices */ &kMatcherIndices[185],
},
{
/* [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[187],
},
{
/* [1005] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[167],
+ /* matcher indices */ &kMatcherIndices[189],
},
{
/* [1006] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[129],
+ /* matcher indices */ &kMatcherIndices[201],
},
{
/* [1007] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[163],
+ /* matcher indices */ &kMatcherIndices[191],
},
{
/* [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[193],
},
{
/* [1011] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[155],
+ /* matcher indices */ &kMatcherIndices[195],
},
{
/* [1012] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[137],
+ /* matcher indices */ &kMatcherIndices[199],
},
{
/* [1013] */
/* usage */ ParameterUsage::kNone,
- /* matcher indices */ &kMatcherIndices[139],
+ /* matcher indices */ &kMatcherIndices[197],
},
{
/* [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[143],
},
};
@@ -8078,32 +8078,32 @@
{
/* [0] */
/* name */ "T",
- /* matcher index */ 7,
+ /* matcher index */ 64,
},
{
/* [1] */
- /* name */ "U",
- /* matcher index */ 52,
+ /* name */ "C",
+ /* matcher index */ 68,
},
{
/* [2] */
/* name */ "T",
- /* matcher index */ 2,
+ /* matcher index */ 7,
},
{
/* [3] */
/* name */ "U",
- /* matcher index */ 56,
+ /* matcher index */ 52,
},
{
/* [4] */
/* name */ "T",
- /* matcher index */ 6,
+ /* matcher index */ 8,
},
{
/* [5] */
/* name */ "U",
- /* matcher index */ 55,
+ /* matcher index */ 53,
},
{
/* [6] */
@@ -8118,96 +8118,101 @@
{
/* [8] */
/* name */ "T",
- /* matcher index */ 8,
+ /* matcher index */ 6,
},
{
/* [9] */
/* name */ "U",
- /* matcher index */ 53,
+ /* matcher index */ 55,
},
{
/* [10] */
/* name */ "T",
- /* matcher index */ 50,
+ /* matcher index */ 2,
},
{
/* [11] */
- /* name */ "T",
- /* matcher index */ 57,
+ /* name */ "U",
+ /* matcher index */ 56,
},
{
/* [12] */
/* name */ "T",
- /* matcher index */ 61,
+ /* matcher index */ 63,
},
{
/* [13] */
/* name */ "T",
- /* matcher index */ 67,
+ /* matcher index */ 68,
},
{
/* [14] */
/* name */ "T",
- /* matcher index */ 68,
+ /* matcher index */ 67,
},
{
/* [15] */
/* name */ "T",
- /* matcher index */ 63,
+ /* matcher index */ 61,
},
{
/* [16] */
/* name */ "T",
- /* matcher index */ 64,
+ /* matcher index */ 50,
},
{
/* [17] */
/* name */ "T",
- /* matcher index */ 51,
+ /* matcher index */ 57,
},
{
/* [18] */
/* name */ "T",
- /* matcher index */ kNoMatcher,
+ /* matcher index */ 51,
},
{
/* [19] */
/* name */ "T",
- /* matcher index */ 56,
+ /* matcher index */ kNoMatcher,
},
{
/* [20] */
/* name */ "T",
- /* matcher index */ 53,
+ /* matcher index */ 56,
},
{
/* [21] */
/* name */ "T",
- /* matcher index */ 52,
+ /* matcher index */ 53,
},
{
/* [22] */
/* name */ "T",
- /* matcher index */ 55,
+ /* matcher index */ 52,
},
{
/* [23] */
/* name */ "T",
- /* matcher index */ 54,
+ /* matcher index */ 55,
},
{
/* [24] */
/* name */ "T",
- /* matcher index */ 3,
+ /* matcher index */ 54,
},
{
/* [25] */
/* name */ "T",
- /* matcher index */ 62,
+ /* matcher index */ 3,
},
{
/* [26] */
/* name */ "T",
+ /* matcher index */ 62,
+ },
+ {
+ /* [27] */
+ /* name */ "T",
/* matcher index */ 58,
},
};
@@ -8240,20 +8245,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 +8276,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[34],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[623],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8295,22 +8300,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[129],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[627],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8319,22 +8324,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[129],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[631],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8343,22 +8348,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[111],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[635],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* return matcher indices */ &kMatcherIndices[111],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8367,22 +8372,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[129],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[639],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8391,22 +8396,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[129],
/* 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[0],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[643],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8415,10 +8420,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[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8427,22 +8432,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[925],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[832],
+ /* return matcher indices */ &kMatcherIndices[129],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[649],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[687],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8451,22 +8456,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[924],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[831],
+ /* return matcher indices */ &kMatcherIndices[129],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[653],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8475,22 +8480,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[923],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[830],
+ /* return matcher indices */ &kMatcherIndices[129],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[657],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8499,22 +8504,22 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[808],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[829],
+ /* return matcher indices */ &kMatcherIndices[129],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[661],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[605],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8523,10 +8528,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[921],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[828],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8535,10 +8540,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[920],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[827],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8547,10 +8552,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[919],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[826],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8559,10 +8564,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[918],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[825],
+ /* return matcher indices */ &kMatcherIndices[129],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8571,10 +8576,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[917],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* parameters */ &kParameters[824],
+ /* return matcher indices */ &kMatcherIndices[111],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -8583,83 +8588,83 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[915],
- /* return matcher indices */ &kMatcherIndices[145],
+ /* parameters */ &kParameters[823],
+ /* return matcher indices */ &kMatcherIndices[129],
/* 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[28],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -8667,107 +8672,107 @@
/* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[1],
/* 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[4],
+ /* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[498],
+ /* parameters */ &kParameters[215],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* 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 */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[383],
+ /* parameters */ &kParameters[240],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* 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 */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[295],
+ /* parameters */ &kParameters[96],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[185],
+ /* parameters */ &kParameters[407],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* 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 */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[486],
+ /* parameters */ &kParameters[285],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* 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[28],
/* 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[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kIsDeprecated),
/* const eval */ nullptr,
},
{
@@ -8775,10 +8780,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -8787,10 +8792,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[968],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -8799,10 +8804,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[969],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecSplat,
},
@@ -8811,10 +8816,10 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[395],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[355],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitS,
},
@@ -8823,10 +8828,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[513],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[465],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8835,10 +8840,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[531],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[462],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8847,10 +8852,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[537],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[459],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8859,10 +8864,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[611],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[783],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8871,10 +8876,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[609],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[785],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8883,10 +8888,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[607],
- /* return matcher indices */ &kMatcherIndices[115],
+ /* parameters */ &kParameters[787],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -8895,10 +8900,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[977],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[1016],
+ /* return matcher indices */ &kMatcherIndices[131],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8907,10 +8912,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[978],
- /* return matcher indices */ &kMatcherIndices[199],
+ /* return matcher indices */ &kMatcherIndices[149],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8922,7 +8927,7 @@
/* template types */ &kTemplateTypes[6],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[979],
- /* return matcher indices */ &kMatcherIndices[197],
+ /* return matcher indices */ &kMatcherIndices[155],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8931,10 +8936,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
+ /* template types */ &kTemplateTypes[8],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[980],
- /* return matcher indices */ &kMatcherIndices[195],
+ /* return matcher indices */ &kMatcherIndices[159],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -8943,83 +8948,83 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[981],
- /* return matcher indices */ &kMatcherIndices[191],
+ /* return matcher indices */ &kMatcherIndices[161],
/* 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[28],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
@@ -9027,394 +9032,394 @@
/* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* 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[131],
+ /* 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[28],
/* 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[131],
+ /* 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[1],
/* 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[131],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[280],
+ /* parameters */ &kParameters[486],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[290],
+ /* parameters */ &kParameters[335],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[102],
+ /* parameters */ &kParameters[347],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[419],
+ /* parameters */ &kParameters[165],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[285],
+ /* parameters */ &kParameters[468],
/* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* 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[1],
/* 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[4],
+ /* 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[121],
/* 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[121],
/* 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 */ 2,
/* 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[121],
/* 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 */ 2,
/* 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[121],
/* 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[121],
/* 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 */ 2,
/* 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[121],
/* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[367],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[531],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[516],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[343],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[495],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[339],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[492],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[175],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[391],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[507],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[489],
- /* return matcher indices */ nullptr,
+ /* parameters */ &kParameters[331],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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 parameters */ 4,
/* num template types */ 1,
/* 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 */ 1,
/* 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 */ 1,
/* 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[28],
/* 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 +9428,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -9435,10 +9440,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
+ /* template types */ &kTemplateTypes[18],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[957],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -9447,10 +9452,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[958],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[902],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecSplat,
},
@@ -9459,10 +9464,10 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[468],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[492],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitS,
},
@@ -9471,10 +9476,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[619],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[761],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -9483,10 +9488,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[617],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[765],
+ /* return matcher indices */ &kMatcherIndices[113],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::VecInitM,
},
@@ -9495,10 +9500,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[962],
- /* return matcher indices */ &kMatcherIndices[107],
+ /* return matcher indices */ &kMatcherIndices[105],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9507,10 +9512,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[963],
- /* return matcher indices */ &kMatcherIndices[207],
+ /* return matcher indices */ &kMatcherIndices[109],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9522,7 +9527,7 @@
/* template types */ &kTemplateTypes[6],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[964],
- /* return matcher indices */ &kMatcherIndices[153],
+ /* return matcher indices */ &kMatcherIndices[111],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9531,10 +9536,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
+ /* template types */ &kTemplateTypes[8],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[965],
- /* return matcher indices */ &kMatcherIndices[205],
+ /* return matcher indices */ &kMatcherIndices[117],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9543,10 +9548,10 @@
/* num parameters */ 1,
/* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
+ /* template types */ &kTemplateTypes[10],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[966],
- /* return matcher indices */ &kMatcherIndices[201],
+ /* return matcher indices */ &kMatcherIndices[119],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -9555,10 +9560,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9567,10 +9572,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9579,10 +9584,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9591,10 +9596,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9603,10 +9608,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9615,10 +9620,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9627,10 +9632,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[887],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[811],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9639,10 +9644,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[886],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[810],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9651,10 +9656,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[885],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[809],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -9663,91 +9668,607 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[884],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[808],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [117] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[16],
+ /* template types */ &kTemplateTypes[17],
/* 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,
+ /* parameters */ &kParameters[763],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpMultiply,
},
{
/* [118] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
/* 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,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[17],
+ /* 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,
},
{
/* [119] */
- /* num parameters */ 4,
+ /* num parameters */ 2,
/* 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,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[17],
+ /* 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,
},
{
/* [120] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
/* 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,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[17],
+ /* 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,
},
{
/* [121] */
- /* num parameters */ 3,
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 2,
+ /* template types */ &kTemplateTypes[15],
+ /* 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,
+ },
+ {
+ /* [122] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 2,
+ /* template types */ &kTemplateTypes[15],
+ /* 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,
+ },
+ {
+ /* [123] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 2,
+ /* template types */ &kTemplateTypes[15],
+ /* template numbers */ &kTemplateNumbers[1],
+ /* parameters */ &kParameters[597],
+ /* return matcher indices */ &kMatcherIndices[69],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpMultiplyMatVec,
+ },
+ {
+ /* [124] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 2,
+ /* template types */ &kTemplateTypes[15],
+ /* template numbers */ &kTemplateNumbers[1],
+ /* parameters */ &kParameters[599],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpMultiplyVecMat,
+ },
+ {
+ /* [125] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 3,
+ /* template types */ &kTemplateTypes[15],
+ /* template numbers */ &kTemplateNumbers[0],
+ /* parameters */ &kParameters[613],
+ /* return matcher indices */ &kMatcherIndices[26],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpMultiplyMatMat,
+ },
+ {
+ /* [126] */
+ /* num parameters */ 0,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[18],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1017],
+ /* return matcher indices */ &kMatcherIndices[115],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Zero,
+ },
+ {
+ /* [127] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[18],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[948],
+ /* return matcher indices */ &kMatcherIndices[115],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Identity,
+ },
+ {
+ /* [128] */
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
/* template types */ &kTemplateTypes[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[459],
+ /* parameters */ &kParameters[949],
/* return matcher indices */ &kMatcherIndices[115],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::VecSplat,
+ },
+ {
+ /* [129] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[16],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[753],
+ /* return matcher indices */ &kMatcherIndices[115],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::VecInitS,
+ },
+ {
+ /* [130] */
+ /* num parameters */ 1,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[951],
+ /* return matcher indices */ &kMatcherIndices[135],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [131] */
+ /* num parameters */ 1,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[4],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[952],
+ /* return matcher indices */ &kMatcherIndices[133],
+ /* 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[6],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[953],
+ /* return matcher indices */ &kMatcherIndices[129],
+ /* 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[8],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[954],
+ /* return matcher indices */ &kMatcherIndices[127],
+ /* 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[10],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[955],
+ /* return matcher indices */ &kMatcherIndices[123],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [135] */
+ /* num parameters */ 3,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[0],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[588],
+ /* return matcher indices */ &kMatcherIndices[121],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [122] */
+ /* [136] */
/* num parameters */ 3,
- /* num template types */ 0,
+ /* num template types */ 2,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[0],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[453],
+ /* parameters */ &kParameters[447],
+ /* return matcher indices */ &kMatcherIndices[121],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [137] */
+ /* num parameters */ 4,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[0],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[435],
+ /* return matcher indices */ &kMatcherIndices[121],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [138] */
+ /* num parameters */ 3,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[0],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[594],
+ /* return matcher indices */ &kMatcherIndices[121],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [139] */
+ /* num parameters */ 3,
+ /* num template types */ 2,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[0],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[591],
+ /* return matcher indices */ &kMatcherIndices[121],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [140] */
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[582],
/* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [123] */
+ /* [141] */
+ /* num parameters */ 4,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[359],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [142] */
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[570],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [143] */
+ /* num parameters */ 2,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[609],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [144] */
/* num parameters */ 4,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[375],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [145] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[190],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [146] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[150],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [147] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[132],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [148] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[383],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [149] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[210],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [150] */
+ /* num parameters */ 4,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[391],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [151] */
+ /* num parameters */ 5,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[235],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [152] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[250],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [153] */
+ /* num parameters */ 6,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[72],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [154] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[78],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [155] */
+ /* num parameters */ 7,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[65],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [156] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[270],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [157] */
+ /* num parameters */ 6,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[90],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [158] */
+ /* num parameters */ 5,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[280],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [159] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[138],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [160] */
+ /* num parameters */ 0,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1017],
+ /* return matcher indices */ &kMatcherIndices[185],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Zero,
+ },
+ {
+ /* [161] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1001],
+ /* return matcher indices */ &kMatcherIndices[185],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Identity,
+ },
+ {
+ /* [162] */
+ /* num parameters */ 6,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[15],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[114],
+ /* return matcher indices */ &kMatcherIndices[185],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::MatInitS,
+ },
+ {
+ /* [163] */
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[15],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[453],
+ /* return matcher indices */ &kMatcherIndices[185],
+ /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::MatInitV,
+ },
+ {
+ /* [164] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[4],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1004],
+ /* return matcher indices */ &kMatcherIndices[189],
+ /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::Conv,
+ },
+ {
+ /* [165] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[2],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[1005],
+ /* return matcher indices */ &kMatcherIndices[187],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[443],
/* return matcher indices */ &kMatcherIndices[4],
@@ -9755,590 +10276,74 @@
/* 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 numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[737],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [127] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[735],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [128] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[733],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [129] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[11],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[731],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [130] */
- /* 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],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [131] */
- /* 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],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiply,
- },
- {
- /* [132] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[1],
- /* parameters */ &kParameters[725],
- /* return matcher indices */ &kMatcherIndices[39],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiplyMatVec,
- },
- {
- /* [133] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 2,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[1],
- /* parameters */ &kParameters[723],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiplyVecMat,
- },
- {
- /* [134] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 3,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[0],
- /* parameters */ &kParameters[721],
- /* return matcher indices */ &kMatcherIndices[10],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpMultiplyMatMat,
- },
- {
- /* [135] */
- /* num parameters */ 0,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[131],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Zero,
- },
- {
- /* [136] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[17],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[948],
- /* return matcher indices */ &kMatcherIndices[131],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Identity,
- },
- {
- /* [137] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[949],
- /* return matcher indices */ &kMatcherIndices[131],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::VecSplat,
- },
- {
- /* [138] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[621],
- /* return matcher indices */ &kMatcherIndices[131],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::VecInitS,
- },
- {
- /* [139] */
- /* num parameters */ 1,
- /* num template types */ 2,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[951],
- /* return matcher indices */ &kMatcherIndices[105],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
- },
- {
- /* [140] */
- /* num parameters */ 1,
- /* 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,
- },
- {
- /* [141] */
- /* num parameters */ 1,
- /* num template types */ 2,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[6],
- /* 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,
- },
- {
- /* [142] */
- /* num parameters */ 1,
- /* num template types */ 2,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[4],
- /* 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,
- },
- {
- /* [143] */
- /* num parameters */ 1,
- /* num template types */ 2,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[2],
- /* 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,
- },
- {
- /* [144] */
+ /* [167] */
/* num parameters */ 5,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[215],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [145] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[132],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [146] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[120],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [147] */
- /* num parameters */ 7,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[65],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [148] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[235],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [149] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[108],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [150] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[245],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [151] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[96],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [152] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[407],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [153] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[160],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [154] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[225],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [155] */
- /* num parameters */ 6,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[78],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [156] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[435],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [157] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[165],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [158] */
- /* num parameters */ 4,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[439],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
- },
- {
- /* [159] */
- /* num parameters */ 5,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[170],
- /* return matcher indices */ &kMatcherIndices[133],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* 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 numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[163],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Zero,
- },
- {
- /* [167] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1007],
- /* return matcher indices */ &kMatcherIndices[163],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Identity,
- },
- {
/* [168] */
- /* num parameters */ 9,
+ /* num parameters */ 5,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[40],
- /* return matcher indices */ &kMatcherIndices[163],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::MatInitS,
+ /* parameters */ &kParameters[255],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [169] */
- /* num parameters */ 3,
+ /* num parameters */ 6,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[564],
- /* return matcher indices */ &kMatcherIndices[163],
- /* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::MatInitV,
+ /* parameters */ &kParameters[108],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [170] */
- /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1010],
- /* return matcher indices */ &kMatcherIndices[155],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[303],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [171] */
- /* num parameters */ 1,
+ /* num parameters */ 5,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[1],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1011],
- /* return matcher indices */ &kMatcherIndices[149],
- /* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::Conv,
+ /* parameters */ &kParameters[245],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* 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[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* return matcher indices */ &kMatcherIndices[179],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10347,34 +10352,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[941],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[995],
+ /* return matcher indices */ &kMatcherIndices[179],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[0],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[57],
+ /* return matcher indices */ &kMatcherIndices[179],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[303],
- /* return matcher indices */ &kMatcherIndices[113],
+ /* parameters */ &kParameters[795],
+ /* return matcher indices */ &kMatcherIndices[179],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10383,10 +10388,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[932],
- /* return matcher indices */ &kMatcherIndices[111],
+ /* parameters */ &kParameters[998],
+ /* return matcher indices */ &kMatcherIndices[183],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10395,238 +10400,238 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[912],
- /* return matcher indices */ &kMatcherIndices[109],
+ /* parameters */ &kParameters[999],
+ /* return matcher indices */ &kMatcherIndices[181],
/* 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[28],
/* 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[4],
+ /* 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[28],
/* 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[4],
+ /* 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[1],
/* 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[4],
+ /* 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[1],
/* 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[4],
+ /* 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[28],
/* 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[4],
+ /* 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[1],
/* 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[4],
+ /* 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[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* return matcher indices */ &kMatcherIndices[229],
/* 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[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1006],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[935],
+ /* return matcher indices */ &kMatcherIndices[229],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[57],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[0],
+ /* return matcher indices */ &kMatcherIndices[229],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[319],
- /* return matcher indices */ &kMatcherIndices[129],
+ /* parameters */ &kParameters[419],
+ /* return matcher indices */ &kMatcherIndices[229],
/* 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[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[988],
- /* return matcher indices */ &kMatcherIndices[127],
+ /* parameters */ &kParameters[852],
+ /* return matcher indices */ &kMatcherIndices[231],
/* 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[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[982],
- /* return matcher indices */ &kMatcherIndices[125],
+ /* parameters */ &kParameters[919],
+ /* return matcher indices */ &kMatcherIndices[165],
/* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[327],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[180],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[185],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[126],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[311],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[1],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[220],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* return matcher indices */ &kMatcherIndices[209],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10635,10 +10640,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1013],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* parameters */ &kParameters[956],
+ /* return matcher indices */ &kMatcherIndices[209],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -10647,22 +10652,22 @@
/* num parameters */ 12,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
+ /* template types */ &kTemplateTypes[15],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[16],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* return matcher indices */ &kMatcherIndices[209],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[582],
- /* return matcher indices */ &kMatcherIndices[139],
+ /* parameters */ &kParameters[315],
+ /* return matcher indices */ &kMatcherIndices[209],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10671,10 +10676,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1016],
- /* return matcher indices */ &kMatcherIndices[137],
+ /* parameters */ &kParameters[941],
+ /* return matcher indices */ &kMatcherIndices[223],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10683,94 +10688,94 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1012],
- /* return matcher indices */ &kMatcherIndices[135],
+ /* parameters */ &kParameters[938],
+ /* return matcher indices */ &kMatcherIndices[221],
/* 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[14],
/* 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[171],
+ /* 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[14],
/* 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[171],
+ /* 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[15],
/* 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[171],
+ /* 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[15],
/* 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[171],
+ /* 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[4],
/* 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[177],
+ /* 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[2],
/* 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[173],
+ /* 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[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* return matcher indices */ &kMatcherIndices[163],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10779,34 +10784,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1001],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[983],
+ /* return matcher indices */ &kMatcherIndices[163],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[72],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[399],
+ /* return matcher indices */ &kMatcherIndices[163],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[543],
- /* return matcher indices */ &kMatcherIndices[169],
+ /* parameters */ &kParameters[791],
+ /* return matcher indices */ &kMatcherIndices[163],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10815,10 +10820,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1004],
- /* return matcher indices */ &kMatcherIndices[167],
+ /* parameters */ &kParameters[986],
+ /* return matcher indices */ &kMatcherIndices[169],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10827,10 +10832,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1005],
- /* return matcher indices */ &kMatcherIndices[165],
+ /* parameters */ &kParameters[987],
+ /* return matcher indices */ &kMatcherIndices[167],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10839,10 +10844,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* return matcher indices */ &kMatcherIndices[197],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10851,34 +10856,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[995],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[1013],
+ /* return matcher indices */ &kMatcherIndices[197],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[49],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[28],
+ /* return matcher indices */ &kMatcherIndices[197],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[601],
- /* return matcher indices */ &kMatcherIndices[177],
+ /* parameters */ &kParameters[504],
+ /* return matcher indices */ &kMatcherIndices[197],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10887,10 +10892,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[998],
- /* return matcher indices */ &kMatcherIndices[175],
+ /* parameters */ &kParameters[1012],
+ /* return matcher indices */ &kMatcherIndices[201],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10899,10 +10904,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[999],
- /* return matcher indices */ &kMatcherIndices[173],
+ /* parameters */ &kParameters[1006],
+ /* return matcher indices */ &kMatcherIndices[199],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10911,10 +10916,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* return matcher indices */ &kMatcherIndices[191],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10923,34 +10928,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[989],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[1007],
+ /* return matcher indices */ &kMatcherIndices[191],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[114],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[40],
+ /* return matcher indices */ &kMatcherIndices[191],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[603],
- /* return matcher indices */ &kMatcherIndices[183],
+ /* parameters */ &kParameters[450],
+ /* return matcher indices */ &kMatcherIndices[191],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -10959,10 +10964,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[992],
- /* return matcher indices */ &kMatcherIndices[181],
+ /* parameters */ &kParameters[1010],
+ /* return matcher indices */ &kMatcherIndices[195],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10971,10 +10976,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[993],
- /* return matcher indices */ &kMatcherIndices[179],
+ /* parameters */ &kParameters[1011],
+ /* return matcher indices */ &kMatcherIndices[193],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -10983,10 +10988,10 @@
/* num parameters */ 0,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* return matcher indices */ &kMatcherIndices[203],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -10995,34 +11000,34 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[983],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[1000],
+ /* return matcher indices */ &kMatcherIndices[203],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[355],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[49],
+ /* return matcher indices */ &kMatcherIndices[203],
/* 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[15],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[605],
- /* return matcher indices */ &kMatcherIndices[189],
+ /* parameters */ &kParameters[439],
+ /* return matcher indices */ &kMatcherIndices[203],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::MatInitV,
},
@@ -11031,10 +11036,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[8],
+ /* template types */ &kTemplateTypes[4],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[986],
- /* return matcher indices */ &kMatcherIndices[187],
+ /* parameters */ &kParameters[982],
+ /* return matcher indices */ &kMatcherIndices[207],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11043,10 +11048,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[0],
+ /* template types */ &kTemplateTypes[2],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[987],
- /* return matcher indices */ &kMatcherIndices[185],
+ /* parameters */ &kParameters[967],
+ /* return matcher indices */ &kMatcherIndices[205],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11055,9 +11060,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[17],
/* 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 +11072,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[17],
+ /* 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 +11084,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[17],
+ /* 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 +11096,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[17],
+ /* 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 +11108,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[15],
+ /* 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 +11120,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[11],
+ /* template types */ &kTemplateTypes[17],
/* 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 +11132,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[17],
+ /* 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 +11144,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[17],
+ /* 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 +11156,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[17],
+ /* 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 +11168,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[15],
+ /* 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 +11180,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11187,10 +11192,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[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11199,10 +11204,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[896],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[820],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11211,10 +11216,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[895],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[819],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11223,10 +11228,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 2,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[3],
- /* parameters */ &kParameters[894],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[818],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -11235,105 +11240,105 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[699],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[679],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[28],
+ /* 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[26],
/* 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[26],
+ /* 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[13],
/* 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[13],
+ /* 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[25],
+ /* 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[25],
+ /* 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[17],
/* 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 +11348,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[17],
+ /* 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 +11360,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[17],
+ /* 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 +11372,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[17],
+ /* 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 +11382,144 @@
{
/* [259] */
/* num parameters */ 2,
- /* num template types */ 0,
+ /* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[12],
/* 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[12],
+ /* 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[12],
+ /* 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[12],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[645],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* parameters */ &kParameters[667],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[28],
+ /* 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[26],
/* 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[26],
+ /* 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[28],
/* 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[20],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[945],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[20],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[946],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11523,10 +11528,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[942],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11535,10 +11540,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[20],
+ /* template types */ &kTemplateTypes[21],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[943],
- /* return matcher indices */ &kMatcherIndices[112],
+ /* return matcher indices */ &kMatcherIndices[110],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11547,10 +11552,10 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11559,10 +11564,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[945],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[939],
+ /* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11571,58 +11576,58 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[19],
+ /* template types */ &kTemplateTypes[22],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[946],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[940],
+ /* return matcher indices */ &kMatcherIndices[4],
/* 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[16],
/* 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[16],
+ /* 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[16],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[35],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11631,10 +11636,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[936],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[35],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11643,10 +11648,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[22],
+ /* template types */ &kTemplateTypes[23],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[937],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* return matcher indices */ &kMatcherIndices[35],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11655,10 +11660,10 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
- /* return matcher indices */ &kMatcherIndices[4],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Zero,
},
@@ -11667,10 +11672,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[939],
- /* return matcher indices */ &kMatcherIndices[4],
+ /* parameters */ &kParameters[933],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsInitializer, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Identity,
},
@@ -11679,10 +11684,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[21],
+ /* template types */ &kTemplateTypes[24],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[940],
- /* return matcher indices */ &kMatcherIndices[4],
+ /* parameters */ &kParameters[934],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsConverter, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ &ConstEval::Conv,
},
@@ -11691,69 +11696,69 @@
/* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[10],
+ /* template types */ &kTemplateTypes[14],
/* 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[14],
+ /* 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[14],
+ /* 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[28],
/* 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[20],
+ /* 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[28],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[827],
+ /* parameters */ &kParameters[899],
/* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
@@ -11763,35 +11768,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[28],
+ /* 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[14],
/* 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[175],
+ /* 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[14],
+ /* 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,9 +11804,9 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[838],
+ /* parameters */ &kParameters[895],
/* return matcher indices */ &kMatcherIndices[4],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
@@ -11811,10 +11816,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[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[894],
+ /* return matcher indices */ &kMatcherIndices[60],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
@@ -11823,7 +11828,7 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[423],
/* return matcher indices */ &kMatcherIndices[1],
@@ -11835,8 +11840,8 @@
/* num parameters */ 4,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[13],
+ /* template numbers */ &kTemplateNumbers[6],
/* parameters */ &kParameters[427],
/* return matcher indices */ &kMatcherIndices[30],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
@@ -11847,9 +11852,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +11864,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[14],
+ /* 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 +11876,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +11888,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[14],
+ /* 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 +11900,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +11912,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[14],
+ /* 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 +11924,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +11936,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[14],
+ /* 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 +11948,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +11960,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[14],
+ /* 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 +11972,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[12],
/* 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 +11984,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[12],
+ /* 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 +11996,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[12],
/* 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 +12008,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[12],
+ /* 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 +12020,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +12032,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[14],
+ /* 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 +12044,10 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[863],
- /* return matcher indices */ &kMatcherIndices[171],
+ /* parameters */ &kParameters[885],
+ /* return matcher indices */ &kMatcherIndices[137],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12051,33 +12056,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[14],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[884],
+ /* return matcher indices */ &kMatcherIndices[99],
/* 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[14],
/* 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[14],
+ /* 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,413 +12090,53 @@
{
/* [318] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[28],
/* 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[4],
+ /* 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[28],
+ /* 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 numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1000],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [321] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1015],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [322] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1014],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [323] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[27],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1009],
- /* return matcher indices */ &kMatcherIndices[12],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [324] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1003],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [325] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[1002],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [326] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[996],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [327] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[990],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [328] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[755],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [329] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[753],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [330] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[879],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [331] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[880],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [332] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[984],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::atan,
- },
- {
- /* [333] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[12],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[973],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::atan,
- },
- {
- /* [334] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[12],
- /* 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,
- },
- {
- /* [335] */
- /* num parameters */ 2,
- /* num template types */ 1,
- /* 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,
- },
- {
- /* [336] */
- /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
/* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[881],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [337] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[899],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [338] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[900],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [339] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[901],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [340] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[902],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [341] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[903],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [342] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[813],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [343] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* 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),
- /* const eval */ nullptr,
- },
- {
- /* [344] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[904],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [345] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[905],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [346] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[906],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [347] */
+ /* [321] */
/* 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[14],
+ /* 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,
},
{
- /* [348] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[908],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [349] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[909],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [350] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[573],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [351] */
- /* num parameters */ 3,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[576],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ nullptr,
- },
- {
- /* [352] */
+ /* [322] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
@@ -12503,115 +12148,163 @@
/* const eval */ nullptr,
},
{
- /* [353] */
+ /* [323] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
/* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
+ /* 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,
+ },
+ {
+ /* [324] */
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[13],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[510],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [325] */
+ /* num parameters */ 3,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[13],
+ /* 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,
+ },
+ {
+ /* [326] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[912],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [327] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [354] */
+ /* [328] */
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[683],
+ /* parameters */ &kParameters[691],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [355] */
+ /* [329] */
/* 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[14],
+ /* 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,
},
{
- /* [356] */
+ /* [330] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[970],
+ /* parameters */ &kParameters[877],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [357] */
+ /* [331] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[959],
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [358] */
+ /* [332] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[15],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[916],
+ /* parameters */ &kParameters[875],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [359] */
+ /* [333] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[15],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[935],
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [360] */
+ /* [334] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[869],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[915],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
- /* [361] */
+ /* [335] */
/* 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[997],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[914],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
/* const eval */ nullptr,
},
{
- /* [362] */
+ /* [336] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
@@ -12623,71 +12316,191 @@
/* const eval */ nullptr,
},
{
- /* [363] */
+ /* [337] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
/* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
+ /* 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,
+ },
+ {
+ /* [338] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[865],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [339] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
+ },
+ {
+ /* [340] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[863],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [341] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
+ },
+ {
+ /* [342] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[917],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [343] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[916],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [344] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[861],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [345] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
+ },
+ {
+ /* [346] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[859],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [347] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
+ },
+ {
+ /* [348] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[856],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [349] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [364] */
- /* num parameters */ 1,
+ /* [350] */
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[985],
+ /* parameters */ &kParameters[573],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [365] */
- /* num parameters */ 1,
+ /* [351] */
+ /* num parameters */ 3,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[976],
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[576],
/* 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] */
+ /* [352] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[854],
/* return matcher indices */ &kMatcherIndices[1],
@@ -12695,91 +12508,139 @@
/* const eval */ nullptr,
},
{
- /* [369] */
+ /* [353] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [370] */
- /* num parameters */ 1,
+ /* [354] */
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[852],
+ /* parameters */ &kParameters[603],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
- /* [371] */
- /* num parameters */ 1,
+ /* [355] */
+ /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[13],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[851],
+ /* template types */ &kTemplateTypes[14],
+ /* 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,
},
{
- /* [372] */
+ /* [356] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[920],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [357] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* 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 */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[922],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [359] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[921],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [360] */
/* 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] */
+ /* [361] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
/* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[847],
+ /* 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,
},
{
- /* [376] */
+ /* [362] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[924],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [363] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[923],
+ /* return matcher indices */ &kMatcherIndices[60],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [364] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
@@ -12791,38 +12652,182 @@
/* const eval */ nullptr,
},
{
- /* [377] */
+ /* [365] */
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 1,
/* template types */ &kTemplateTypes[14],
- /* template numbers */ &kTemplateNumbers[5],
+ /* 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 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[13],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[926],
+ /* return matcher indices */ &kMatcherIndices[4],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [369] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[28],
+ /* 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[17],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[721],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[12],
+ /* 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[17],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[717],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[17],
+ /* 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[17],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[713],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[17],
+ /* 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[17],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[711],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[17],
+ /* 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[14],
+ /* 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[14],
+ /* 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 +12836,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +12848,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[14],
+ /* 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 +12860,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[12],
/* 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 +12872,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[12],
+ /* 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,9 +12884,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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,
@@ -12891,35 +12896,35 @@
/* 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[13],
+ /* 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,
},
{
/* [386] */
- /* num parameters */ 2,
+ /* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [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[13],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[932],
/* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
@@ -12927,10 +12932,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[883],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[988],
+ /* return matcher indices */ &kMatcherIndices[34],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -12939,33 +12944,33 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[882],
- /* return matcher indices */ &kMatcherIndices[53],
+ /* parameters */ &kParameters[807],
+ /* return matcher indices */ &kMatcherIndices[34],
/* 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[13],
/* 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,
},
{
/* [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[13],
+ /* 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,
@@ -12975,9 +12980,9 @@
/* num parameters */ 1,
/* num template types */ 1,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[14],
/* 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 +12992,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[14],
+ /* 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[16],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[707],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* 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[16],
+ /* 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[14],
/* 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[14],
+ /* 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[17],
/* 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[17],
+ /* 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[14],
/* 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[14],
+ /* 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 +13100,10 @@
/* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[591],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[537],
+ /* return matcher indices */ &kMatcherIndices[131],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13107,300 +13112,300 @@
/* num parameters */ 3,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[588],
- /* return matcher indices */ &kMatcherIndices[133],
+ /* parameters */ &kParameters[540],
+ /* return matcher indices */ &kMatcherIndices[131],
/* 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[14],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[831],
- /* return matcher indices */ &kMatcherIndices[4],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
+ /* parameters */ &kParameters[973],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [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),
+ /* template types */ &kTemplateTypes[14],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[972],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
{
/* [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[15],
/* 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[15],
+ /* 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[16],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[651],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[703],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[16],
+ /* 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[15],
/* 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[15],
+ /* 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[14],
/* 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 */ nullptr,
},
{
/* [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[14],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[976],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [414] */
/* 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[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[26],
+ /* 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[14],
/* 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 */ nullptr,
},
{
/* [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[14],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[984],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [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[28],
/* 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[20],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [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[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[990],
+ /* return matcher indices */ &kMatcherIndices[20],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
},
{
/* [420] */
/* num parameters */ 1,
- /* num template types */ 1,
+ /* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[13],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[843],
- /* return matcher indices */ &kMatcherIndices[1],
+ /* parameters */ &kParameters[996],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[28],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[994],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[14],
/* 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[14],
+ /* 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[14],
/* 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[14],
+ /* 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 types */ 1,
/* 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,
+ /* parameters */ &kParameters[873],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ &ConstEval::OpUnaryMinus,
},
{
/* [427] */
/* 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[834],
- /* return matcher indices */ &kMatcherIndices[36],
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline),
- /* const eval */ nullptr,
+ /* 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,
},
{
/* [428] */
@@ -13409,10 +13414,10 @@
/* num template numbers */ 0,
/* template types */ &kTemplateTypes[26],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[873],
+ /* parameters */ &kParameters[871],
/* return matcher indices */ &kMatcherIndices[1],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpUnaryMinus,
+ /* const eval */ &ConstEval::OpComplement,
},
{
/* [429] */
@@ -13420,82 +13425,82 @@
/* num template types */ 1,
/* num template numbers */ 1,
/* template types */ &kTemplateTypes[26],
- /* template numbers */ &kTemplateNumbers[5],
- /* parameters */ &kParameters[874],
- /* return matcher indices */ &kMatcherIndices[30],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpUnaryMinus,
- },
- {
- /* [430] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 0,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[871],
- /* return matcher indices */ &kMatcherIndices[1],
- /* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* const eval */ &ConstEval::OpComplement,
- },
- {
- /* [431] */
- /* num parameters */ 1,
- /* num template types */ 1,
- /* num template numbers */ 1,
- /* template types */ &kTemplateTypes[25],
- /* template numbers */ &kTemplateNumbers[5],
+ /* 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[14],
+ /* 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[14],
+ /* 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 numbers */ 0,
- /* template types */ &kTemplateTypes[27],
- /* 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,
- },
- {
- /* [433] */
- /* num parameters */ 1,
- /* num template types */ 0,
- /* 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,
- },
- {
- /* [434] */
- /* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 0,
/* template types */ &kTemplateTypes[13],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[797],
- /* return matcher indices */ &kMatcherIndices[123],
+ /* parameters */ &kParameters[908],
+ /* return matcher indices */ &kMatcherIndices[1],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [433] */
+ /* num parameters */ 1,
+ /* num template types */ 1,
+ /* num template numbers */ 1,
+ /* template types */ &kTemplateTypes[13],
+ /* template numbers */ &kTemplateNumbers[6],
+ /* parameters */ &kParameters[907],
+ /* return matcher indices */ &kMatcherIndices[30],
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* const eval */ nullptr,
+ },
+ {
+ /* [434] */
+ /* num parameters */ 1,
+ /* num template types */ 0,
+ /* num template numbers */ 0,
+ /* template types */ &kTemplateTypes[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[843],
+ /* return matcher indices */ &kMatcherIndices[135],
/* 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[13],
+ /* 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 +13508,35 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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[13],
+ /* 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[13],
+ /* 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 +13544,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[13],
+ /* 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 +13556,9 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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 +13568,23 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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 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 +13592,10 @@
/* num parameters */ 2,
/* num template types */ 1,
/* num template numbers */ 1,
- /* template types */ &kTemplateTypes[14],
+ /* template types */ &kTemplateTypes[13],
/* 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 +13604,10 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[679],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[697],
+ /* return matcher indices */ &kMatcherIndices[20],
/* flags */ OverloadFlags(OverloadFlag::kIsOperator, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13611,79 +13616,19 @@
/* num parameters */ 2,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[677],
- /* return matcher indices */ &kMatcherIndices[12],
+ /* parameters */ &kParameters[699],
+ /* return matcher indices */ &kMatcherIndices[20],
/* 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[13],
/* template numbers */ &kTemplateNumbers[9],
/* parameters */ &kParameters[857],
/* return matcher indices */ &kMatcherIndices[1],
@@ -13691,38 +13636,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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[599],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* parameters */ &kParameters[880],
+ /* return matcher indices */ &kMatcherIndices[35],
/* 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[28],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[840],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[841],
+ /* return matcher indices */ &kMatcherIndices[131],
+ /* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[842],
+ /* return matcher indices */ &kMatcherIndices[135],
+ /* 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[13],
/* template numbers */ &kTemplateNumbers[9],
- /* parameters */ &kParameters[465],
- /* return matcher indices */ &kMatcherIndices[231],
+ /* parameters */ &kParameters[528],
+ /* return matcher indices */ &kMatcherIndices[213],
/* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[844],
+ /* return matcher indices */ &kMatcherIndices[135],
+ /* 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[14],
+ /* 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 +13736,7 @@
/* num parameters */ 0,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
/* parameters */ &kParameters[1017],
/* return matcher indices */ nullptr,
@@ -13740,25 +13745,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[14],
+ /* 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[14],
+ /* 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 +13772,10 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[974],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* parameters */ &kParameters[878],
+ /* return matcher indices */ &kMatcherIndices[35],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13779,45 +13784,45 @@
/* num parameters */ 1,
/* num template types */ 0,
/* num template numbers */ 0,
- /* template types */ &kTemplateTypes[27],
+ /* template types */ &kTemplateTypes[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[975],
- /* return matcher indices */ &kMatcherIndices[105],
+ /* parameters */ &kParameters[879],
+ /* return matcher indices */ &kMatcherIndices[35],
/* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[881],
+ /* return matcher indices */ &kMatcherIndices[35],
/* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[1017],
- /* return matcher indices */ nullptr,
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
+ /* parameters */ &kParameters[882],
+ /* return matcher indices */ &kMatcherIndices[35],
+ /* 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[14],
+ /* 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 +13831,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[14],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[743],
+ /* return matcher indices */ &kMatcherIndices[113],
/* 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[14],
+ /* 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[28],
/* template numbers */ &kTemplateNumbers[10],
- /* parameters */ &kParameters[877],
- /* return matcher indices */ &kMatcherIndices[44],
+ /* parameters */ &kParameters[727],
+ /* return matcher indices */ &kMatcherIndices[35],
/* 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[28],
+ /* template numbers */ &kTemplateNumbers[10],
+ /* parameters */ &kParameters[729],
+ /* return matcher indices */ &kMatcherIndices[34],
/* 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[12],
+ /* 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[14],
+ /* 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[19],
+ /* template numbers */ &kTemplateNumbers[8],
+ /* parameters */ &kParameters[1014],
+ /* return matcher indices */ &kMatcherIndices[35],
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* const eval */ nullptr,
},
@@ -13910,13 +13915,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[19],
+ /* 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 +13931,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> */
/* 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> */
/* num overloads */ 2,
- /* overloads */ &kOverloads[326],
+ /* overloads */ &kOverloads[412],
},
{
/* [8] */
/* 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> */
/* 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 +14289,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 +14302,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 +14352,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] */
@@ -14382,7 +14387,7 @@
/* 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] */
@@ -14430,14 +14435,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 +14455,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,61 +14468,61 @@
/* [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, C : iu32>(texture: texture_1d<T>, level: C) -> 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, C : iu32>(texture: texture_2d<T>, level: C) -> 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, C : iu32>(texture: texture_2d_array<T>, level: C) -> 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, C : iu32>(texture: texture_3d<T>, level: C) -> 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, C : iu32>(texture: texture_cube<T>, level: C) -> 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, C : iu32>(texture: texture_cube_array<T>, level: C) -> 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<C : iu32>(texture: texture_depth_2d, level: C) -> vec2<i32> */
/* fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32> */
+ /* fn textureDimensions<C : iu32>(texture: texture_depth_2d_array, level: C) -> vec2<i32> */
/* fn textureDimensions(texture: texture_depth_cube) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32> */
+ /* fn textureDimensions<C : iu32>(texture: texture_depth_cube, level: C) -> vec2<i32> */
/* fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32> */
- /* fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32> */
+ /* fn textureDimensions<C : iu32>(texture: texture_depth_cube_array, level: C) -> 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> */
@@ -14529,31 +14534,31 @@
},
{
/* [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>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<T> */
+ /* fn textureGather<T : fiu32, C : iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C, @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>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32> */
+ /* fn textureGather<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> vec4<f32> */
+ /* fn textureGatherCompare<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, depth_ref: f32) -> vec4<f32> */
/* num overloads */ 6,
- /* overloads */ &kOverloads[184],
+ /* overloads */ &kOverloads[190],
},
{
/* [88] */
@@ -14592,88 +14597,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<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32> */
+ /* fn textureSample<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> f32 */
+ /* fn textureSample<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @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<C : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> 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<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, bias: f32) -> vec4<f32> */
+ /* fn textureSampleBias<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, 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<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompare<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, 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<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32 */
+ /* fn textureSampleCompareLevel<C : iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, 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<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
+ /* fn textureSampleGrad<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, 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<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, level: f32) -> vec4<f32> */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, 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<C : iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, level: f32) -> vec4<f32> */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C) -> f32 */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C) -> f32 */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C, @const offset: vec2<i32>) -> f32 */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: C) -> f32 */
+ /* fn textureSampleLevel<C : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C, level: C) -> 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 +14689,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>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: C, 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>(texture: texture_1d<T>, coords: C, level: C) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32>(texture: texture_2d<T>, coords: vec2<C>, level: C) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: C, level: C) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32>(texture: texture_3d<T>, coords: vec3<C>, level: C) -> vec4<T> */
+ /* fn textureLoad<T : fiu32, C : iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: C) -> vec4<T> */
+ /* fn textureLoad<C : iu32>(texture: texture_depth_2d, coords: vec2<C>, level: C) -> f32 */
+ /* fn textureLoad<C : iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: C, level: C) -> f32 */
+ /* fn textureLoad<C : iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: C) -> 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 +14798,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 +14852,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 +14870,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 +14886,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 +14895,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,42 +14914,42 @@
/* 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] */
@@ -14953,14 +14958,14 @@
/* op <<<T : ia>(T, ia) -> T */
/* op <<<T : ia, N : num>(vec<N, T>, vec<N, ia>) -> 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 +14994,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 +15010,7 @@
/* init f32(f32) -> f32 */
/* conv f32<T : scalar_no_f32>(T) -> f32 */
/* num overloads */ 3,
- /* overloads */ &kOverloads[282],
+ /* overloads */ &kOverloads[273],
},
{
/* [3] */
@@ -15021,7 +15026,7 @@
/* init bool(bool) -> bool */
/* conv bool<T : scalar_no_bool>(T) -> bool */
/* num overloads */ 3,
- /* overloads */ &kOverloads[273],
+ /* overloads */ &kOverloads[267],
},
{
/* [5] */
@@ -15035,7 +15040,7 @@
/* 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] */
@@ -15082,7 +15087,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 +15098,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 +15109,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 +15120,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 +15131,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 +15142,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 +15153,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 +15164,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 +15175,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..1fb4d16 100644
--- a/src/tint/resolver/intrinsic_table_test.cc
+++ b/src/tint/resolver/intrinsic_table_test.cc
@@ -568,16 +568,16 @@
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>, level: C) -> i32 where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_2d<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_2d_array<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_3d<T>, level: C) -> vec3<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_cube<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_cube_array<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_depth_2d, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_depth_2d_array, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_depth_cube, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_depth_cube_array, level: C) -> vec2<i32> where: C is i32 or u32
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
@@ -607,17 +607,17 @@
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, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_1d<T>, level: C) -> i32 where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_2d<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_2d_array<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_3d<T>, level: C) -> vec3<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_cube<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_cube_array<T>, level: C) -> vec2<i32> where: T is f32, i32 or u32, C is i32 or u32
+ textureDimensions(texture: texture_depth_2d_array, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_depth_cube, level: C) -> vec2<i32> where: C is i32 or u32
+ textureDimensions(texture: texture_depth_cube_array, level: C) -> vec2<i32> where: C is i32 or u32
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
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..49e26df 100644
--- a/src/tint/transform/multiplanar_external_texture_test.cc
+++ b/src/tint/transform/multiplanar_external_texture_test.cc
@@ -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) {
@@ -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/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/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc
index fc9de73..b2652e2 100644
--- a/src/tint/writer/glsl/generator_impl.cc
+++ b/src/tint/writer/glsl/generator_impl.cc
@@ -1335,6 +1335,26 @@
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_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: {
if (texture_type->Is<sem::StorageTexture>()) {
@@ -1353,7 +1373,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 {
@@ -1387,7 +1407,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 {
@@ -1501,12 +1521,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 +1536,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 +1569,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..3a39762 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,7 +213,7 @@
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:
@@ -231,37 +231,41 @@
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::kLoad2dArrayLevelI32:
+ case ValidTextureOverload::kLoad3dLevelI32:
+ return R"(texelFetch(tint_symbol_2, ivec3(uvec3(1u, 2u, 3u)), int(4u));)";
case ValidTextureOverload::kLoadDepthMultisampled2dF32:
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::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/hlsl/generator_impl_builtin_texture_test.cc b/src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc
index b996b70..5b15c02 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:
@@ -323,37 +323,41 @@
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::kLoad2dArrayLevelI32:
+ case ValidTextureOverload::kLoad3dLevelI32:
+ return R"(tint_symbol.Load(uint4(1u, 2u, 3u, 4u));)";
case ValidTextureOverload::kLoadDepthMultisampled2dF32:
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::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/msl/generator_impl_builtin_texture_test.cc b/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
index dd4a92f..65fbfda 100644
--- a/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
+++ b/src/tint/writer/msl/generator_impl_builtin_texture_test.cc
@@ -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,7 +87,7 @@
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:
@@ -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,7 +204,7 @@
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:
@@ -222,48 +222,46 @@
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
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::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/spirv/builder.cc b/src/tint/writer/spirv/builder.cc
index 91b16b4..29f2f85 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;
diff --git a/src/tint/writer/spirv/builder_builtin_texture_test.cc b/src/tint/writer/spirv/builder_builtin_texture_test.cc
index b5fcc9c..5b64039 100644
--- a/src/tint/writer/spirv/builder_builtin_texture_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_texture_test.cc
@@ -614,18 +614,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 +672,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 +732,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 +740,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 +817,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 +905,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 +1076,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 +1084,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
)",
@@ -1514,20 +1518,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 +1810,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 +1897,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 +1905,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 +2313,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 +2374,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 +2382,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 +2405,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 +2604,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 +2613,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 +2752,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 +2768,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 +2872,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"(
)"};
@@ -3127,7 +3135,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 +3200,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 +3248,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 +3322,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 +3397,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 +3470,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 +3519,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
@@ -3615,7 +3627,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 +3657,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/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
index 6ca0d46..3fdeb98 100644
--- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
abs_421ca3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D461B57CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
index 4d6ca9d..dfb72b0 100644
--- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
abs_538d29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C4B2837D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
index 427ca6c..9d84689 100644
--- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
abs_5ae4fe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB61B87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
index a341373..cf7d9fd7 100644
--- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
abs_fd247f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
index e66364b..33eb215 100644
--- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
acos_004aff();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F5C6E5B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
index 3ee115e..666eb30 100644
--- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
acos_203628();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019D14DE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
index fa8c371..6732011 100644
--- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
acos_303e3d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
index 38dd9cd..9764843 100644
--- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
acos_f47057();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020584057560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
index 44e42cc..f6820c0 100644
--- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
acosh_5f49d8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001641C7488B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
index 89d2293..d79841d 100644
--- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
acosh_a37dfe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000285D7A33130(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
index 3c8ea41..3f75f56 100644
--- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
acosh_de60d8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027AF4D645C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
index a35e840b..942ee0c 100644
--- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
acosh_f56574();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221246484D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
index e6aa1fc..1b785a0 100644
--- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
asin_11dfda();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
index 3078022..54b7621 100644
--- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
asin_2d8e29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000140BC7EE140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
index 4d868fa..4233376 100644
--- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
asin_3cfbd4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B4BDC88B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
index c17039a..516f6a3 100644
--- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
asin_b4aced();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000138E6B7E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
index c76be3c..3bd5cb4 100644
--- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
asinh_468a48();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C0A8E8450(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
index d5bda99..bf86437 100644
--- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
asinh_95ab2b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017880279490(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
index d46056e..2969a86 100644
--- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
asinh_ad8f8b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AC790D84D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
index d67e924..0019998 100644
--- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
asinh_fb5e8c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E444F93560(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
index 32fb21e..8c47b24 100644
--- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan_19faea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002329F308C50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
index 98c9ee9..76a8d82 100644
--- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan_1e1764();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C856E61160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
index 338d894..85ede7d 100644
--- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan_a5f421();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000186B9618C70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
index e5a9a51..9e851e8 100644
--- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
atan_a7ba61();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
index 3c389fb..e945dce 100644
--- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan2_21dfea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C31CCD060(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
index 251cb38..a28508d 100644
--- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan2_93febc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029435E06D30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
index c13f773..9eaf692 100644
--- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
atan2_ca698e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
index c24da1d..fc6677f 100644
--- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
atan2_d983ab();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000259F9C66DF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
index 73c6586..c836a42 100644
--- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
atanh_5bf88d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F6B2FD2F70(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
index f0a2f1e..673c1a8 100644
--- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
atanh_d2d8cd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001760B391820(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
index 96b829b..8ac8233 100644
--- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
atanh_e3b450();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176443384D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
index 46881a0..73c7d6e 100644
--- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
atanh_ec4b06();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001899EE63220(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
index 21a195e..740b9fb 100644
--- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ceil_09bf52();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013DAD2D1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
index 59bf2e8..1435d96 100644
--- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ceil_18c240();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024369541160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
index 9b9adc4..3ff7ba1 100644
--- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ceil_4bca2a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016D987AB790(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
index b743e2f..c53464e 100644
--- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
ceil_f3f889();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
index d8e4382..77968a9 100644
--- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
clamp_235b29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017FE0738160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
index 20423bb..3841415 100644
--- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
clamp_2c251b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000225C8376D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
index b397e5f..92bfc65 100644
--- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
clamp_553ffb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
index 823e2b2..71ab78a 100644
--- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
clamp_b195eb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F44BFDB000(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
index 966a5e3..d5157ff 100644
--- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cos_0835a8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012E9639AC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
index 8326494..df2ecbf 100644
--- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cos_0a89f7();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E7F3887E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
index f3677ee..50de922 100644
--- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cos_5bc2c6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024E8E5A87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
index e33a4d6..26cef80 100644
--- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
cos_fc047d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
index 423dd17..d771cfa 100644
--- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
cosh_2ed778();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
index 2e19b88..e532d68 100644
--- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cosh_3b7bbf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A6F400DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
index b1f7f46..30c509a 100644
--- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cosh_43b672();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002ACB9EB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
index f6e2ac1..003dd06 100644
--- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cosh_b1b8a0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D169B6EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
index f6d21a3..8dd8e41 100644
--- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
cross_9857cb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ABE1B9A830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
index 825ef73..f7ea54a 100644
--- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
degrees_3055d3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020615990520(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
index 7647535..b871168 100644
--- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
degrees_5e9805();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021D8DD40440(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
index 2e49c90..6d77c30 100644
--- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
degrees_dfe8f4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BA47346FD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
index 5ada312..c6c9876 100644
--- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
degrees_f59715();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025AB33F0650(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
index 919bf99..461b82a 100644
--- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
determinant_32bfde();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
index 0b82260..e64298d 100644
--- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
determinant_d7c86f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
index 0c7ad5c..23274eb 100644
--- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
determinant_fc12a5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
index 66ce4f3..ff8a9f0 100644
--- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
distance_7272f3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
index 653ef2c..271dd40 100644
--- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
distance_7d201f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
index 198576c..bb842fc 100644
--- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
distance_892a5d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
index cd6b130..8546756 100644
--- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
distance_928fa0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
index c6a02e9..0d34f0f 100644
--- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
dot_8e40f1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
index d48d74e..9c84d25 100644
--- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
dot_cd5a04();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
index 7c95a5e..e903bf7 100644
--- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
dot_d0d179();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index 8ccdb8d..5692ea0 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
dot4I8Packed_881e62();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000239A33210B0(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
-
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
index e88d385..82bb3cb 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
@@ -23,4 +23,7 @@
dot4I8Packed_881e62();
}
-Failed to generate: error: Unknown import method: dot4I8Packed
+Failed to generate: builtins/gen/literal/dot4I8Packed/881e62.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index e84c3da..c371939 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
dot4U8Packed_fbed7b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D2469D6CD0(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
-
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
index 10a682f..e1bd1eb 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
@@ -23,4 +23,7 @@
dot4U8Packed_fbed7b();
}
-Failed to generate: error: Unknown import method: dot4U8Packed
+Failed to generate: builtins/gen/literal/dot4U8Packed/fbed7b.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
index 5442169..45f4937 100644
--- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp_13806d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8343687E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
index 408ebd5..203f106 100644
--- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp_2e08e2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E5CBC9ECC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
index 0c0949d..b3acd29 100644
--- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp_611a87();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001865DDB0AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
index 58c5737..782a329 100644
--- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
exp_c18fe9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
index 88d2e16..420ca41 100644
--- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp2_151a4c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4AAF5DCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
index b4aa1cd..9aa33ca 100644
--- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp2_751377();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A7CDE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
index ed6bb8d..b041bb4 100644
--- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
exp2_b408e4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
index 0806afc..8fd64a7 100644
--- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
exp2_ffa827();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D88F07E620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
index d7c9b48..7ed18de 100644
--- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
faceForward_524986();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E4AB906E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
index b33b557..0164001 100644
--- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
faceForward_cc63dc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029C52499560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
index 9b647bd..3cb6b43 100644
--- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
faceForward_fb0f2e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153714C6E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
index 2257a33..b2337a0 100644
--- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
floor_3802c0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B0BC4CD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
index a7f1d04..10bfbb1 100644
--- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
floor_84658c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F339C96B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
index 2503575..f7fedb9 100644
--- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
floor_a2d31b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A78E20C3E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
index b56d8ce..d210fdd 100644
--- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
floor_b6e09c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
index 4aee5ae..e9da9db 100644
--- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fma_ab7818();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000130923E6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
index cad7d14..51ff8b3 100644
--- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fma_bf21b6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F50BF5D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
index ce74e5a..3e21ac7 100644
--- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
fma_c8abb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
index 2d0f609..1ddf2d33 100644
--- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fma_e7abdc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A860253980(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
index c6bb42e..23e5f82 100644
--- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fract_181aa9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E70B80AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
index 579a05a..4351653 100644
--- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fract_498c77();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000293E8528810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
index f2fcd48..40f9c43 100644
--- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
fract_958a1d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001490DA5B940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
index 4bccb6ef..9cb9bf9 100644
--- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
fract_eb38ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
index 45fbb59..8580f75 100644
--- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
frexp_3dd21e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4F5EB9720(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
index 05c7d5f..af127fd 100644
--- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
frexp_5257dd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017322E51900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
index acfc0ca..6b16ff6 100644
--- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
frexp_5f47bf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D35F6E9740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
index b25e403..1ee378c 100644
--- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
frexp_ae4a66();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D8ABEFAB20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
index 81427b0..410b91e 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
inverseSqrt_440300();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
index 80d1b67..7732ac5 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
inverseSqrt_5f51f8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000288A2227E00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
index 6e08e83..07d5781 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
inverseSqrt_b85ebd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEA9110080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
index 6880c60..8f461ba 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
inverseSqrt_cbdc70();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E1CCE37DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
index 0608e1f..f1e0c9a 100644
--- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ldexp_3d90b4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001808B7D81C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
index d3e207e..0987375 100644
--- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
ldexp_624e0c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
index ac6b68f..b6b1506 100644
--- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ldexp_7485ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001698F7B0100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
index a53fa35..a84e2fa 100644
--- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
ldexp_7fa13c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018D79877AB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
index aaa0dce..579615e 100644
--- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
length_3f0e13();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
index 736654a..ac6e839 100644
--- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
length_5b1a9b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
index 99ff3bb..b1cdfca 100644
--- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
length_ba16d6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
index 2a73153..c5dafdc 100644
--- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
length_c158da();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
index 9f4b2ef..9610478 100644
--- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log_6ff86f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000269CEF087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
index c8ce6df..a17a48b 100644
--- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log_8f0e32();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000262B0B30AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
index 9510d92..9ba56aa 100644
--- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
log_c9f489();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
index 46491bc..dee6e11 100644
--- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log_cdbdc1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EBFCF31A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
index 76ffd38..23d8495 100644
--- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log2_38b478();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D9884A1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
index cc463e0..dac6ba1 100644
--- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log2_776088();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000254F7CB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
index a1f50c0..fb4c5c5 100644
--- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
log2_8c10b3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
index 13779ea..0ca144b 100644
--- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
log2_fb9f0b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D63F9088D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
index e031d96..0dffb14 100644
--- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
max_111ac0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
index 54be2a8..3012d3c 100644
--- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
max_34956e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016DDE0B63C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
index bed53ac..56d365d 100644
--- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
max_445169();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000280F3D6A940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
index cff4cc6..dfbfa9d 100644
--- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
max_e14f2b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002878BF192B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
index 8a7bcbd..15ea82a 100644
--- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
min_7c710a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000236F63CBD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
index 9a20bd5..df4009f 100644
--- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
min_ab0acd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CE0B337DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
index 4b61aaa..26e5f9b 100644
--- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
min_ac84d6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
index a176ab3..b0a7318 100644
--- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
min_e780f9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEDC6E7DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
index d8b981b..dbef3f6 100644
--- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
mix_38cbbb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
index 92c7608..2f46794 100644
--- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_63f2fd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F0AF6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
index 784bfa3..88b49b6 100644
--- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_98ee3e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DF5529870(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
index 90e3fb0..20f26c9 100644
--- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_c1aec6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000197E6FB4A90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
index 6ce6313..79505ff 100644
--- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_e46a83();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8B7BA68A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
index 012c441..c0b47c2 100644
--- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_ee2468();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8684C57F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
index 26ebdc4..60d5d206 100644
--- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
mix_f1a543();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020D39006FD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
index 9f164da..b455907 100644
--- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
modf_45005f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B818324B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
index ce161cd..3d55a32 100644
--- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
modf_8dbbbf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024604C24BA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
index 7a708c7..7074c4e 100644
--- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
modf_995934();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E71A92D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
index 63d6da7..aed1027 100644
--- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
modf_a545b9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002393F2A4B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
index 2533db5..1264893 100644
--- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
normalize_39d5ec();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002467316DBB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
index 52cbb8b..fd543f6 100644
--- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
normalize_7990f3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E10FCEEA50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
index 3eafadc..70f8748 100644
--- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
normalize_b8cb8d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027C766AD380(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
index bca42d2..24ae102 100644
--- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
pow_4f33b2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027797C56270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
index a10ed77..8e63234 100644
--- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
pow_ce9ef5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
index fa7eaa6..6fea07e 100644
--- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
pow_f37b25();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE95DF6780(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
index cae49c5..6663956 100644
--- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
pow_fa5429();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028F07286290(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
index d1aeace..e765dd7 100644
--- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
radians_208fd9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5647B0440(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
index ac64196..a75c8d2 100644
--- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
radians_44f20b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C9C3BC350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
index 6a13fc2..f2869e0 100644
--- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
radians_7ea4c7();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C0F82EE760(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
index 880018a..df149a6 100644
--- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
radians_fbacf0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028D5138C350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
index e4fb2cc..17cc843 100644
--- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
reflect_310de5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFC20B7D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
index 3e8b180..7ab3dc5 100644
--- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
reflect_61ca21();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E16EDB83B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
index 983ff2a..6df7fb5 100644
--- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
reflect_bb15ac();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E110B86630(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
index 776bfd5..41d1449 100644
--- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
refract_0594ba();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B24EF980B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
index 10ae4be..2bfba7b 100644
--- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
refract_570cb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F32B087F20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
index fd30a49..47692c9 100644
--- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
refract_8984af();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019FDBAB9D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
index ba25fa1..3e7bb1c 100644
--- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
round_9078ef();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
index b025eb8..53cbe3d 100644
--- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
round_d87e84();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D031328810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
index 899f28d..f5a3cd7 100644
--- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
round_e1bba2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F98A3E5C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
index c73645a..ab7ae6a 100644
--- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
round_f665b5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F6B0D8810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
index 6698fae..6dc96e5 100644
--- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
saturate_462535();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000234CFF040C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
index 50c0dd1..599fee5 100644
--- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
saturate_cd2028();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000147A2EDE4A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
index 548bc74..e2e1210 100644
--- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
saturate_dcde71();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000002580D780150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
index 8bc21b2..4342705 100644
--- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
saturate_e8df56();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x0000020A83F5F990(2,3-11): error X3000: unrecognized identifier 'float16_t'
-C:\src\dawn\test\tint\Shader@0x0000020A83F5F990(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
index 9d0c5f2..27a4b01 100644
--- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_10e73b() {
- float16_t res = (true ? float16_t(0.0h) : float16_t(0.0h));
+ float16_t res = float16_t(0.0h);
}
struct tint_symbol {
@@ -30,7 +30,3 @@
select_10e73b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
index 2165304..202fc05 100644
--- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_1ada2a() {
- vector<float16_t, 3> res = (true ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+ vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_1ada2a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD85D20100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
index 3117c7b..dd64e1f 100644
--- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_53d518() {
- vector<float16_t, 3> res = ((true).xxx ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+ vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_53d518();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025E61DB8680(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
index 522a9e3..24445f6 100644
--- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_830dd9() {
- vector<float16_t, 4> res = (true ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+ vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_830dd9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E721C969A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
index d789a21..0d877fb 100644
--- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_86f9bd() {
- vector<float16_t, 2> res = (true ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+ vector<float16_t, 2> res = (float16_t(0.0h)).xx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_86f9bd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021328920540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
index 651eaf7..f399e8a 100644
--- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_a081f1() {
- vector<float16_t, 4> res = ((true).xxxx ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+ vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_a081f1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000202B4A94A10(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
index 0006a34..1895543 100644
--- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
SKIP: FAILED
void select_ed7c13() {
- vector<float16_t, 2> res = ((true).xx ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+ vector<float16_t, 2> res = (float16_t(0.0h)).xx;
}
struct tint_symbol {
@@ -30,6 +30,3 @@
select_ed7c13();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024686E0D4B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
index b111818..f007800 100644
--- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sign_160933();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A1A601ACD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
index 7493bb0..35361f8 100644
--- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sign_5d283a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002BE5E5FBCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
index 6690d62..7f140a8 100644
--- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
sign_7c85ea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
index a77b50b..ac5e5bd 100644
--- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sign_ccdb3c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE218EE9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
index b22e708..474f706 100644
--- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sin_2c903b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153299087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
index 38960b6..3121443 100644
--- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sin_3cca11();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025136111160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
index 26e763a..61b62da 100644
--- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sin_5c0712();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE3DAE1580(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
index f6b54ff..ce25b8b 100644
--- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
sin_66a59f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
index cac1c4b..992ccac 100644
--- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sinh_0908c1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E72E75B6A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
index 4dca58e2..17ff268 100644
--- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
sinh_69cce2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
index 357854d..e9b6ea2 100644
--- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sinh_924f19();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019A6900E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
index 1100cab..2fd547e 100644
--- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sinh_ba7e25();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024997A21160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
index ab2bc4c..479195e 100644
--- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
smoothstep_12c031();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000298CE8896B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
index ac1f915..ced8574 100644
--- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
smoothstep_586e12();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
index 9837ccc..d02eae3 100644
--- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
smoothstep_6e7a74();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023CD6C4BC30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
index 92388b8..474ec39 100644
--- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
smoothstep_c43ebd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023328C496C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
index 56a2453..ac14731 100644
--- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sqrt_803d1c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002342D12DCF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
index 8d0d057..efc91d1 100644
--- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sqrt_895a0c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD1487D710(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
index a2088d6..ac7cd4c 100644
--- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
sqrt_d9ab4d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256F2C5EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
index 71be999..ce63d1d 100644
--- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
sqrt_ec33e9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
index 9be8957..ee0a830 100644
--- a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
step_07cb06();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190D7A566C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
index 634d34b..6f92708 100644
--- a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
step_630d07();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
index a394391..679912f 100644
--- a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
step_baa320();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023DD42966C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
index 00514c5..e15af36 100644
--- a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
step_cc6b61();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E30CB9FC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
index ec31619..081aa61 100644
--- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tan_539e54();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A069448210(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
index 63c3d76..3bc918f 100644
--- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tan_9f7c9c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211853A84A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
index 2057021..ab61bca 100644
--- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
tan_d4d491();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
index d84a308..b3beb99 100644
--- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tan_db0456();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B50B7A7080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
index 34fa18b..43d81b4 100644
--- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tanh_06a4fe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025833A77D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
index de2732f..83f1f22 100644
--- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
tanh_5b19af();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
index fce0b80..0edca60 100644
--- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tanh_6d105a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015291DA1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
index cc5d017..3403351 100644
--- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
tanh_e8efb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E87C8DF490(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl
new file mode 100644
index 0000000..07e738a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<i32>
+fn textureDimensions_0a1ce8() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0a1ce8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b2765b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0a1ce8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b2765b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0a1ce8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl
new file mode 100644
index 0000000..c1709179
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_0a1ce8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_0a1ce8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl
new file mode 100644
index 0000000..224368f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0a1ce8(depth2d_array<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_0a1ce8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0a1ce8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0a1ce8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm
new file mode 100644
index 0000000..b602707
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0a1ce8 "textureDimensions_0a1ce8"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0a1ce8 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %16 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl
new file mode 100644
index 0000000..d050a46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_0a1ce8() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0a1ce8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl
new file mode 100644
index 0000000..cb2ee6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> i32
+fn textureDimensions_0d7633() {
+ var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0d7633();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c7d1560
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0d7633();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0d7633();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c7d1560
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0d7633();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0d7633();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl
new file mode 100644
index 0000000..8650ac5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_0d7633();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_0d7633();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl
new file mode 100644
index 0000000..e8ba8c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0d7633(texture1d<int, access::sample> tint_symbol_1) {
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+ textureDimensions_0d7633(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0d7633(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0d7633(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm
new file mode 100644
index 0000000..3622ddf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0d7633 "textureDimensions_0d7633"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+ %23 = OpConstantNull %int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0d7633 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_int Function %23
+ %18 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %int %18 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl
new file mode 100644
index 0000000..231bad1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_0d7633() {
+ var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0d7633();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl
new file mode 100644
index 0000000..377cba0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_0e28d3() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0e28d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e30632c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0e28d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0e28d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e30632c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0e28d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0e28d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl
new file mode 100644
index 0000000..58d893a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_0e28d3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_0e28d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl
new file mode 100644
index 0000000..e774b54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0e28d3(texturecube_array<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_0e28d3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0e28d3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0e28d3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..f72b374
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0e28d3 "textureDimensions_0e28d3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0e28d3 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %16 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..f9c360a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_0e28d3() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0e28d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl
new file mode 100644
index 0000000..049b3af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> i32
+fn textureDimensions_16f7cb() {
+ var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_16f7cb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..711c3d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_16f7cb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_16f7cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..711c3d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_16f7cb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_16f7cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl
new file mode 100644
index 0000000..a856a6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_16f7cb();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_16f7cb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl
new file mode 100644
index 0000000..a358067
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_16f7cb(texture1d<float, access::sample> tint_symbol_1) {
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+ textureDimensions_16f7cb(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_16f7cb(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_16f7cb(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..ec32af4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_16f7cb "textureDimensions_16f7cb"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+ %23 = OpConstantNull %int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_16f7cb = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_int Function %23
+ %18 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %int %18 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..3ce015d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_16f7cb() {
+ var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_16f7cb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl
new file mode 100644
index 0000000..ed361fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> i32
+fn textureDimensions_1e3981() {
+ var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_1e3981();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38cf7e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_1e3981();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_1e3981();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38cf7e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+ int2 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_1e3981();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_1e3981();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl
new file mode 100644
index 0000000..24f7b92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_1e3981();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_1e3981();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl
new file mode 100644
index 0000000..9651af1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1e3981(texture1d<uint, access::sample> tint_symbol_1) {
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_1e3981(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_1e3981(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_1e3981(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm
new file mode 100644
index 0000000..90f1292
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_1e3981 "textureDimensions_1e3981"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+ %23 = OpConstantNull %int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_1e3981 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_int Function %23
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %int %19 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl
new file mode 100644
index 0000000..65d87df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_1e3981() {
+ var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_1e3981();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl
new file mode 100644
index 0000000..08978c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_216688() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_216688();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c4c2066
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_216688();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_216688();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c4c2066
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_216688();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_216688();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl
new file mode 100644
index 0000000..653c714
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_216688();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_216688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl
new file mode 100644
index 0000000..79a21ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_216688(texture2d_array<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_216688(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_216688(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_216688(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm
new file mode 100644
index 0000000..f5abe15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_216688 "textureDimensions_216688"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_216688 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %16 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_216688
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_216688
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_216688
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl
new file mode 100644
index 0000000..2480c8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_216688() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_216688();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl
new file mode 100644
index 0000000..4328aef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_220dc3() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_220dc3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..faf57cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_220dc3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_220dc3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..faf57cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_220dc3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_220dc3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl
new file mode 100644
index 0000000..4977181
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_220dc3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_220dc3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl
new file mode 100644
index 0000000..953e48a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_220dc3(texture2d<uint, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_220dc3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_220dc3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_220dc3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm
new file mode 100644
index 0000000..41ca029
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_220dc3 "textureDimensions_220dc3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_220dc3 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %20 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v2int %20 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl
new file mode 100644
index 0000000..35cc4dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_220dc3() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_220dc3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl
new file mode 100644
index 0000000..082fab0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_2d4299() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_2d4299();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c2051f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_2d4299();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_2d4299();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c2051f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_2d4299();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_2d4299();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl
new file mode 100644
index 0000000..c5a791c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_2d4299();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_2d4299();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl
new file mode 100644
index 0000000..dcc5aa1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2d4299(texturecube_array<int, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+ textureDimensions_2d4299(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_2d4299(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_2d4299(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm
new file mode 100644
index 0000000..9a78821
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_2d4299 "textureDimensions_2d4299"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_2d4299 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %17 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl
new file mode 100644
index 0000000..41da16a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_2d4299() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_2d4299();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl
new file mode 100644
index 0000000..28c7b44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_4d42cf() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_4d42cf();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..335abdb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_4d42cf();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_4d42cf();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..335abdb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_4d42cf();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_4d42cf();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl
new file mode 100644
index 0000000..a303a97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_4d42cf();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_4d42cf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl
new file mode 100644
index 0000000..b77d856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4d42cf(texture2d<int, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+ textureDimensions_4d42cf(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_4d42cf(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_4d42cf(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm
new file mode 100644
index 0000000..b8e96d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_4d42cf "textureDimensions_4d42cf"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_4d42cf = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl
new file mode 100644
index 0000000..4185202
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_4d42cf() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_4d42cf();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl
new file mode 100644
index 0000000..617f0df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_5331e0() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_5331e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..970329b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_5331e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_5331e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..970329b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_5331e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_5331e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl
new file mode 100644
index 0000000..9d7c5ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_5331e0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_5331e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl
new file mode 100644
index 0000000..70ffada
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_5331e0(texture2d<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+ textureDimensions_5331e0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_5331e0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_5331e0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..be5f6cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_5331e0 "textureDimensions_5331e0"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_5331e0 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f4c8ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_5331e0() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_5331e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl
new file mode 100644
index 0000000..427c713
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<i32>
+fn textureDimensions_647386() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_647386();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..940a060
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_647386();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_647386();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..940a060
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_647386();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_647386();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl
new file mode 100644
index 0000000..7e35c07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_647386();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_647386();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl
new file mode 100644
index 0000000..03d3ff9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_647386(depthcube<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+ textureDimensions_647386(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_647386(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_647386(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm
new file mode 100644
index 0000000..2411956
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_647386 "textureDimensions_647386"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_647386 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_647386
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_647386
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_647386
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl
new file mode 100644
index 0000000..6339c96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_647386() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_647386();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl
new file mode 100644
index 0000000..ea06df4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_6eae7f() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_6eae7f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2fb9257
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_6eae7f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_6eae7f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2fb9257
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_6eae7f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_6eae7f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl
new file mode 100644
index 0000000..6758f41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_6eae7f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_6eae7f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl
new file mode 100644
index 0000000..28bbf37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6eae7f(texturecube<int, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+ textureDimensions_6eae7f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_6eae7f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_6eae7f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm
new file mode 100644
index 0000000..a51782d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_6eae7f "textureDimensions_6eae7f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_6eae7f = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0415add
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_6eae7f() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_6eae7f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl
new file mode 100644
index 0000000..0d093ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<i32>
+fn textureDimensions_71b9f4() {
+ var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_71b9f4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..df1d04e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_71b9f4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_71b9f4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..df1d04e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_71b9f4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_71b9f4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl
new file mode 100644
index 0000000..d43d997
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_71b9f4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_71b9f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl
new file mode 100644
index 0000000..2815e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_71b9f4(texture3d<int, access::sample> tint_symbol_1) {
+ int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+ textureDimensions_71b9f4(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_71b9f4(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_71b9f4(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d1cb17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_71b9f4 "textureDimensions_71b9f4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %24 = OpConstantNull %v3int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_71b9f4 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v3int Function %24
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v3int %19 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a0ff1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_71b9f4() {
+ var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_71b9f4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl
new file mode 100644
index 0000000..182b849
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_7c8821() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_7c8821();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..efa39ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_7c8821();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_7c8821();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..efa39ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_7c8821();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_7c8821();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl
new file mode 100644
index 0000000..fa19d29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_7c8821();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_7c8821();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl
new file mode 100644
index 0000000..dd07d8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7c8821(texture2d_array<int, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+ textureDimensions_7c8821(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_7c8821(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_7c8821(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm
new file mode 100644
index 0000000..af64de4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_7c8821 "textureDimensions_7c8821"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_7c8821 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %17 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl
new file mode 100644
index 0000000..4156043
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_7c8821() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_7c8821();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl
new file mode 100644
index 0000000..2142832
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_8d87ed() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_8d87ed();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e554d37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_8d87ed();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_8d87ed();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e554d37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_8d87ed();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_8d87ed();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl
new file mode 100644
index 0000000..19bfcef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_8d87ed();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_8d87ed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl
new file mode 100644
index 0000000..da5758b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8d87ed(texturecube<uint, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+ textureDimensions_8d87ed(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_8d87ed(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_8d87ed(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm
new file mode 100644
index 0000000..2bf40fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_8d87ed "textureDimensions_8d87ed"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_8d87ed = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %20 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v2int %20 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a88207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_8d87ed() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_8d87ed();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl
new file mode 100644
index 0000000..bb326a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<i32>
+fn textureDimensions_941d6e() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_941d6e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d1de2e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_941d6e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_941d6e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d1de2e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_941d6e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_941d6e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl
new file mode 100644
index 0000000..5a05fed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_941d6e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_941d6e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl
new file mode 100644
index 0000000..efb87fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_941d6e(depth2d<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+ textureDimensions_941d6e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_941d6e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_941d6e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ed6d4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_941d6e "textureDimensions_941d6e"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_941d6e = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl
new file mode 100644
index 0000000..5fd586e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_941d6e() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_941d6e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl
new file mode 100644
index 0000000..48a77d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_95b2db() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_95b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f550adc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_95b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_95b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f550adc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+ int3 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_95b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_95b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..645a437
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_95b2db();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_95b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl
new file mode 100644
index 0000000..b6cabc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_95b2db(texturecube<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+ textureDimensions_95b2db(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_95b2db(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_95b2db(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f784cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_95b2db "textureDimensions_95b2db"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %24 = OpConstantNull %v2int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_95b2db = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %24
+ %19 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..928eafb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_95b2db() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_95b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl
new file mode 100644
index 0000000..adef2a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<i32>
+fn textureDimensions_d1a23d() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_d1a23d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c343f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_d1a23d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_d1a23d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c343f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_d1a23d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_d1a23d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl
new file mode 100644
index 0000000..7cd9cbc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_d1a23d();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_d1a23d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl
new file mode 100644
index 0000000..047e514
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d1a23d(depthcube_array<float, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_d1a23d(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_d1a23d(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_d1a23d(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm
new file mode 100644
index 0000000..76d262c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_d1a23d "textureDimensions_d1a23d"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_d1a23d = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %21 = OpLoad %11 %arg_0
+ %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+ %16 = OpVectorShuffle %v2int %19 %19 0 1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl
new file mode 100644
index 0000000..59389d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_d1a23d() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_d1a23d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl
new file mode 100644
index 0000000..064b0b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_dc7798() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_dc7798();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ccc7f18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_dc7798();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_dc7798();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ccc7f18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_dc7798();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_dc7798();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl
new file mode 100644
index 0000000..aa97b96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_dc7798();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_dc7798();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl
new file mode 100644
index 0000000..01e28d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dc7798(texture2d_array<uint, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+ textureDimensions_dc7798(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_dc7798(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_dc7798(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm
new file mode 100644
index 0000000..fbd3442
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_dc7798 "textureDimensions_dc7798"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_dc7798 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %22 = OpLoad %11 %arg_0
+ %20 = OpImageQuerySizeLod %v3int %22 %uint_1
+ %17 = OpVectorShuffle %v2int %20 %20 0 1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl
new file mode 100644
index 0000000..14e5b16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_dc7798() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_dc7798();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl
new file mode 100644
index 0000000..deca2cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_e17db8() {
+ var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_e17db8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5012db7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_e17db8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_e17db8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5012db7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_e17db8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_e17db8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl
new file mode 100644
index 0000000..f97ce9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_e17db8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+ textureDimensions_e17db8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl
new file mode 100644
index 0000000..a823db1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e17db8(texturecube_array<uint, access::sample> tint_symbol_1) {
+ int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+ textureDimensions_e17db8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_e17db8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_e17db8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm
new file mode 100644
index 0000000..07a61ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_e17db8 "textureDimensions_e17db8"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %26 = OpConstantNull %v2int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_e17db8 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v2int Function %26
+ %22 = OpLoad %11 %arg_0
+ %20 = OpImageQuerySizeLod %v3int %22 %uint_1
+ %17 = OpVectorShuffle %v2int %20 %20 0 1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl
new file mode 100644
index 0000000..ed7d8d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_e17db8() {
+ var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_e17db8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl
new file mode 100644
index 0000000..dfee32c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<i32>
+fn textureDimensions_f32242() {
+ var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_f32242();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c90e9c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_f32242();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_f32242();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c90e9c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_f32242();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_f32242();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl
new file mode 100644
index 0000000..67a1990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_f32242();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_f32242();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl
new file mode 100644
index 0000000..fa7482b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f32242(texture3d<uint, access::sample> tint_symbol_1) {
+ int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_f32242(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_f32242(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_f32242(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm
new file mode 100644
index 0000000..21d3c38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_f32242 "textureDimensions_f32242"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v3int = OpTypeVector %int 3
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %24 = OpConstantNull %v3int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_f32242 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v3int Function %24
+ %20 = OpLoad %11 %arg_0
+ %17 = OpImageQuerySizeLod %v3int %20 %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl
new file mode 100644
index 0000000..cfe186d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_f32242() {
+ var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_f32242();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl
new file mode 100644
index 0000000..87397ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<i32>
+fn textureDimensions_fbdfb6() {
+ var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_fbdfb6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ea42e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_fbdfb6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ea42e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+ int4 tint_tmp;
+ arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_fbdfb6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl
new file mode 100644
index 0000000..ca657c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+ textureDimensions_fbdfb6();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+ textureDimensions_fbdfb6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl
new file mode 100644
index 0000000..4b1a68f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_fbdfb6(texture3d<float, access::sample> tint_symbol_1) {
+ int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+ textureDimensions_fbdfb6(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_fbdfb6(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_fbdfb6(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm
new file mode 100644
index 0000000..32f2237
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_fbdfb6 "textureDimensions_fbdfb6"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %v3int = OpTypeVector %int 3
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %24 = OpConstantNull %v3int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_fbdfb6 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v3int Function %24
+ %19 = OpLoad %11 %arg_0
+ %16 = OpImageQuerySizeLod %v3int %19 %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl
new file mode 100644
index 0000000..91ba137
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_fbdfb6() {
+ var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_fbdfb6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl
new file mode 100644
index 0000000..43f2d69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
+fn textureGather_0166ec() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_0166ec();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d830838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_0166ec();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_0166ec();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d830838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_0166ec();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_0166ec();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl
new file mode 100644
index 0000000..4c7cbf8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_0166ec();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_0166ec();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl
new file mode 100644
index 0000000..71d1318
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_0166ec(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_0166ec(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_0166ec(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..0604de6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_0166ec "textureGather_0166ec"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %27 = OpConstantNull %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_0166ec = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %32
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4int %25 %27 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_0166ec
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_0166ec
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_0166ec
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ed3403
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_0166ec() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_0166ec();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl
new file mode 100644
index 0000000..fa8bb16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_04fa78() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_04fa78();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ab6b555
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+ int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_04fa78();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_04fa78();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ab6b555
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+ int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_04fa78();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_04fa78();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl
new file mode 100644
index 0000000..e7ccd0b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_04fa78();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_04fa78();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl
new file mode 100644
index 0000000..567f692
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_04fa78(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_04fa78(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_04fa78(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea71a5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_04fa78 "textureGather_04fa78"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_04fa78 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %27 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+ %20 = OpImageGather %v4int %25 %30 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureGather_04fa78
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_04fa78
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_04fa78
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d93ff5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_04fa78() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_04fa78();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl
new file mode 100644
index 0000000..91d42e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_11b2db() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_11b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a83a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_11b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_11b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a83a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_11b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_11b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..9e24c71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_11b2db();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_11b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl
new file mode 100644
index 0000000..759ae4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_11b2db(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_11b2db(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_11b2db(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..2a4f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_11b2db "textureGather_11b2db"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %25 = OpConstantNull %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_11b2db = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %19 = OpImageGather %v4float %23 %25 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureGather_11b2db
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_11b2db
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_11b2db
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4c60b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_11b2db() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_11b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl
new file mode 100644
index 0000000..6d12c78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_17baac() {
+ var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_17baac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d61645c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_17baac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_17baac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_17baac();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d61645c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_17baac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_17baac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_17baac();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl
new file mode 100644
index 0000000..25e22eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_17baac();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_17baac();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_17baac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl
new file mode 100644
index 0000000..5741331
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_17baac(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_17baac(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_17baac(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e3e581
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_17baac "textureGather_17baac"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_17baac = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureGather_17baac
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_17baac
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_17baac
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl
new file mode 100644
index 0000000..52cc99b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_17baac() {
+ var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_17baac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl
new file mode 100644
index 0000000..f4d677f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_1bf0ab() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_1bf0ab();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07ebb25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_1bf0ab();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_1bf0ab();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07ebb25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_1bf0ab();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_1bf0ab();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl
new file mode 100644
index 0000000..fa40fb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_1bf0ab();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_1bf0ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl
new file mode 100644
index 0000000..8d68cea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_1bf0ab(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_1bf0ab(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_1bf0ab(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3a739e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_1bf0ab "textureGather_1bf0ab"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %33 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_1bf0ab = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %33
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4uint %25 %30 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..a909ade
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_1bf0ab() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_1bf0ab();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl
new file mode 100644
index 0000000..8af9040
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_238ec4() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_238ec4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5a96bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_238ec4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_238ec4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5a96bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_238ec4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_238ec4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl
new file mode 100644
index 0000000..43df0a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_238ec4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_238ec4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl
new file mode 100644
index 0000000..32e3b88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_238ec4(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_238ec4(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_238ec4(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm
new file mode 100644
index 0000000..a637fed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_238ec4 "textureGather_238ec4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %32 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_238ec4 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_238ec4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_238ec4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_238ec4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl
new file mode 100644
index 0000000..37d0344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_238ec4() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_238ec4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl
new file mode 100644
index 0000000..38fb051
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_269250() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_269250();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..844cf71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_269250();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_269250();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_269250();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..844cf71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_269250();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_269250();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_269250();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl
new file mode 100644
index 0000000..73f7dc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_269250();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_269250();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_269250();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl
new file mode 100644
index 0000000..d7c68bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_269250(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_269250(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_269250(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_269250(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm
new file mode 100644
index 0000000..f88bf30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_269250 "textureGather_269250"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_269250 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4int %25 %31 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_269250
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_269250
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_269250
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c75feb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_269250() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_269250();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl
new file mode 100644
index 0000000..99474a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_2a4f40() {
+ var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_2a4f40();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..334a85f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+ float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_2a4f40();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_2a4f40();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..334a85f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+ float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_2a4f40();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_2a4f40();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl
new file mode 100644
index 0000000..5e67696
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+vec4 vertex_main() {
+ textureGather_2a4f40();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void compute_main() {
+ textureGather_2a4f40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl
new file mode 100644
index 0000000..ac60335
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_2a4f40(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_2a4f40(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_2a4f40(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_2a4f40(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6f0405
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_2a4f40 "textureGather_2a4f40"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_2a4f40 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %int_0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl
new file mode 100644
index 0000000..89388ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_2a4f40() {
+ var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_2a4f40();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl
new file mode 100644
index 0000000..851446a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_4e8ac5() {
+ var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_4e8ac5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c993bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_4e8ac5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_4e8ac5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c993bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_4e8ac5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_4e8ac5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl
new file mode 100644
index 0000000..cc5ccde
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_4e8ac5();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_4e8ac5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl
new file mode 100644
index 0000000..41a55ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_4e8ac5(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_4e8ac5(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_4e8ac5(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_4e8ac5(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm
new file mode 100644
index 0000000..452ff4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_4e8ac5 "textureGather_4e8ac5"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_4e8ac5 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4int %25 %31 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl
new file mode 100644
index 0000000..650b75d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_4e8ac5() {
+ var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_4e8ac5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl
new file mode 100644
index 0000000..7655962
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_59372a() {
+ var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_59372a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..677a356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_59372a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_59372a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_59372a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..677a356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_59372a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_59372a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_59372a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl
new file mode 100644
index 0000000..c6455a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_59372a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_59372a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_59372a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl
new file mode 100644
index 0000000..13183a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_59372a(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_59372a(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_59372a(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm
new file mode 100644
index 0000000..5aaf916
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_59372a "textureGather_59372a"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %32 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_59372a = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_59372a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_59372a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_59372a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba0ecac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_59372a() {
+ var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_59372a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl
new file mode 100644
index 0000000..e714724
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_6b7b74() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_6b7b74();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..18c0977
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_6b7b74();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_6b7b74();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..18c0977
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_6b7b74();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_6b7b74();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl
new file mode 100644
index 0000000..990088c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_6b7b74();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_6b7b74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl
new file mode 100644
index 0000000..21aefeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_6b7b74(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_6b7b74(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_6b7b74(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..7e7f3eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_6b7b74 "textureGather_6b7b74"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %36 = OpConstantNull %v4uint
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_6b7b74 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %36
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..3cc5160
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_6b7b74() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_6b7b74();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl
new file mode 100644
index 0000000..bec214c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_788010() {
+ var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_788010();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..daf38ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+ int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_788010();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_788010();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_788010();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..daf38ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+ int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_788010();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_788010();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_788010();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl
new file mode 100644
index 0000000..9f39bc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_788010();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_788010();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_788010();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl
new file mode 100644
index 0000000..92a80cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_788010(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_788010(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_788010(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_788010(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm
new file mode 100644
index 0000000..420fdeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_788010 "textureGather_788010"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_788010 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %27 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+ %20 = OpImageGather %v4int %25 %30 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureGather_788010
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_788010
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_788010
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl
new file mode 100644
index 0000000..1dbb53f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_788010() {
+ var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_788010();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl
new file mode 100644
index 0000000..6943197
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_7dd226() {
+ var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_7dd226();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30437f7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+ float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_7dd226();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_7dd226();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30437f7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+ float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_7dd226();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_7dd226();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl
new file mode 100644
index 0000000..4d3f177
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+vec4 vertex_main() {
+ textureGather_7dd226();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void compute_main() {
+ textureGather_7dd226();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl
new file mode 100644
index 0000000..76771fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_7dd226(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_7dd226(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_7dd226(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_7dd226(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm
new file mode 100644
index 0000000..fe15256
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_7dd226 "textureGather_7dd226"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_7dd226 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageGather %v4float %23 %28 %int_0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_7dd226
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_7dd226
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_7dd226
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl
new file mode 100644
index 0000000..d112afc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_7dd226() {
+ var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_7dd226();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl
new file mode 100644
index 0000000..154c598
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_829357() {
+ var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_829357();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9d3114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+ float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_829357();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_829357();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_829357();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f9d3114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+ float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_829357();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_829357();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_829357();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl
new file mode 100644
index 0000000..083b9ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_829357();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_829357();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_829357();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl
new file mode 100644
index 0000000..d71c6ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_829357(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_829357(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_829357(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_829357(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm
new file mode 100644
index 0000000..0a4125b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_829357 "textureGather_829357"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_829357 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageGather %v4float %23 %28 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureGather_829357
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_829357
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_829357
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl
new file mode 100644
index 0000000..475719e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_829357() {
+ var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_829357();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl
new file mode 100644
index 0000000..75f0ea3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_8578bc() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8578bc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d08469
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+ float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8578bc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8578bc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3d08469
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+ float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8578bc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8578bc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl
new file mode 100644
index 0000000..ba57a13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_8578bc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_8578bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl
new file mode 100644
index 0000000..d54ba7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8578bc(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_8578bc(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_8578bc(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_8578bc(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..9eb633a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_8578bc "textureGather_8578bc"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_8578bc = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageGather %v4float %23 %28 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureGather_8578bc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_8578bc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_8578bc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..d43d26b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8578bc() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8578bc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl
new file mode 100644
index 0000000..8455ece
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
+fn textureGather_89680f() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_89680f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..752cd0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_89680f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_89680f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_89680f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..752cd0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_89680f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_89680f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_89680f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl
new file mode 100644
index 0000000..bccb5d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_89680f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_89680f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_89680f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl
new file mode 100644
index 0000000..c7d2c10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_89680f(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_89680f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_89680f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_89680f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c208ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_89680f "textureGather_89680f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %27 = OpConstantNull %v3float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %31 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_89680f = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %31
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4uint %25 %27 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureGather_89680f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_89680f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_89680f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl
new file mode 100644
index 0000000..aeffaac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_89680f() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_89680f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl
new file mode 100644
index 0000000..b30fcdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
+fn textureGather_8fae00() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8fae00();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f973d36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8fae00();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8fae00();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f973d36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8fae00();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8fae00();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl
new file mode 100644
index 0000000..4b9c91a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_8fae00();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_8fae00();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl
new file mode 100644
index 0000000..c1ea9fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8fae00(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_8fae00(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_8fae00(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_8fae00(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm
new file mode 100644
index 0000000..40ae1c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_8fae00 "textureGather_8fae00"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %27 = OpConstantNull %v2float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %31 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_8fae00 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %31
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4uint %25 %27 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureGather_8fae00
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_8fae00
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_8fae00
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl
new file mode 100644
index 0000000..be62d13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8fae00() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8fae00();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl
new file mode 100644
index 0000000..3d12e54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_986700() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_986700();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..33d49eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_986700();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_986700();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_986700();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..33d49eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+ uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_986700();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_986700();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_986700();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl
new file mode 100644
index 0000000..4930539
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_986700();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_986700();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_986700();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl
new file mode 100644
index 0000000..27a6430
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_986700(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_986700(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_986700(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm
new file mode 100644
index 0000000..06737d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_986700 "textureGather_986700"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %27 = OpConstantNull %v2float
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %31 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_986700 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4uint %25 %27 %uint_1 ConstOffset %31
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_986700
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_986700
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_986700
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl
new file mode 100644
index 0000000..ebf125e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_986700() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_986700();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl
new file mode 100644
index 0000000..4eca3a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_a0372b() {
+ var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a0372b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aac3174
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a0372b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a0372b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aac3174
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a0372b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a0372b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl
new file mode 100644
index 0000000..4d3163e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_a0372b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_a0372b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl
new file mode 100644
index 0000000..2e34b90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a0372b(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_a0372b(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_a0372b(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_a0372b(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm
new file mode 100644
index 0000000..67068b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_a0372b "textureGather_a0372b"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %33 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_a0372b = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %33
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4uint %25 %30 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureGather_a0372b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_a0372b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_a0372b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4702b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_a0372b() {
+ var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a0372b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl
new file mode 100644
index 0000000..a3bbec3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_a68027() {
+ var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a68027();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b8b6990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+ float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a68027();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a68027();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a68027();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b8b6990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+ float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a68027();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a68027();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a68027();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl
new file mode 100644
index 0000000..305ef61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureGather_a68027();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+void fragment_main() {
+ textureGather_a68027();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+void compute_main() {
+ textureGather_a68027();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl
new file mode 100644
index 0000000..ef44bea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_a68027(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_a68027(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_a68027(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm
new file mode 100644
index 0000000..6e66662
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_a68027 "textureGather_a68027"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_a68027 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %33
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGather_a68027
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_a68027
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_a68027
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl
new file mode 100644
index 0000000..433101d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_a68027() {
+ var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a68027();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl
new file mode 100644
index 0000000..d2e5f2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_bd33b6() {
+ var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_bd33b6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..243aa01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_bd33b6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_bd33b6();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..243aa01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_bd33b6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_bd33b6();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl
new file mode 100644
index 0000000..3b5c9e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_bd33b6();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_bd33b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl
new file mode 100644
index 0000000..85eb095
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_bd33b6(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_bd33b6(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_bd33b6(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3347b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_bd33b6 "textureGather_bd33b6"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %36 = OpConstantNull %v4int
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_bd33b6 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %36
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..1993fea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_bd33b6() {
+ var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_bd33b6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl
new file mode 100644
index 0000000..2928b32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_be276f() {
+ var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_be276f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1ce11f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+ uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_be276f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_be276f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_be276f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1ce11f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+ uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_be276f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_be276f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_be276f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl
new file mode 100644
index 0000000..025d258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_be276f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_be276f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_be276f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl
new file mode 100644
index 0000000..2102740
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_be276f(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_be276f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_be276f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_be276f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm
new file mode 100644
index 0000000..22b7575
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_be276f "textureGather_be276f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_be276f = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %32
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %27 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+ %20 = OpImageGather %v4uint %25 %29 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_be276f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_be276f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_be276f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c14626e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_be276f() {
+ var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_be276f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl
new file mode 100644
index 0000000..4c99b08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
+fn textureGather_ccadde() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ccadde();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6db0b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ccadde();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ccadde();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6db0b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ccadde();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ccadde();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl
new file mode 100644
index 0000000..442be7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ccadde();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_ccadde();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl
new file mode 100644
index 0000000..d72fea5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ccadde(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ccadde(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ccadde(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ccadde(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6cd6d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ccadde "textureGather_ccadde"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %27 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ccadde = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %32
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4int %25 %27 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_ccadde
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_ccadde
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_ccadde
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl
new file mode 100644
index 0000000..95235f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ccadde() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ccadde();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl
new file mode 100644
index 0000000..9ab7bfc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_ce5578() {
+ var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ce5578();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b6568c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ce5578();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ce5578();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b6568c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+ uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ce5578();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ce5578();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl
new file mode 100644
index 0000000..001c3b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ce5578();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_ce5578();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl
new file mode 100644
index 0000000..0429b24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ce5578(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ce5578(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ce5578(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm
new file mode 100644
index 0000000..367be56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ce5578 "textureGather_ce5578"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %36 = OpConstantNull %v4uint
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ce5578 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %36
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_ce5578
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_ce5578
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_ce5578
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl
new file mode 100644
index 0000000..f07251c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ce5578() {
+ var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ce5578();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl
new file mode 100644
index 0000000..8b24b97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_cf9112() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_cf9112();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eba887e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_cf9112();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_cf9112();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eba887e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+ int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_cf9112();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_cf9112();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl
new file mode 100644
index 0000000..914fe38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_cf9112();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_cf9112();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl
new file mode 100644
index 0000000..6692ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_cf9112(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_cf9112(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_cf9112(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm
new file mode 100644
index 0000000..6c310ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_cf9112 "textureGather_cf9112"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %36 = OpConstantNull %v4int
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_cf9112 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %36
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %28 = OpConvertUToF %float %uint_1
+ %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+ %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_cf9112
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_cf9112
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_cf9112
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl
new file mode 100644
index 0000000..2bae0ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_cf9112() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_cf9112();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl
new file mode 100644
index 0000000..8ba6169
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_d6507c() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d6507c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5cff95a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d6507c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d6507c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5cff95a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d6507c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d6507c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl
new file mode 100644
index 0000000..784e65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_d6507c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_d6507c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl
new file mode 100644
index 0000000..09b4070
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_d6507c(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_d6507c(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_d6507c(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm
new file mode 100644
index 0000000..04e9724
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_d6507c "textureGather_d6507c"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %25 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %30 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_d6507c = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %19 = OpImageGather %v4float %23 %25 %uint_1 ConstOffset %30
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_d6507c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_d6507c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_d6507c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl
new file mode 100644
index 0000000..b30e7d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d6507c() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d6507c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl
new file mode 100644
index 0000000..ab46f58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_d8e958() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d8e958();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eebba11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d8e958();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d8e958();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eebba11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+ float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d8e958();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d8e958();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl
new file mode 100644
index 0000000..ce1520f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_d8e958();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+ textureGather_d8e958();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl
new file mode 100644
index 0000000..0f6d277
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d8e958(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_d8e958(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_d8e958(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_d8e958(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm
new file mode 100644
index 0000000..accc34f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_d8e958 "textureGather_d8e958"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %25 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_d8e958 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %19 = OpImageGather %v4float %23 %25 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureGather_d8e958
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_d8e958
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_d8e958
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbc0a35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d8e958() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d8e958();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl
new file mode 100644
index 0000000..8d8fe8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_dc6661() {
+ var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_dc6661();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a1ecb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_dc6661();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_dc6661();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a1ecb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+ int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_dc6661();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_dc6661();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl
new file mode 100644
index 0000000..1241fbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_dc6661();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_dc6661();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl
new file mode 100644
index 0000000..a998cf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_dc6661(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_dc6661(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_dc6661(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm
new file mode 100644
index 0000000..a090bed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_dc6661 "textureGather_dc6661"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %24 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %27 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2int = OpTypeVector %int 2
+ %31 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_dc6661 = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %20 = OpImageGather %v4int %25 %27 %uint_1 ConstOffset %31
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_dc6661
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_dc6661
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_dc6661
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl
new file mode 100644
index 0000000..607129c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_dc6661() {
+ var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_dc6661();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl
new file mode 100644
index 0000000..d0167f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_e2acac() {
+ var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_e2acac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a3337ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+ uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_e2acac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_e2acac();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a3337ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+ uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_e2acac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_e2acac();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl
new file mode 100644
index 0000000..40eaec4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_e2acac();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_e2acac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl
new file mode 100644
index 0000000..23a18ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_e2acac(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_e2acac(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_e2acac(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_e2acac(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm
new file mode 100644
index 0000000..31bb98c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_e2acac "textureGather_e2acac"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_e2acac = OpFunction %void None %16
+ %19 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %32
+ %22 = OpLoad %15 %arg_2
+ %23 = OpLoad %11 %arg_1
+ %25 = OpSampledImage %24 %23 %22
+ %27 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+ %20 = OpImageGather %v4uint %25 %29 %uint_1
+ OpStore %res %20
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_e2acac
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_e2acac
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_e2acac
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl
new file mode 100644
index 0000000..f1b2b9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_e2acac() {
+ var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_e2acac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl
new file mode 100644
index 0000000..66b6aca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_ea8eb4() {
+ var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ea8eb4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e69b66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ea8eb4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ea8eb4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e69b66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+ float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ea8eb4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ea8eb4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl
new file mode 100644
index 0000000..4c080b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ea8eb4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+ textureGather_ea8eb4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl
new file mode 100644
index 0000000..258c198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ea8eb4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ea8eb4(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ea8eb4(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ea8eb4(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm
new file mode 100644
index 0000000..e7c0ab1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ea8eb4 "textureGather_ea8eb4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ea8eb4 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_2
+ %21 = OpLoad %11 %arg_1
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageGather %v4float %23 %29 %uint_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl
new file mode 100644
index 0000000..238176e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ea8eb4() {
+ var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ea8eb4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl
new file mode 100644
index 0000000..23d232d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_144a9a() {
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_144a9a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59db391
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+ float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_144a9a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59db391
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+ float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_144a9a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl
new file mode 100644
index 0000000..8c6787a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_144a9a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void compute_main() {
+ textureGatherCompare_144a9a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl
new file mode 100644
index 0000000..0d772d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_144a9a(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_144a9a(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_144a9a(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..b80ccb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_144a9a "textureGatherCompare_144a9a"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpTypeFunction %v4float
+%textureGatherCompare_144a9a = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %33
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..3645762
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_144a9a() {
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_144a9a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl
new file mode 100644
index 0000000..256e202
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_2e409c() {
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_2e409c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a218553
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+ float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_2e409c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a218553
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+ float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_2e409c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl
new file mode 100644
index 0000000..c7efa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_2e409c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+ textureGatherCompare_2e409c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl
new file mode 100644
index 0000000..30ff99a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_2e409c(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_2e409c(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_2e409c(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_2e409c(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9c8dc27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_2e409c "textureGatherCompare_2e409c"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %32 = OpTypeFunction %v4float
+%textureGatherCompare_2e409c = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageDrefGather %v4float %23 %28 %float_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl
new file mode 100644
index 0000000..f45cdf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_2e409c() {
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_2e409c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl
new file mode 100644
index 0000000..d75e00e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_b5bc43() {
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_b5bc43();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a9dd99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+ float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_b5bc43();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a9dd99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+ float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_b5bc43();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl
new file mode 100644
index 0000000..8860940
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_b5bc43();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+ textureGatherCompare_b5bc43();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl
new file mode 100644
index 0000000..e9cc2f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_b5bc43(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_b5bc43(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_b5bc43(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_b5bc43(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm
new file mode 100644
index 0000000..dde1b1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_b5bc43 "textureGatherCompare_b5bc43"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+%textureGatherCompare_b5bc43 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageDrefGather %v4float %23 %29 %float_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl
new file mode 100644
index 0000000..651c709
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_b5bc43() {
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_b5bc43();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl
new file mode 100644
index 0000000..3c8c90a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureLoad(texture: texture_1d<i32>, coords: u32, level: u32) -> vec4<i32>
+fn textureLoad_0cb698() {
+ var res: vec4<i32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_0cb698();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e4c470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+ int4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_0cb698();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_0cb698();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e4c470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+ int4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_0cb698();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_0cb698();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl
new file mode 100644
index 0000000..62fc8ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_0cb698();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+ textureLoad_0cb698();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl
new file mode 100644
index 0000000..ca1ce7f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0cb698(texture1d<int, access::sample> tint_symbol_1) {
+ int4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+ textureLoad_0cb698(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_0cb698(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_0cb698(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm
new file mode 100644
index 0000000..ee178e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_0cb698 "textureLoad_0cb698"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %24 = OpConstantNull %v4int
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_0cb698 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %24
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4int %19 %uint_1 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl
new file mode 100644
index 0000000..50dea1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureLoad_0cb698() {
+ var res : vec4<i32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_0cb698();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl
new file mode 100644
index 0000000..224ae8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1bfdfb() {
+ var res: vec4<f32> = textureLoad(arg_0, vec2<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1bfdfb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..76c37ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,111 @@
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+ uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ const bool3 cond = (abs(v) < float3((params.D).xxx));
+ const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+ return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = float3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = plane0.Load(uint3(coord, 0u)).rgb;
+ } else {
+ color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = mul(color, params.gamutConversionMatrix);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+ const uint scalar_offset = ((offset + 0u)) / 4;
+ const uint scalar_offset_1 = ((offset + 16u)) / 4;
+ const uint scalar_offset_2 = ((offset + 32u)) / 4;
+ return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_3 = ((offset + 0u)) / 4;
+ const uint scalar_offset_4 = ((offset + 4u)) / 4;
+ const uint scalar_offset_5 = ((offset + 8u)) / 4;
+ const uint scalar_offset_6 = ((offset + 12u)) / 4;
+ const uint scalar_offset_7 = ((offset + 16u)) / 4;
+ const uint scalar_offset_8 = ((offset + 20u)) / 4;
+ const uint scalar_offset_9 = ((offset + 24u)) / 4;
+ const uint scalar_offset_10 = ((offset + 28u)) / 4;
+ const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_11 = ((offset + 0u)) / 4;
+ const uint scalar_offset_12 = ((offset + 16u)) / 4;
+ const uint scalar_offset_13 = ((offset + 32u)) / 4;
+ return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_14 = ((offset + 0u)) / 4;
+ const uint scalar_offset_15 = ((offset + 4u)) / 4;
+ const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+ return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1bfdfb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1bfdfb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..76c37ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,111 @@
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+ uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ const bool3 cond = (abs(v) < float3((params.D).xxx));
+ const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+ return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = float3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = plane0.Load(uint3(coord, 0u)).rgb;
+ } else {
+ color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = mul(color, params.gamutConversionMatrix);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+ const uint scalar_offset = ((offset + 0u)) / 4;
+ const uint scalar_offset_1 = ((offset + 16u)) / 4;
+ const uint scalar_offset_2 = ((offset + 32u)) / 4;
+ return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_3 = ((offset + 0u)) / 4;
+ const uint scalar_offset_4 = ((offset + 4u)) / 4;
+ const uint scalar_offset_5 = ((offset + 8u)) / 4;
+ const uint scalar_offset_6 = ((offset + 12u)) / 4;
+ const uint scalar_offset_7 = ((offset + 16u)) / 4;
+ const uint scalar_offset_8 = ((offset + 20u)) / 4;
+ const uint scalar_offset_9 = ((offset + 24u)) / 4;
+ const uint scalar_offset_10 = ((offset + 28u)) / 4;
+ const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_11 = ((offset + 0u)) / 4;
+ const uint scalar_offset_12 = ((offset + 16u)) / 4;
+ const uint scalar_offset_13 = ((offset + 32u)) / 4;
+ return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_14 = ((offset + 0u)) / 4;
+ const uint scalar_offset_15 = ((offset + 4u)) / 4;
+ const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+ return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1bfdfb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1bfdfb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
new file mode 100644
index 0000000..214f868
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -0,0 +1,193 @@
+#version 310 es
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+vec4 vertex_main() {
+ textureLoad_1bfdfb();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+void compute_main() {
+ textureLoad_1bfdfb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl
new file mode 100644
index 0000000..81c3daa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl
@@ -0,0 +1,89 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
+
+struct GammaTransferParams {
+ /* 0x0000 */ float G;
+ /* 0x0004 */ float A;
+ /* 0x0008 */ float B;
+ /* 0x000c */ float C;
+ /* 0x0010 */ float D;
+ /* 0x0014 */ float E;
+ /* 0x0018 */ float F;
+ /* 0x001c */ uint padding;
+};
+
+struct ExternalTextureParams {
+ /* 0x0000 */ uint numPlanes;
+ /* 0x0004 */ uint doYuvToRgbConversionOnly;
+ /* 0x0008 */ tint_array<int8_t, 8> tint_pad;
+ /* 0x0010 */ float3x4 yuvToRgbConversionMatrix;
+ /* 0x0040 */ GammaTransferParams gammaDecodeParams;
+ /* 0x0060 */ GammaTransferParams gammaEncodeParams;
+ /* 0x0080 */ float3x3 gamutConversionMatrix;
+};
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ bool3 const cond = (fabs(v) < float3(params.D));
+ float3 const t = (sign(v) * ((params.C * fabs(v)) + params.F));
+ float3 const f = (sign(v) * (pow(((params.A * fabs(v)) + params.B), float3(params.G)) + params.E));
+ return select(f, t, cond);
+}
+
+float4 textureLoadExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ color = float4(plane0.read(uint2(coord), 0u)).rgb;
+ } else {
+ color = (float4(plane0.read(uint2(coord), 0u)[0], float4(plane1.read(uint2(coord), 0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+void textureLoad_1bfdfb(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) {
+ float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(0u), *(tint_symbol_3));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_4, texture2d<float, access::sample> tint_symbol_5, const constant ExternalTextureParams* const tint_symbol_6) {
+ textureLoad_1bfdfb(tint_symbol_4, tint_symbol_5, tint_symbol_6);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], texture2d<float, access::sample> tint_symbol_8 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_9 [[buffer(2)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_10 [[texture(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_12 [[buffer(2)]]) {
+ textureLoad_1bfdfb(tint_symbol_10, tint_symbol_11, tint_symbol_12);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_13 [[texture(0)]], texture2d<float, access::sample> tint_symbol_14 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_15 [[buffer(2)]]) {
+ textureLoad_1bfdfb(tint_symbol_13, tint_symbol_14, tint_symbol_15);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
new file mode 100644
index 0000000..60ee453
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -0,0 +1,243 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 136
+; Schema: 0
+ OpCapability Shader
+ %28 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %ext_tex_plane_1 "ext_tex_plane_1"
+ OpName %ext_tex_params_block "ext_tex_params_block"
+ OpMemberName %ext_tex_params_block 0 "inner"
+ OpName %ExternalTextureParams "ExternalTextureParams"
+ OpMemberName %ExternalTextureParams 0 "numPlanes"
+ OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
+ OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
+ OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
+ OpName %GammaTransferParams "GammaTransferParams"
+ OpMemberName %GammaTransferParams 0 "G"
+ OpMemberName %GammaTransferParams 1 "A"
+ OpMemberName %GammaTransferParams 2 "B"
+ OpMemberName %GammaTransferParams 3 "C"
+ OpMemberName %GammaTransferParams 4 "D"
+ OpMemberName %GammaTransferParams 5 "E"
+ OpMemberName %GammaTransferParams 6 "F"
+ OpMemberName %GammaTransferParams 7 "padding"
+ OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
+ OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
+ OpName %ext_tex_params "ext_tex_params"
+ OpName %arg_0 "arg_0"
+ OpName %gammaCorrection "gammaCorrection"
+ OpName %v "v"
+ OpName %params "params"
+ OpName %textureLoadExternal "textureLoadExternal"
+ OpName %plane0 "plane0"
+ OpName %plane1 "plane1"
+ OpName %coord "coord"
+ OpName %params_0 "params"
+ OpName %color "color"
+ OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %ext_tex_plane_1 DescriptorSet 1
+ OpDecorate %ext_tex_plane_1 Binding 1
+ OpDecorate %ext_tex_params_block Block
+ OpMemberDecorate %ext_tex_params_block 0 Offset 0
+ OpMemberDecorate %ExternalTextureParams 0 Offset 0
+ OpMemberDecorate %ExternalTextureParams 1 Offset 4
+ OpMemberDecorate %ExternalTextureParams 2 Offset 16
+ OpMemberDecorate %ExternalTextureParams 2 ColMajor
+ OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
+ OpMemberDecorate %ExternalTextureParams 3 Offset 64
+ OpMemberDecorate %GammaTransferParams 0 Offset 0
+ OpMemberDecorate %GammaTransferParams 1 Offset 4
+ OpMemberDecorate %GammaTransferParams 2 Offset 8
+ OpMemberDecorate %GammaTransferParams 3 Offset 12
+ OpMemberDecorate %GammaTransferParams 4 Offset 16
+ OpMemberDecorate %GammaTransferParams 5 Offset 20
+ OpMemberDecorate %GammaTransferParams 6 Offset 24
+ OpMemberDecorate %GammaTransferParams 7 Offset 28
+ OpMemberDecorate %ExternalTextureParams 4 Offset 96
+ OpMemberDecorate %ExternalTextureParams 5 Offset 128
+ OpMemberDecorate %ExternalTextureParams 5 ColMajor
+ OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
+ OpDecorate %ext_tex_params NonWritable
+ OpDecorate %ext_tex_params DescriptorSet 1
+ OpDecorate %ext_tex_params Binding 2
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %uint = OpTypeInt 32 0
+%mat3v4float = OpTypeMatrix %v4float 3
+%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
+ %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
+%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
+%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
+%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %22 = OpTypeFunction %v3float %v3float %GammaTransferParams
+ %bool = OpTypeBool
+ %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %42 = OpConstantNull %v3float
+ %v2uint = OpTypeVector %uint 2
+ %62 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
+ %uint_1 = OpConstant %uint 1
+ %78 = OpConstantNull %uint
+ %v2float = OpTypeVector %float 2
+ %float_1 = OpConstant %float 1
+ %void = OpTypeVoid
+ %109 = OpTypeFunction %void
+ %116 = OpConstantNull %v2uint
+ %uint_0 = OpConstant %uint 0
+%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %123 = OpTypeFunction %v4float
+%gammaCorrection = OpFunction %v3float None %22
+ %v = OpFunctionParameter %v3float
+ %params = OpFunctionParameter %GammaTransferParams
+ %26 = OpLabel
+ %40 = OpVariable %_ptr_Function_v3float Function %42
+ %52 = OpVariable %_ptr_Function_v3float Function %42
+ %58 = OpVariable %_ptr_Function_v3float Function %42
+ %27 = OpExtInst %v3float %28 FAbs %v
+ %29 = OpCompositeExtract %float %params 4
+ %30 = OpCompositeConstruct %v3float %29 %29 %29
+ %31 = OpFOrdLessThan %v3bool %27 %30
+ %34 = OpExtInst %v3float %28 FSign %v
+ %35 = OpCompositeExtract %float %params 3
+ %36 = OpExtInst %v3float %28 FAbs %v
+ %37 = OpVectorTimesScalar %v3float %36 %35
+ %38 = OpCompositeExtract %float %params 6
+ %43 = OpCompositeConstruct %v3float %38 %38 %38
+ %39 = OpFAdd %v3float %37 %43
+ %44 = OpFMul %v3float %34 %39
+ %45 = OpExtInst %v3float %28 FSign %v
+ %47 = OpCompositeExtract %float %params 1
+ %48 = OpExtInst %v3float %28 FAbs %v
+ %49 = OpVectorTimesScalar %v3float %48 %47
+ %50 = OpCompositeExtract %float %params 2
+ %53 = OpCompositeConstruct %v3float %50 %50 %50
+ %51 = OpFAdd %v3float %49 %53
+ %54 = OpCompositeExtract %float %params 0
+ %55 = OpCompositeConstruct %v3float %54 %54 %54
+ %46 = OpExtInst %v3float %28 Pow %51 %55
+ %56 = OpCompositeExtract %float %params 5
+ %59 = OpCompositeConstruct %v3float %56 %56 %56
+ %57 = OpFAdd %v3float %46 %59
+ %60 = OpFMul %v3float %45 %57
+ %61 = OpSelect %v3float %31 %44 %60
+ OpReturnValue %61
+ OpFunctionEnd
+%textureLoadExternal = OpFunction %v4float None %62
+ %plane0 = OpFunctionParameter %11
+ %plane1 = OpFunctionParameter %11
+ %coord = OpFunctionParameter %v2uint
+ %params_0 = OpFunctionParameter %ExternalTextureParams
+ %69 = OpLabel
+ %color = OpVariable %_ptr_Function_v3float Function %42
+ %71 = OpCompositeExtract %uint %params_0 0
+ %73 = OpIEqual %bool %71 %uint_1
+ OpSelectionMerge %74 None
+ OpBranchConditional %73 %75 %76
+ %75 = OpLabel
+ %77 = OpImageFetch %v4float %plane0 %coord Lod %78
+ %79 = OpVectorShuffle %v3float %77 %77 0 1 2
+ OpStore %color %79
+ OpBranch %74
+ %76 = OpLabel
+ %80 = OpImageFetch %v4float %plane0 %coord Lod %78
+ %81 = OpCompositeExtract %float %80 0
+ %82 = OpImageFetch %v4float %plane1 %coord Lod %78
+ %84 = OpVectorShuffle %v2float %82 %82 0 1
+ %85 = OpCompositeExtract %float %84 0
+ %86 = OpCompositeExtract %float %84 1
+ %88 = OpCompositeConstruct %v4float %81 %85 %86 %float_1
+ %89 = OpCompositeExtract %mat3v4float %params_0 2
+ %90 = OpVectorTimesMatrix %v3float %88 %89
+ OpStore %color %90
+ OpBranch %74
+ %74 = OpLabel
+ %91 = OpCompositeExtract %uint %params_0 1
+ %92 = OpIEqual %bool %91 %78
+ OpSelectionMerge %93 None
+ OpBranchConditional %92 %94 %93
+ %94 = OpLabel
+ %96 = OpLoad %v3float %color
+ %97 = OpCompositeExtract %GammaTransferParams %params_0 3
+ %95 = OpFunctionCall %v3float %gammaCorrection %96 %97
+ OpStore %color %95
+ %98 = OpCompositeExtract %mat3v3float %params_0 5
+ %99 = OpLoad %v3float %color
+ %100 = OpMatrixTimesVector %v3float %98 %99
+ OpStore %color %100
+ %102 = OpLoad %v3float %color
+ %103 = OpCompositeExtract %GammaTransferParams %params_0 4
+ %101 = OpFunctionCall %v3float %gammaCorrection %102 %103
+ OpStore %color %101
+ OpBranch %93
+ %93 = OpLabel
+ %104 = OpLoad %v3float %color
+ %105 = OpCompositeExtract %float %104 0
+ %106 = OpCompositeExtract %float %104 1
+ %107 = OpCompositeExtract %float %104 2
+ %108 = OpCompositeConstruct %v4float %105 %106 %107 %float_1
+ OpReturnValue %108
+ OpFunctionEnd
+%textureLoad_1bfdfb = OpFunction %void None %109
+ %112 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %114 = OpLoad %11 %arg_0
+ %115 = OpLoad %11 %ext_tex_plane_1
+ %119 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %120 = OpLoad %ExternalTextureParams %119
+ %113 = OpFunctionCall %v4float %textureLoadExternal %114 %115 %116 %120
+ OpStore %res %113
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %123
+ %125 = OpLabel
+ %126 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %109
+ %128 = OpLabel
+ %129 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %129
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %109
+ %131 = OpLabel
+ %132 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %109
+ %134 = OpLabel
+ %135 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl
new file mode 100644
index 0000000..a67b2bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_external;
+
+fn textureLoad_1bfdfb() {
+ var res : vec4<f32> = textureLoad(arg_0, vec2<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1bfdfb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl
new file mode 100644
index 0000000..147ef2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32>
+fn textureLoad_1c562a() {
+ var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1c562a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69fa517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+ uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1c562a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1c562a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69fa517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+ uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1c562a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1c562a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl
new file mode 100644
index 0000000..5d0ca1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_1c562a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_1c562a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl
new file mode 100644
index 0000000..08ec833
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) {
+ uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+ textureLoad_1c562a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_1c562a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_1c562a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm
new file mode 100644
index 0000000..3aab4ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_1c562a "textureLoad_1c562a"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %25 = OpConstantNull %v4uint
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_1c562a = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %25
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a62fc0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureLoad_1c562a() {
+ var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1c562a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl
new file mode 100644
index 0000000..ac39ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32>
+fn textureLoad_21d1c4() {
+ var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_21d1c4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..04e91b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+ float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_21d1c4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_21d1c4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04e91b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+ float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_21d1c4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_21d1c4();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl
new file mode 100644
index 0000000..6d8e740
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_21d1c4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_21d1c4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl
new file mode 100644
index 0000000..a18d7cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) {
+ float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+ textureLoad_21d1c4(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_21d1c4(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_21d1c4(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm
new file mode 100644
index 0000000..ca20303
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_21d1c4 "textureLoad_21d1c4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_21d1c4 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %17 = OpLoad %11 %arg_0
+ %16 = OpImageFetch %v4float %17 %20 Lod %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl
new file mode 100644
index 0000000..2cfba76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureLoad_21d1c4() {
+ var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_21d1c4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl
new file mode 100644
index 0000000..c202f48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: u32) -> vec4<f32>
+fn textureLoad_2e09aa() {
+ var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_2e09aa();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9cc10ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+ float4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_2e09aa();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_2e09aa();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9cc10ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+ float4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_2e09aa();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_2e09aa();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl
new file mode 100644
index 0000000..1fc3bfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_2e09aa();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_2e09aa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl
new file mode 100644
index 0000000..48b5ac4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) {
+ float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+ textureLoad_2e09aa(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_2e09aa(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_2e09aa(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..1964e30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_2e09aa "textureLoad_2e09aa"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_2e09aa = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %17 = OpLoad %11 %arg_0
+ %16 = OpImageFetch %v4float %17 %20 Sample %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca4270f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
+
+fn textureLoad_2e09aa() {
+ var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_2e09aa();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl
new file mode 100644
index 0000000..76e9718
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32>
+fn textureLoad_47e818() {
+ var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_47e818();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0f9ce2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+ int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_47e818();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_47e818();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a0f9ce2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+ int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_47e818();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_47e818();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl
new file mode 100644
index 0000000..78f7a1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_47e818();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_47e818();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl
new file mode 100644
index 0000000..91e3739
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) {
+ int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+ textureLoad_47e818(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_47e818(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_47e818(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm
new file mode 100644
index 0000000..fbb4de7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_47e818 "textureLoad_47e818"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %22 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %26 = OpConstantNull %v4int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_47e818 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %26
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4int %19 %22 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureLoad_47e818
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_47e818
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_47e818
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl
new file mode 100644
index 0000000..3f95949
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureLoad_47e818() {
+ var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_47e818();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl
new file mode 100644
index 0000000..d4e1195
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: u32) -> vec4<u32>
+fn textureLoad_49f76f() {
+ var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_49f76f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6152f02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+ uint4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_49f76f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_49f76f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6152f02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+ uint4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_49f76f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_49f76f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl
new file mode 100644
index 0000000..4f67942
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_49f76f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_49f76f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl
new file mode 100644
index 0000000..cae2ed1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) {
+ uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+ textureLoad_49f76f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_49f76f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_49f76f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm
new file mode 100644
index 0000000..12cfa42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_49f76f "textureLoad_49f76f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %25 = OpConstantNull %v4uint
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_49f76f = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %25
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4uint %19 %21 Sample %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl
new file mode 100644
index 0000000..b1ad019
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
+
+fn textureLoad_49f76f() {
+ var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_49f76f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl
new file mode 100644
index 0000000..3418786
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: u32) -> f32
+fn textureLoad_4db25c() {
+ var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_4db25c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..13ff0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+ float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_4db25c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_4db25c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13ff0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+ float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_4db25c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_4db25c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl
new file mode 100644
index 0000000..ddef4d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_4db25c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void compute_main() {
+ textureLoad_4db25c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl
new file mode 100644
index 0000000..28efe98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) {
+ float res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+ textureLoad_4db25c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_4db25c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_4db25c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm
new file mode 100644
index 0000000..27c7101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_4db25c "textureLoad_4db25c"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_4db25c = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %18 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4float %18 %21 Sample %uint_1
+ %16 = OpCompositeExtract %float %17 0
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl
new file mode 100644
index 0000000..467f37a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
+
+fn textureLoad_4db25c() {
+ var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_4db25c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl
new file mode 100644
index 0000000..9311705
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: u32) -> vec4<i32>
+fn textureLoad_639962() {
+ var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_639962();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..42bb7f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+ int4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_639962();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_639962();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_639962();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..42bb7f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+ int4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_639962();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_639962();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_639962();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl
new file mode 100644
index 0000000..40ede06
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_639962();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_639962();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_639962();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl
new file mode 100644
index 0000000..c0022d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) {
+ int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+ textureLoad_639962(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_639962(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_639962(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c8ccab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_639962 "textureLoad_639962"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %22 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %26 = OpConstantNull %v4int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_639962 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %26
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4int %19 %22 Sample %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureLoad_639962
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_639962
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_639962
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl
new file mode 100644
index 0000000..f7aa89a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
+
+fn textureLoad_639962() {
+ var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_639962();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl
new file mode 100644
index 0000000..849bb5a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureLoad(texture: texture_1d<f32>, coords: u32, level: u32) -> vec4<f32>
+fn textureLoad_6d376a() {
+ var res: vec4<f32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_6d376a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..51583e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+ float4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_6d376a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_6d376a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..51583e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+ float4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_6d376a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_6d376a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl
new file mode 100644
index 0000000..c4a6d4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_6d376a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+ textureLoad_6d376a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl
new file mode 100644
index 0000000..c5370ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6d376a(texture1d<float, access::sample> tint_symbol_1) {
+ float4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+ textureLoad_6d376a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_6d376a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_6d376a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm
new file mode 100644
index 0000000..c627641
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_6d376a "textureLoad_6d376a"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_6d376a = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %17 = OpLoad %11 %arg_0
+ %16 = OpImageFetch %v4float %17 %uint_1 Lod %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl
new file mode 100644
index 0000000..498f136
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureLoad_6d376a() {
+ var res : vec4<f32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_6d376a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl
new file mode 100644
index 0000000..784ea18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32>
+fn textureLoad_714471() {
+ var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_714471();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c201b76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+ int4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_714471();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_714471();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_714471();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c201b76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+ int4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_714471();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_714471();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_714471();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl
new file mode 100644
index 0000000..16a781c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_714471();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_714471();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_714471();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl
new file mode 100644
index 0000000..dfe204f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) {
+ int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+ textureLoad_714471(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_714471(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_714471(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm
new file mode 100644
index 0000000..845ee95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_714471 "textureLoad_714471"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %22 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %26 = OpConstantNull %v4int
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_714471 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %26
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4int %19 %22 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureLoad_714471
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_714471
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_714471
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl
new file mode 100644
index 0000000..b6f83de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureLoad_714471() {
+ var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_714471();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl
new file mode 100644
index 0000000..0c629f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: u32) -> f32
+fn textureLoad_7b63e0() {
+ var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_7b63e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fd429fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+ float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_7b63e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_7b63e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fd429fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+ float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_7b63e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_7b63e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl
new file mode 100644
index 0000000..9e3335b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_7b63e0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+void compute_main() {
+ textureLoad_7b63e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl
new file mode 100644
index 0000000..16c3883
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) {
+ float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+ textureLoad_7b63e0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_7b63e0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_7b63e0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..7619398
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_7b63e0 "textureLoad_7b63e0"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_7b63e0 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %18 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4float %18 %23 Lod %uint_1
+ %16 = OpCompositeExtract %float %17 0
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..9f9e633
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureLoad_7b63e0() {
+ var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_7b63e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl
new file mode 100644
index 0000000..8a57894
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32>
+fn textureLoad_84dee1() {
+ var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_84dee1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..44ec101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+ float4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_84dee1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_84dee1();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..44ec101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+ float4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_84dee1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_84dee1();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl
new file mode 100644
index 0000000..61255d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_84dee1();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_84dee1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl
new file mode 100644
index 0000000..f487844
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) {
+ float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+ textureLoad_84dee1(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_84dee1(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_84dee1(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm
new file mode 100644
index 0000000..06cffb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_84dee1 "textureLoad_84dee1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_84dee1 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %17 = OpLoad %11 %arg_0
+ %16 = OpImageFetch %v4float %17 %20 Lod %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl
new file mode 100644
index 0000000..8c71828
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureLoad_84dee1() {
+ var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_84dee1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl
new file mode 100644
index 0000000..30e2321
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<u32>
+fn textureLoad_8527b1() {
+ var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_8527b1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..996ba2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+ uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_8527b1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_8527b1();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..996ba2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+ uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_8527b1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_8527b1();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl
new file mode 100644
index 0000000..d8b25ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_8527b1();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_8527b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl
new file mode 100644
index 0000000..925232e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) {
+ uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+ textureLoad_8527b1(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_8527b1(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_8527b1(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5774fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_8527b1 "textureLoad_8527b1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %26 = OpConstantNull %v4uint
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_8527b1 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %26
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c8f290
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureLoad_8527b1() {
+ var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_8527b1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl
new file mode 100644
index 0000000..1f056a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32>
+fn textureLoad_897cf3() {
+ var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_897cf3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c099bb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+ uint4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_897cf3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_897cf3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c099bb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+ uint4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_897cf3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_897cf3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl
new file mode 100644
index 0000000..e77f26b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_897cf3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_897cf3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl
new file mode 100644
index 0000000..dfbe3e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) {
+ uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+ textureLoad_897cf3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_897cf3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_897cf3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6fb44d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_897cf3 "textureLoad_897cf3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %25 = OpConstantNull %v4uint
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_897cf3 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %25
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl
new file mode 100644
index 0000000..4acf456
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureLoad_897cf3() {
+ var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_897cf3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl
new file mode 100644
index 0000000..2a5a5d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<f32>
+fn textureLoad_96efd5() {
+ var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_96efd5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..67c4f1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+ float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_96efd5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_96efd5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..67c4f1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+ float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_96efd5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_96efd5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl
new file mode 100644
index 0000000..f3f8f17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_96efd5();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_96efd5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl
new file mode 100644
index 0000000..3f9f55f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) {
+ float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+ textureLoad_96efd5(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_96efd5(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_96efd5(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e75371c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_96efd5 "textureLoad_96efd5"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_96efd5 = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %17 = OpLoad %11 %arg_0
+ %16 = OpImageFetch %v4float %17 %22 Lod %uint_1
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl
new file mode 100644
index 0000000..d6f1fec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureLoad_96efd5() {
+ var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_96efd5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl
new file mode 100644
index 0000000..7932e4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<i32>
+fn textureLoad_9885b0() {
+ var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9885b0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1362ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+ int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9885b0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9885b0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1362ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+ int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9885b0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9885b0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl
new file mode 100644
index 0000000..37d02a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_9885b0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+ textureLoad_9885b0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl
new file mode 100644
index 0000000..9962116
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) {
+ int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+ textureLoad_9885b0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_9885b0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_9885b0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..4f1bcb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_9885b0 "textureLoad_9885b0"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4int = OpTypeVector %int 4
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %27 = OpConstantNull %v4int
+ %28 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_9885b0 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4int Function %27
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4int %19 %24 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %34
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c52bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureLoad_9885b0() {
+ var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9885b0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl
new file mode 100644
index 0000000..d14a733
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32
+fn textureLoad_9ed19e() {
+ var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9ed19e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..589c875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+ float res = arg_0.Load(uint3(0u, 0u, 1u)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9ed19e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9ed19e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..589c875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+ float res = arg_0.Load(uint3(0u, 0u, 1u)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9ed19e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9ed19e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl
new file mode 100644
index 0000000..a973885
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_9ed19e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void compute_main() {
+ textureLoad_9ed19e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl
new file mode 100644
index 0000000..0e15d47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) {
+ float res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+ textureLoad_9ed19e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_9ed19e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_9ed19e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm
new file mode 100644
index 0000000..c4d6e10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_9ed19e "textureLoad_9ed19e"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_9ed19e = OpFunction %void None %12
+ %15 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %18 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4float %18 %21 Lod %uint_1
+ %16 = OpCompositeExtract %float %17 0
+ OpStore %res %16
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a4f6f1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureLoad_9ed19e() {
+ var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9ed19e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl
new file mode 100644
index 0000000..04234f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureLoad(texture: texture_1d<u32>, coords: u32, level: u32) -> vec4<u32>
+fn textureLoad_bc3201() {
+ var res: vec4<u32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_bc3201();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1da9ad5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+ uint4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_bc3201();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_bc3201();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1da9ad5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+ uint4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_bc3201();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_bc3201();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl
new file mode 100644
index 0000000..9ae41f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+ textureLoad_bc3201();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+ textureLoad_bc3201();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl
new file mode 100644
index 0000000..aaf9344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bc3201(texture1d<uint, access::sample> tint_symbol_1) {
+ uint4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+ textureLoad_bc3201(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_bc3201(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_bc3201(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm
new file mode 100644
index 0000000..e156f8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_bc3201 "textureLoad_bc3201"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v4uint = OpTypeVector %uint 4
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %23 = OpConstantNull %v4uint
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_bc3201 = OpFunction %void None %13
+ %16 = OpLabel
+ %res = OpVariable %_ptr_Function_v4uint Function %23
+ %19 = OpLoad %11 %arg_0
+ %17 = OpImageFetch %v4uint %19 %uint_1 Lod %uint_1
+ OpStore %res %17
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4de77b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureLoad_bc3201() {
+ var res : vec4<u32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_bc3201();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl
new file mode 100644
index 0000000..da6cdf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSample_193203() {
+ var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..187167c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+ float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+void fragment_main() {
+ textureSample_193203();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..187167c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+ float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+void fragment_main() {
+ textureSample_193203();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl
new file mode 100644
index 0000000..ef540d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_193203() {
+ vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0));
+}
+
+void fragment_main() {
+ textureSample_193203();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl
new file mode 100644
index 0000000..c558b32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_193203(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm
new file mode 100644
index 0000000..8804d99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm
@@ -0,0 +1,55 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_193203 "textureSample_193203"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %26 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpConstantNull %v4float
+%textureSample_193203 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %29
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %20 = OpConvertUToF %float %uint_1
+ %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+ %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %26
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureSample_193203
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl
new file mode 100644
index 0000000..3413bbc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_193203() {
+ var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl
new file mode 100644
index 0000000..852f2bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> f32
+fn textureSample_1a4e1b() {
+ var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c9c23a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+ float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4c9c23a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+ float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl
new file mode 100644
index 0000000..492bbc0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_1a4e1b() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f));
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl
new file mode 100644
index 0000000..efc575c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_1a4e1b(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_1a4e1b(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2da95e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_1a4e1b "textureSample_1a4e1b"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %17 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %27 = OpConstantNull %float
+%textureSample_1a4e1b = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %27
+ %15 = OpLoad %7 %arg_1
+ %16 = OpLoad %3 %arg_0
+ %18 = OpSampledImage %17 %16 %15
+ %21 = OpConvertUToF %float %uint_1
+ %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21
+ %13 = OpImageSampleImplicitLod %v4float %18 %24
+ %12 = OpCompositeExtract %float %13 0
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureSample_1a4e1b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7bc414e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_1a4e1b() {
+ var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl
new file mode 100644
index 0000000..3e7b95d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32
+fn textureSample_4703d0() {
+ var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d8b7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+ float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x;
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d8b7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+ float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x;
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl
new file mode 100644
index 0000000..221c6b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_4703d0() {
+ float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), ivec2(0));
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl
new file mode 100644
index 0000000..e412a9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_4703d0(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..178481b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_4703d0 "textureSample_4703d0"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %17 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %27 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %30 = OpConstantNull %float
+%textureSample_4703d0 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %30
+ %15 = OpLoad %7 %arg_1
+ %16 = OpLoad %3 %arg_0
+ %18 = OpSampledImage %17 %16 %15
+ %21 = OpConvertUToF %float %uint_1
+ %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21
+ %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %27
+ %12 = OpCompositeExtract %float %13 0
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureSample_4703d0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ee6598
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_4703d0() {
+ var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl
new file mode 100644
index 0000000..f9375b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> f32
+fn textureSample_7fd8cb() {
+ var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b5845ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+ float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b5845ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+ float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl
new file mode 100644
index 0000000..4871559
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSample_7fd8cb() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0f);
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl
new file mode 100644
index 0000000..d3e7dae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_7fd8cb(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_7fd8cb(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..bf1bc8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_7fd8cb "textureSample_7fd8cb"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %17 = OpTypeSampledImage %3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpConstantNull %float
+%textureSample_7fd8cb = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %26
+ %15 = OpLoad %7 %arg_1
+ %16 = OpLoad %3 %arg_0
+ %18 = OpSampledImage %17 %16 %15
+ %20 = OpConvertUToF %float %uint_1
+ %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20
+ %13 = OpImageSampleImplicitLod %v4float %18 %23
+ %12 = OpCompositeExtract %float %13 0
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureSample_7fd8cb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..113fb82
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_7fd8cb() {
+ var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl
new file mode 100644
index 0000000..b1003d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_bc7477() {
+ var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a8aa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+ float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a8aa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+ float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl
new file mode 100644
index 0000000..9007344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSample_bc7477() {
+ vec4 res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl
new file mode 100644
index 0000000..e106ef0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_bc7477(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u);
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_bc7477(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm
new file mode 100644
index 0000000..5c437e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 29
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_bc7477 "textureSample_bc7477"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %25 = OpConstantNull %v4float
+%textureSample_bc7477 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %25
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %19 = OpConvertUToF %float %uint_1
+ %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+ %12 = OpImageSampleImplicitLod %v4float %17 %22
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureSample_bc7477
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl
new file mode 100644
index 0000000..ed1eaf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_bc7477() {
+ var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl
new file mode 100644
index 0000000..a73972e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_d6b281() {
+ var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aea0117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+ float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aea0117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+ float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl
new file mode 100644
index 0000000..b375b29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_d6b281() {
+ vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl
new file mode 100644
index 0000000..0819cfe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_d6b281(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u);
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_d6b281(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8028706
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_d6b281 "textureSample_d6b281"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %26 = OpConstantNull %v4float
+%textureSample_d6b281 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %26
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %20 = OpConvertUToF %float %uint_1
+ %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+ %12 = OpImageSampleImplicitLod %v4float %17 %23
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureSample_d6b281
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl
new file mode 100644
index 0000000..63495a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_d6b281() {
+ var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl
new file mode 100644
index 0000000..f76a6b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_1c707e() {
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f0c0f28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+ float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f0c0f28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+ float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
new file mode 100644
index 0000000..6463438
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_1c707e() {
+ vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl
new file mode 100644
index 0000000..606c7f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_1c707e(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_1c707e(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm
new file mode 100644
index 0000000..c809e51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_1c707e "textureSampleBias_1c707e"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpConstantNull %v4float
+%textureSampleBias_1c707e = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %27
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %20 = OpConvertUToF %float %uint_1
+ %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+ %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureSampleBias_1c707e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a738d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_1c707e() {
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl
new file mode 100644
index 0000000..dc6ef1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_87915c() {
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6e02c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+ float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6e02c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+ float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
new file mode 100644
index 0000000..27f3db1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_87915c() {
+ vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl
new file mode 100644
index 0000000..0d11b74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f), int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_87915c(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..fc3f131
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_87915c "textureSampleBias_87915c"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %27 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %30 = OpConstantNull %v4float
+%textureSampleBias_87915c = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %30
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %20 = OpConvertUToF %float %uint_1
+ %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+ %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %27
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureSampleBias_87915c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..ff707a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_87915c() {
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl
new file mode 100644
index 0000000..2104892
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_c6953d() {
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ed2fe60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+ float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ed2fe60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+ float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
new file mode 100644
index 0000000..3338dd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleBias_c6953d() {
+ vec4 res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl
new file mode 100644
index 0000000..a116ed6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_c6953d(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u, bias(1.0f));
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_c6953d(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e266d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_c6953d "textureSampleBias_c6953d"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v4float = OpTypeVector %float 4
+ %16 = OpTypeSampledImage %3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %26 = OpConstantNull %v4float
+%textureSampleBias_c6953d = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %26
+ %14 = OpLoad %7 %arg_1
+ %15 = OpLoad %3 %arg_0
+ %17 = OpSampledImage %16 %15 %14
+ %19 = OpConvertUToF %float %uint_1
+ %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+ %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureSampleBias_c6953d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3309656
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_c6953d() {
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl
new file mode 100644
index 0000000..5bf28c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_1912e5() {
+ var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1547bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+ float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1547bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+ float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl
new file mode 100644
index 0000000..623232f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_1912e5() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl
new file mode 100644
index 0000000..13fdf12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_1912e5(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1u, 1.0f);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_1912e5(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm
new file mode 100644
index 0000000..c678e74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_1912e5 "textureSampleCompare_1912e5"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %15 = OpTypeSampledImage %3
+ %v4float = OpTypeVector %float 4
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpConstantNull %float
+%textureSampleCompare_1912e5 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %26
+ %13 = OpLoad %7 %arg_1
+ %14 = OpLoad %3 %arg_0
+ %16 = OpSampledImage %15 %14 %13
+ %19 = OpConvertUToF %float %uint_1
+ %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+ %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureSampleCompare_1912e5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f16f24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_1912e5() {
+ var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl
new file mode 100644
index 0000000..58da027
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompare_7b5025() {
+ var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fa4f65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+ float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa4f65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+ float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl
new file mode 100644
index 0000000..0a1dfc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_7b5025() {
+ float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl
new file mode 100644
index 0000000..eb74d38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_7b5025(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm
new file mode 100644
index 0000000..5baaf3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -0,0 +1,55 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_7b5025 "textureSampleCompare_7b5025"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %15 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %26 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %29 = OpConstantNull %float
+%textureSampleCompare_7b5025 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %29
+ %13 = OpLoad %7 %arg_1
+ %14 = OpLoad %3 %arg_0
+ %16 = OpSampledImage %15 %14 %13
+ %19 = OpConvertUToF %float %uint_1
+ %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
+ %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %26
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureSampleCompare_7b5025
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl
new file mode 100644
index 0000000..602982c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_7b5025() {
+ var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl
new file mode 100644
index 0000000..7483dd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_90ae56() {
+ var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7e358fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+ float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7e358fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+ float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl
new file mode 100644
index 0000000..abfc412
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_90ae56() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl
new file mode 100644
index 0000000..00080f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_90ae56(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_90ae56(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm
new file mode 100644
index 0000000..89b9887
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_90ae56 "textureSampleCompare_90ae56"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %15 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpConstantNull %float
+%textureSampleCompare_90ae56 = OpFunction %void None %8
+ %11 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %26
+ %13 = OpLoad %7 %arg_1
+ %14 = OpLoad %3 %arg_0
+ %16 = OpSampledImage %15 %14 %13
+ %19 = OpConvertUToF %float %uint_1
+ %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
+ %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
+ OpStore %res %12
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureSampleCompare_90ae56
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl
new file mode 100644
index 0000000..8559700
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_90ae56() {
+ var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl
new file mode 100644
index 0000000..c27866b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_7dc3c0() {
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c1d906
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_7dc3c0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c1d906
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_7dc3c0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
new file mode 100644
index 0000000..37e69e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
new file mode 100644
index 0000000..3cf80ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_7dc3c0(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..a56b0ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_7dc3c0 "textureSampleCompareLevel_7dc3c0"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %33 = OpTypeFunction %v4float
+%textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..1e65a08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_7dc3c0() {
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl
new file mode 100644
index 0000000..42d6fb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_958c87() {
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_958c87();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..267052f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_958c87();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..267052f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_958c87();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl
new file mode 100644
index 0000000..9385379
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_958c87();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl
new file mode 100644
index 0000000..a46a096
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_958c87(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f, level(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_958c87(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_958c87(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_958c87(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
new file mode 100644
index 0000000..6669c55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_958c87 "textureSampleCompareLevel_958c87"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %32 = OpTypeFunction %v4float
+%textureSampleCompareLevel_958c87 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
new file mode 100644
index 0000000..7b6e087
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_958c87() {
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_958c87();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl
new file mode 100644
index 0000000..59d04fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_bcb3dd() {
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..25f2ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_bcb3dd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..25f2ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_bcb3dd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
new file mode 100644
index 0000000..b5df2f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
new file mode 100644
index 0000000..035ddc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..a7672e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %36 = OpTypeFunction %v4float
+%textureSampleCompareLevel_bcb3dd = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %33
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..41956b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_bcb3dd() {
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl
new file mode 100644
index 0000000..b6d18f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_7cd6de() {
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_7cd6de();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a9c86c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+ float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_7cd6de();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a9c86c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+ float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_7cd6de();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl
new file mode 100644
index 0000000..d56773c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_7cd6de();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleGrad_7cd6de();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl
new file mode 100644
index 0000000..06c4d90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_7cd6de(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_7cd6de(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_7cd6de(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm
new file mode 100644
index 0000000..1513358
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_7cd6de "textureSampleGrad_7cd6de"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2float = OpTypeVector %float 2
+ %31 = OpConstantNull %v2float
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %34 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_7cd6de = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %34
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl
new file mode 100644
index 0000000..ae06e64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_7cd6de() {
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_7cd6de();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl
new file mode 100644
index 0000000..5e9988e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_a09131() {
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_a09131();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..24569b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+ float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_a09131();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_a09131();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..24569b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+ float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_a09131();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_a09131();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl
new file mode 100644
index 0000000..8667462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_a09131();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+void compute_main() {
+ textureSampleGrad_a09131();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl
new file mode 100644
index 0000000..ae0a0d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_a09131(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_a09131(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_a09131(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm
new file mode 100644
index 0000000..c5bbfc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_a09131 "textureSampleGrad_a09131"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2float = OpTypeVector %float 2
+ %31 = OpConstantNull %v2float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_a09131 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl
new file mode 100644
index 0000000..212ffa8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_a09131() {
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_a09131();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl
new file mode 100644
index 0000000..8e3968d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_bbb58f() {
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_bbb58f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8c07d5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+ float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_bbb58f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c07d5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+ float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_bbb58f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl
new file mode 100644
index 0000000..0123ec3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_bbb58f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+void compute_main() {
+ textureSampleGrad_bbb58f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl
new file mode 100644
index 0000000..2cf113e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, gradientcube(float3(0.0f), float3(0.0f)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_bbb58f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_bbb58f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_bbb58f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm
new file mode 100644
index 0000000..35a94b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_bbb58f "textureSampleGrad_bbb58f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v3float = OpTypeVector %float 3
+ %30 = OpConstantNull %v3float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_bbb58f = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl
new file mode 100644
index 0000000..b766ec2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_bbb58f() {
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_bbb58f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl
new file mode 100644
index 0000000..2330cfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_265cc7() {
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_265cc7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bb13673
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+ float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_265cc7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bb13673
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+ float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_265cc7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl
new file mode 100644
index 0000000..454d56b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_265cc7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+ textureSampleLevel_265cc7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl
new file mode 100644
index 0000000..c512ee7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_265cc7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_265cc7(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_265cc7(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_265cc7(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm
new file mode 100644
index 0000000..1d5cd88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_265cc7 "textureSampleLevel_265cc7"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+%textureSampleLevel_265cc7 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl
new file mode 100644
index 0000000..00932fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_265cc7() {
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_265cc7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl
new file mode 100644
index 0000000..6552683
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_615583() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_615583();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..634fa95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+ float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_615583();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_615583();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..634fa95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+ float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_615583();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_615583();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl
new file mode 100644
index 0000000..8eff1cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_615583();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLod' : no matching overloaded function found
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+void compute_main() {
+ textureSampleLevel_615583();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl
new file mode 100644
index 0000000..8647ff8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_615583(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_615583(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_615583(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_615583(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm
new file mode 100644
index 0000000..999d156
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_615583 "textureSampleLevel_615583"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_615583 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %27 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27
+ %31 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl
new file mode 100644
index 0000000..149d95c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_615583() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_615583();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl
new file mode 100644
index 0000000..4bf7198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32) -> f32
+fn textureSampleLevel_73e892() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_73e892();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..96a9806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_73e892();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_73e892();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..96a9806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_73e892();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_73e892();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl
new file mode 100644
index 0000000..9713397
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_73e892();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void compute_main() {
+ textureSampleLevel_73e892();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl
new file mode 100644
index 0000000..4ab087d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_73e892(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_73e892(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm
new file mode 100644
index 0000000..821a1ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_73e892 "textureSampleLevel_73e892"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %26 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_73e892 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %27 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c08bdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_73e892() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_73e892();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl
new file mode 100644
index 0000000..808785e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_941a53() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_941a53();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45085b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+ float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_941a53();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_941a53();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45085b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+ float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_941a53();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_941a53();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl
new file mode 100644
index 0000000..774f102
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_941a53();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+void compute_main() {
+ textureSampleLevel_941a53();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl
new file mode 100644
index 0000000..148a594
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_941a53(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_941a53(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_941a53(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_941a53(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bc015b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_941a53 "textureSampleLevel_941a53"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_941a53 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26
+ %30 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl
new file mode 100644
index 0000000..66ad48b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_941a53() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_941a53();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl
new file mode 100644
index 0000000..47bc418
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_aab3b9() {
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_aab3b9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3ff9d7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+ float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_aab3b9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3ff9d7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+ float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_aab3b9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl
new file mode 100644
index 0000000..71141d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_aab3b9();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+ textureSampleLevel_aab3b9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl
new file mode 100644
index 0000000..e1f41e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_aab3b9(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1.0f));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_aab3b9(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_aab3b9(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_aab3b9(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..272d846
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_aab3b9 "textureSampleLevel_aab3b9"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %32 = OpTypeFunction %v4float
+%textureSampleLevel_aab3b9 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %25 = OpConvertUToF %float %uint_1
+ %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+ %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..237662c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_aab3b9() {
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_aab3b9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl
new file mode 100644
index 0000000..c352dee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: u32) -> f32
+fn textureSampleLevel_ae92a2() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_ae92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f0daf77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_ae92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f0daf77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_ae92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..2e11ac2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_ae92a2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLod' : no matching overloaded function found
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void compute_main() {
+ textureSampleLevel_ae92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl
new file mode 100644
index 0000000..fe37bb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_ae92a2(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_ae92a2(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_ae92a2(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_ae92a2(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f6a549
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_ae92a2 "textureSampleLevel_ae92a2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %26 = OpConstantNull %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_ae92a2 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %27 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..c485be4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_ae92a2() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_ae92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl
new file mode 100644
index 0000000..5f1ee66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_cdfe0f() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_cdfe0f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..749bfc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+ float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_cdfe0f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..749bfc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+ float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_cdfe0f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl
new file mode 100644
index 0000000..db5abed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_cdfe0f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:7: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:6: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl
new file mode 100644
index 0000000..693c3f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_cdfe0f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_cdfe0f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_cdfe0f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
new file mode 100644
index 0000000..62f94db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_cdfe0f "textureSampleLevel_cdfe0f"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %34 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_cdfe0f = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %27 = OpConvertUToF %float %uint_1
+ %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27
+ %31 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %34
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
new file mode 100644
index 0000000..fa05fe7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_cdfe0f() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_cdfe0f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl
new file mode 100644
index 0000000..0ce14c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_f3b2c8() {
+ var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_f3b2c8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81096d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_f3b2c8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..81096d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+ float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_f3b2c8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl
new file mode 100644
index 0000000..503a1bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_f3b2c8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl
new file mode 100644
index 0000000..1d3faea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_f3b2c8(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_f3b2c8(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_f3b2c8(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..d98a8b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_f3b2c8 "textureSampleLevel_f3b2c8"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %23 = OpTypeSampledImage %11
+ %v2float = OpTypeVector %float 2
+ %26 = OpConstantNull %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %32 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_f3b2c8 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_float Function %8
+ %21 = OpLoad %14 %arg_1
+ %22 = OpLoad %11 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %27 = OpConvertSToF %float %uint_1
+ %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %32
+ %19 = OpCompositeExtract %float %20 0
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ffb28c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_f3b2c8() {
+ var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_f3b2c8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl
new file mode 100644
index 0000000..d9217fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_faa6d7() {
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_faa6d7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5646cef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+ float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_faa6d7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5646cef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+ float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_faa6d7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl
new file mode 100644
index 0000000..9c1734c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_faa6d7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_faa6d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl
new file mode 100644
index 0000000..a0039f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_faa6d7(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_faa6d7(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_faa6d7(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..74736ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_faa6d7 "textureSampleLevel_faa6d7"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %22 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %float_1 = OpConstant %float 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpTypeFunction %v4float
+%textureSampleLevel_faa6d7 = OpFunction %void None %15
+ %18 = OpLabel
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ %20 = OpLoad %14 %arg_1
+ %21 = OpLoad %11 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %26 = OpConvertUToF %float %uint_1
+ %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+ %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %33
+ OpStore %res %19
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..14a47e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_faa6d7() {
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_faa6d7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl
new file mode 100644
index 0000000..6cc3fc7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_07548b() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_07548b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b7e09f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_07548b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_07548b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_07548b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b7e09f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_07548b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_07548b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_07548b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl
new file mode 100644
index 0000000..94e408b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_07548b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_07548b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_07548b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl
new file mode 100644
index 0000000..a943c9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_07548b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_07548b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_07548b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm
new file mode 100644
index 0000000..81c6715
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_07548b "textureStore_07548b"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_07548b = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_07548b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_07548b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_07548b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl
new file mode 100644
index 0000000..ddcfd78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
+
+fn textureStore_07548b() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_07548b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl
new file mode 100644
index 0000000..439e2b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_158cf0() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_158cf0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b9bb3f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_158cf0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_158cf0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b9bb3f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_158cf0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_158cf0();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl
new file mode 100644
index 0000000..f8eb6ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_158cf0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_158cf0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl
new file mode 100644
index 0000000..8b86324
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_158cf0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_158cf0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_158cf0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..57856cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_158cf0 "textureStore_158cf0"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpConstantNull %v4uint
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_158cf0 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %22 %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureStore_158cf0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_158cf0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_158cf0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a13e2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_158cf0() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_158cf0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl
new file mode 100644
index 0000000..9d5ba32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_1839f2() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1839f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d27947f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1839f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1839f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d27947f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1839f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1839f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl
new file mode 100644
index 0000000..3d314fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_1839f2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_1839f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl
new file mode 100644
index 0000000..f0251ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_1839f2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1839f2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1839f2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1f7242
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1839f2 "textureStore_1839f2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1839f2 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_1839f2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_1839f2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_1839f2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..7da29d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
+
+fn textureStore_1839f2() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1839f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl
new file mode 100644
index 0000000..3ee0b86
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_1a7d35() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1a7d35();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c3f667
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1a7d35();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1a7d35();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c3f667
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1a7d35();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1a7d35();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl
new file mode 100644
index 0000000..ca69181
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_1a7d35();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_1a7d35();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl
new file mode 100644
index 0000000..c857308
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_1a7d35(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1a7d35(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1a7d35(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm
new file mode 100644
index 0000000..cac9cad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1a7d35 "textureStore_1a7d35"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4int = OpTypeVector %int 4
+ %25 = OpConstantNull %v4int
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1a7d35 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %23 %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl
new file mode 100644
index 0000000..83b8de3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_1a7d35() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1a7d35();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl
new file mode 100644
index 0000000..5f1165a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_1dc954() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1dc954();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aa78a7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1dc954();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1dc954();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aa78a7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1dc954();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1dc954();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl
new file mode 100644
index 0000000..9023bec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_1dc954();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_1dc954();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl
new file mode 100644
index 0000000..94daa3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_1dc954(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1dc954(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1dc954(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm
new file mode 100644
index 0000000..399c07d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1dc954 "textureStore_1dc954"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v4int = OpTypeVector %int 4
+ %22 = OpConstantNull %v4int
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1dc954 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_1dc954
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_1dc954
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_1dc954
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl
new file mode 100644
index 0000000..6ea1f64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
+
+fn textureStore_1dc954() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1dc954();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl
new file mode 100644
index 0000000..ac0ac7b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_1e20f2() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1e20f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c1d0a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1e20f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1e20f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c1d0a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1e20f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1e20f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl
new file mode 100644
index 0000000..45ecb44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_1e20f2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_1e20f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl
new file mode 100644
index 0000000..85e7418
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_1e20f2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1e20f2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1e20f2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..446cf04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1e20f2 "textureStore_1e20f2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1e20f2 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8762625
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
+
+fn textureStore_1e20f2() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1e20f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl
new file mode 100644
index 0000000..11c0772
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_207fdd() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_207fdd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4078bc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_207fdd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_207fdd();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4078bc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_207fdd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_207fdd();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl
new file mode 100644
index 0000000..b780a95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_207fdd();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_207fdd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl
new file mode 100644
index 0000000..9e3c0e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_207fdd(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_207fdd(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_207fdd(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm
new file mode 100644
index 0000000..4c90dfc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_207fdd "textureStore_207fdd"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_207fdd = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_207fdd
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_207fdd
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_207fdd
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl
new file mode 100644
index 0000000..50d6dc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
+
+fn textureStore_207fdd() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_207fdd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl
new file mode 100644
index 0000000..d8da3e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_285218() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_285218();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bdd814e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_285218();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_285218();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_285218();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bdd814e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_285218();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_285218();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_285218();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl
new file mode 100644
index 0000000..2aea958
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_285218();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_285218();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_285218();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl
new file mode 100644
index 0000000..f55cc01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_285218(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_285218(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_285218(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_285218(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm
new file mode 100644
index 0000000..72dc9e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_285218 "textureStore_285218"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_285218 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_285218
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_285218
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_285218
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl
new file mode 100644
index 0000000..b479a5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
+
+fn textureStore_285218() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_285218();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl
new file mode 100644
index 0000000..3c0db21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_2d2835() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2d2835();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffe3cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2d2835();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2d2835();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ffe3cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2d2835();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2d2835();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl
new file mode 100644
index 0000000..b53dc33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_2d2835();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_2d2835();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl
new file mode 100644
index 0000000..958833b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_2d2835(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_2d2835(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_2d2835(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm
new file mode 100644
index 0000000..cf70248
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_2d2835 "textureStore_2d2835"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_2d2835 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_2d2835
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_2d2835
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_2d2835
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl
new file mode 100644
index 0000000..2506162
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_2d2835() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2d2835();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl
new file mode 100644
index 0000000..3283fb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_2e6102() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2e6102();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f60ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2e6102();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2e6102();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5f60ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2e6102();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2e6102();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl
new file mode 100644
index 0000000..2767363
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_2e6102();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_2e6102();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl
new file mode 100644
index 0000000..9bcd5aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_2e6102(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_2e6102(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_2e6102(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm
new file mode 100644
index 0000000..57c1ad1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_2e6102 "textureStore_2e6102"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_2e6102 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_2e6102
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_2e6102
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_2e6102
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c3458e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
+
+fn textureStore_2e6102() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2e6102();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl
new file mode 100644
index 0000000..fe8f3e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_330b7c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_330b7c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8cf1f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_330b7c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_330b7c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8cf1f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_330b7c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_330b7c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl
new file mode 100644
index 0000000..1a37be2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_330b7c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_330b7c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl
new file mode 100644
index 0000000..e08e7b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_330b7c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_330b7c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_330b7c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm
new file mode 100644
index 0000000..8142b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_330b7c "textureStore_330b7c"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_330b7c = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_330b7c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_330b7c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_330b7c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl
new file mode 100644
index 0000000..e93891f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_330b7c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_330b7c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl
new file mode 100644
index 0000000..599a5aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_3c1937() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3c1937();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3c35d23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3c1937();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3c1937();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3c35d23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3c1937();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3c1937();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl
new file mode 100644
index 0000000..2f70fdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_3c1937();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_3c1937();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl
new file mode 100644
index 0000000..66c76cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_3c1937(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_3c1937(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_3c1937(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm
new file mode 100644
index 0000000..ceae29a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_3c1937 "textureStore_3c1937"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+ %v4uint = OpTypeVector %uint 4
+ %21 = OpConstantNull %v4uint
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_3c1937 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureStore_3c1937
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_3c1937
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_3c1937
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl
new file mode 100644
index 0000000..b26afa2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
+
+fn textureStore_3c1937() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3c1937();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl
new file mode 100644
index 0000000..9bddb8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_3d6f01() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3d6f01();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..24d481d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3d6f01();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3d6f01();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..24d481d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3d6f01();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3d6f01();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl
new file mode 100644
index 0000000..1e279f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_3d6f01();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_3d6f01();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl
new file mode 100644
index 0000000..04287c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_3d6f01(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_3d6f01(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_3d6f01(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm
new file mode 100644
index 0000000..658ccf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_3d6f01 "textureStore_3d6f01"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v4int = OpTypeVector %int 4
+ %22 = OpConstantNull %v4int
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_3d6f01 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec89f38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
+
+fn textureStore_3d6f01() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3d6f01();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl
new file mode 100644
index 0000000..8383481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_40c455() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_40c455();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a34c109
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_40c455();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_40c455();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_40c455();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a34c109
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_40c455();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_40c455();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_40c455();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl
new file mode 100644
index 0000000..cf38074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_40c455();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_40c455();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_40c455();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl
new file mode 100644
index 0000000..aca14e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_40c455(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_40c455(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_40c455(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6742e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_40c455 "textureStore_40c455"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_40c455 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_40c455
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_40c455
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_40c455
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl
new file mode 100644
index 0000000..17ec04a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
+
+fn textureStore_40c455() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_40c455();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl
new file mode 100644
index 0000000..086f268
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_4288fc() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4288fc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..53c3ae0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4288fc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4288fc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..53c3ae0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4288fc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4288fc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl
new file mode 100644
index 0000000..0d55884
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_4288fc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_4288fc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl
new file mode 100644
index 0000000..e865bdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_4288fc(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_4288fc(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_4288fc(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..0251157
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_4288fc "textureStore_4288fc"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_4288fc = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_4288fc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_4288fc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_4288fc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..5a88ca4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
+
+fn textureStore_4288fc() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4288fc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl
new file mode 100644
index 0000000..e05a98c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_486500() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_486500();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5eb3313
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_486500();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_486500();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_486500();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5eb3313
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_486500();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_486500();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_486500();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl
new file mode 100644
index 0000000..88ef8d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_486500();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_486500();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_486500();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl
new file mode 100644
index 0000000..9007838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_486500(texture3d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_486500(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_486500(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_486500(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm
new file mode 100644
index 0000000..da34216
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_486500 "textureStore_486500"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_486500 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_486500
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_486500
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_486500
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbb5e94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
+
+fn textureStore_486500() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_486500();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl
new file mode 100644
index 0000000..bb7e882
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_4c454f() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4c454f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4ab4c39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4c454f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4c454f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4ab4c39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4c454f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4c454f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl
new file mode 100644
index 0000000..6fe291b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_4c454f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_4c454f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl
new file mode 100644
index 0000000..f608d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_4c454f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_4c454f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_4c454f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d89bf6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_4c454f "textureStore_4c454f"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4int = OpTypeVector %int 4
+ %25 = OpConstantNull %v4int
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_4c454f = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %23 %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureStore_4c454f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_4c454f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_4c454f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl
new file mode 100644
index 0000000..8b60830
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_4c454f() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4c454f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl
new file mode 100644
index 0000000..ffd82b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_506a71() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_506a71();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4d77b11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_506a71();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_506a71();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_506a71();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d77b11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_506a71();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_506a71();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_506a71();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl
new file mode 100644
index 0000000..d8e3510
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_506a71();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_506a71();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_506a71();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl
new file mode 100644
index 0000000..f67d858
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_506a71(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_506a71(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_506a71(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm
new file mode 100644
index 0000000..9315213
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_506a71 "textureStore_506a71"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_506a71 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %20 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_506a71
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_506a71
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_506a71
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl
new file mode 100644
index 0000000..a37a117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
+
+fn textureStore_506a71() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_506a71();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl
new file mode 100644
index 0000000..e8a74d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_52f503() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_52f503();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc3e1b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_52f503();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_52f503();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_52f503();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc3e1b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_52f503();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_52f503();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_52f503();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl
new file mode 100644
index 0000000..3b9248f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_52f503();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_52f503();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_52f503();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl
new file mode 100644
index 0000000..0930d28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_52f503(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_52f503(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_52f503(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd373e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_52f503 "textureStore_52f503"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_52f503 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_52f503
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_52f503
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_52f503
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl
new file mode 100644
index 0000000..61ad0ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
+
+fn textureStore_52f503() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_52f503();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl
new file mode 100644
index 0000000..1a7d7ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_5841f8() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5841f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8784c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5841f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5841f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8784c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5841f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5841f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl
new file mode 100644
index 0000000..a1b2d3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_5841f8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_5841f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl
new file mode 100644
index 0000000..691fffc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_5841f8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5841f8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5841f8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..27b2fce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5841f8 "textureStore_5841f8"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5841f8 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_5841f8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_5841f8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_5841f8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8881fcc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_5841f8() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5841f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl
new file mode 100644
index 0000000..9b03422
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_5bc4f3() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5bc4f3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..729e6f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5bc4f3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5bc4f3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..729e6f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5bc4f3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5bc4f3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl
new file mode 100644
index 0000000..161d80f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_5bc4f3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_5bc4f3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl
new file mode 100644
index 0000000..9cb2ab3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_5bc4f3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5bc4f3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5bc4f3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..297fd44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5bc4f3 "textureStore_5bc4f3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpConstantNull %v4uint
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5bc4f3 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %22 %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..840e0f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_5bc4f3() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5bc4f3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl
new file mode 100644
index 0000000..cb02f5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_5f9a49() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5f9a49();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da08207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5f9a49();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5f9a49();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da08207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5f9a49();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5f9a49();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl
new file mode 100644
index 0000000..24392ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_5f9a49();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_5f9a49();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl
new file mode 100644
index 0000000..f6b2d1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_5f9a49(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5f9a49(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5f9a49(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a64ab7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5f9a49 "textureStore_5f9a49"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5f9a49 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl
new file mode 100644
index 0000000..97187c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_5f9a49() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5f9a49();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl
new file mode 100644
index 0000000..ba90890
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_602b5a() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_602b5a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f0db55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_602b5a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_602b5a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f0db55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_602b5a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_602b5a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl
new file mode 100644
index 0000000..f342c66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_602b5a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_602b5a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl
new file mode 100644
index 0000000..c41e010
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_602b5a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_602b5a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_602b5a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm
new file mode 100644
index 0000000..93c189d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_602b5a "textureStore_602b5a"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_602b5a = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_602b5a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_602b5a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_602b5a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a7c2f31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
+
+fn textureStore_602b5a() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_602b5a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl
new file mode 100644
index 0000000..0b39052
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_699a1b() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_699a1b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f3d78c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_699a1b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_699a1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f3d78c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_699a1b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_699a1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl
new file mode 100644
index 0000000..6b80b95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_699a1b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_699a1b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl
new file mode 100644
index 0000000..4c739f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_699a1b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_699a1b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_699a1b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b8f5015
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_699a1b "textureStore_699a1b"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_699a1b = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_699a1b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_699a1b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_699a1b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7585470
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_699a1b() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_699a1b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl
new file mode 100644
index 0000000..ff91148
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_726472() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_726472();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c62e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_726472();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_726472();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_726472();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c62e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_726472();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_726472();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_726472();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl
new file mode 100644
index 0000000..812e349
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_726472();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_726472();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_726472();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl
new file mode 100644
index 0000000..f2fa086
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_726472(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_726472(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_726472(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_726472(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm
new file mode 100644
index 0000000..ead0f58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_726472 "textureStore_726472"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_726472 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_726472
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_726472
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_726472
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl
new file mode 100644
index 0000000..87ae30c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
+
+fn textureStore_726472() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_726472();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl
new file mode 100644
index 0000000..5498680
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_73bbbc() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_73bbbc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c0e09e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_73bbbc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_73bbbc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c0e09e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_73bbbc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_73bbbc();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl
new file mode 100644
index 0000000..ea855e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_73bbbc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_73bbbc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl
new file mode 100644
index 0000000..3c94e3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_73bbbc(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_73bbbc(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_73bbbc(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f84672
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_73bbbc "textureStore_73bbbc"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_73bbbc = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ad3038
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
+
+fn textureStore_73bbbc() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_73bbbc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl
new file mode 100644
index 0000000..464bf9d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_779d14() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_779d14();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..253eae2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_779d14();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_779d14();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_779d14();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..253eae2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_779d14();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_779d14();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_779d14();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl
new file mode 100644
index 0000000..01199d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_779d14();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_779d14();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_779d14();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl
new file mode 100644
index 0000000..0593462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_779d14(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_779d14(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_779d14(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm
new file mode 100644
index 0000000..affc5ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_779d14 "textureStore_779d14"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpConstantNull %v4uint
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_779d14 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %22 %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureStore_779d14
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_779d14
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_779d14
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl
new file mode 100644
index 0000000..baf07fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_779d14() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_779d14();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl
new file mode 100644
index 0000000..72e6ebf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_7cf6e7() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_7cf6e7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59d0258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_7cf6e7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_7cf6e7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59d0258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+ arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_7cf6e7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_7cf6e7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl
new file mode 100644
index 0000000..cfd83a1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_7cf6e7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_7cf6e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl
new file mode 100644
index 0000000..9140107
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_7cf6e7(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_7cf6e7(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_7cf6e7(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..b2ba99c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_7cf6e7 "textureStore_7cf6e7"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_7cf6e7 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a201a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
+
+fn textureStore_7cf6e7() {
+ textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_7cf6e7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl
new file mode 100644
index 0000000..e60ce76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8b9310() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8b9310();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1f1d30e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8b9310();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8b9310();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1f1d30e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8b9310();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8b9310();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl
new file mode 100644
index 0000000..59512b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_8b9310();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_8b9310();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl
new file mode 100644
index 0000000..770d905
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_8b9310(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8b9310(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8b9310(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm
new file mode 100644
index 0000000..65de91fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8b9310 "textureStore_8b9310"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8b9310 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_8b9310
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_8b9310
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_8b9310
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl
new file mode 100644
index 0000000..d0c0b53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
+
+fn textureStore_8b9310() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8b9310();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl
new file mode 100644
index 0000000..d0da1e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_8bb287() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8bb287();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..418bf3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8bb287();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8bb287();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..418bf3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8bb287();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8bb287();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl
new file mode 100644
index 0000000..da9c76e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_8bb287();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_8bb287();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl
new file mode 100644
index 0000000..4421d40
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_8bb287(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8bb287(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8bb287(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm
new file mode 100644
index 0000000..e1b64d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8bb287 "textureStore_8bb287"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4int = OpTypeVector %int 4
+ %25 = OpConstantNull %v4int
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8bb287 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %23 %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureStore_8bb287
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_8bb287
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_8bb287
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl
new file mode 100644
index 0000000..7719279
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_8bb287() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8bb287();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl
new file mode 100644
index 0000000..acabd4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_8c76e9() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8c76e9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..26e5180
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8c76e9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8c76e9();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..26e5180
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8c76e9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8c76e9();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl
new file mode 100644
index 0000000..2a19ced
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_8c76e9();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_8c76e9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl
new file mode 100644
index 0000000..9d8c1e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_8c76e9(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8c76e9(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8c76e9(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..14e31d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8c76e9 "textureStore_8c76e9"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v4int = OpTypeVector %int 4
+ %22 = OpConstantNull %v4int
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8c76e9 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec93e21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
+
+fn textureStore_8c76e9() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8c76e9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl
new file mode 100644
index 0000000..528d387
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_8dc54f() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8dc54f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3ef51f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8dc54f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8dc54f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3ef51f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8dc54f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8dc54f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl
new file mode 100644
index 0000000..5fbcbfd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_8dc54f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_8dc54f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl
new file mode 100644
index 0000000..0f2343a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_8dc54f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8dc54f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8dc54f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm
new file mode 100644
index 0000000..5431052
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8dc54f "textureStore_8dc54f"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8dc54f = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %20 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c6ac87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
+
+fn textureStore_8dc54f() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8dc54f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl
new file mode 100644
index 0000000..99f57b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8ed9f8() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8ed9f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bfb203d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8ed9f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8ed9f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bfb203d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8ed9f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8ed9f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl
new file mode 100644
index 0000000..5a1fd66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_8ed9f8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_8ed9f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl
new file mode 100644
index 0000000..007a32d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_8ed9f8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8ed9f8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8ed9f8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..78944bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8ed9f8 "textureStore_8ed9f8"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8ed9f8 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fed674
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
+
+fn textureStore_8ed9f8() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8ed9f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl
new file mode 100644
index 0000000..2867992
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_958353() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_958353();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8326837
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_958353();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_958353();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_958353();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8326837
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_958353();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_958353();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_958353();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl
new file mode 100644
index 0000000..2c0a360
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_958353();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_958353();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_958353();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl
new file mode 100644
index 0000000..4116d9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_958353(texture1d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_958353(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_958353(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_958353(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0fd2d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_958353 "textureStore_958353"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v4int = OpTypeVector %int 4
+ %22 = OpConstantNull %v4int
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_958353 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_958353
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_958353
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_958353
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl
new file mode 100644
index 0000000..f945b20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
+
+fn textureStore_958353() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_958353();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl
new file mode 100644
index 0000000..27385b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_959d94() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_959d94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0053ebc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_959d94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_959d94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_959d94();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0053ebc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_959d94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_959d94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_959d94();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl
new file mode 100644
index 0000000..dd1193b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_959d94();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_959d94();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_959d94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl
new file mode 100644
index 0000000..3d498b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_959d94(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_959d94(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_959d94(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm
new file mode 100644
index 0000000..071ba77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_959d94 "textureStore_959d94"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_959d94 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_959d94
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_959d94
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_959d94
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl
new file mode 100644
index 0000000..548a878
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
+
+fn textureStore_959d94() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_959d94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl
new file mode 100644
index 0000000..b98336c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_95e452() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_95e452();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db2e297
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_95e452();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_95e452();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_95e452();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..db2e297
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_95e452();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_95e452();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_95e452();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl
new file mode 100644
index 0000000..c17fdcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_95e452();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_95e452();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_95e452();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl
new file mode 100644
index 0000000..327ad00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_95e452(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_95e452(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_95e452(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm
new file mode 100644
index 0000000..391ed7c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_95e452 "textureStore_95e452"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_95e452 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_95e452
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_95e452
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_95e452
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f18a92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
+
+fn textureStore_95e452() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_95e452();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl
new file mode 100644
index 0000000..57f9e41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_9f5318() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_9f5318();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f0a281
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_9f5318();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_9f5318();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5f0a281
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_9f5318();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_9f5318();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl
new file mode 100644
index 0000000..260128a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_9f5318();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_9f5318();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl
new file mode 100644
index 0000000..71eab29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_9f5318(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_9f5318(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_9f5318(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm
new file mode 100644
index 0000000..e767dff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_9f5318 "textureStore_9f5318"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_9f5318 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_9f5318
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_9f5318
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_9f5318
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba762db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
+
+fn textureStore_9f5318() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_9f5318();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl
new file mode 100644
index 0000000..8bc5822
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_a0f96e() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a0f96e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eac237c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a0f96e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a0f96e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eac237c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+ arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a0f96e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a0f96e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl
new file mode 100644
index 0000000..0d052c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_a0f96e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_a0f96e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl
new file mode 100644
index 0000000..55416ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_a0f96e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a0f96e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a0f96e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm
new file mode 100644
index 0000000..be0bd69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a0f96e "textureStore_a0f96e"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a0f96e = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %22 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl
new file mode 100644
index 0000000..4903cd3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_a0f96e() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a0f96e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl
new file mode 100644
index 0000000..1457ecf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_a1352c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a1352c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..852989a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a1352c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a1352c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..852989a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a1352c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a1352c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl
new file mode 100644
index 0000000..69fba50
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_a1352c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_a1352c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl
new file mode 100644
index 0000000..e5aa80c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_a1352c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a1352c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a1352c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm
new file mode 100644
index 0000000..88ec228
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a1352c "textureStore_a1352c"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4int = OpTypeVector %int 4
+ %25 = OpConstantNull %v4int
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a1352c = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %23 %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureStore_a1352c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_a1352c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_a1352c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl
new file mode 100644
index 0000000..d4ae406
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_a1352c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a1352c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl
new file mode 100644
index 0000000..90266ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_a4c338() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a4c338();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..887d1a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a4c338();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a4c338();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..887d1a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a4c338();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a4c338();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl
new file mode 100644
index 0000000..d0953bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_a4c338();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_a4c338();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl
new file mode 100644
index 0000000..be778b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_a4c338(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a4c338(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a4c338(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm
new file mode 100644
index 0000000..700238c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a4c338 "textureStore_a4c338"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a4c338 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_a4c338
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_a4c338
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_a4c338
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl
new file mode 100644
index 0000000..16909fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
+
+fn textureStore_a4c338() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a4c338();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl
new file mode 100644
index 0000000..d35de02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_a5e80d() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a5e80d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..beae873
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a5e80d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a5e80d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..beae873
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a5e80d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a5e80d();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl
new file mode 100644
index 0000000..0a280ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_a5e80d();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_a5e80d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl
new file mode 100644
index 0000000..b44bcec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_a5e80d(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a5e80d(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a5e80d(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm
new file mode 100644
index 0000000..6710bee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a5e80d "textureStore_a5e80d"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a5e80d = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl
new file mode 100644
index 0000000..523b068
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
+
+fn textureStore_a5e80d() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a5e80d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl
new file mode 100644
index 0000000..5ad97c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_a6e78f() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a6e78f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c32fa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a6e78f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a6e78f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c32fa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a6e78f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a6e78f();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl
new file mode 100644
index 0000000..04b7a84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_a6e78f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_a6e78f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl
new file mode 100644
index 0000000..f45f6f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_a6e78f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a6e78f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a6e78f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm
new file mode 100644
index 0000000..d235078
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a6e78f "textureStore_a6e78f"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+ %v4uint = OpTypeVector %uint 4
+ %21 = OpConstantNull %v4uint
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a6e78f = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl
new file mode 100644
index 0000000..38db884
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
+
+fn textureStore_a6e78f() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a6e78f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl
new file mode 100644
index 0000000..45ac5b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_a9426c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a9426c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8faa545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a9426c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a9426c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8faa545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a9426c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a9426c();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl
new file mode 100644
index 0000000..f7d65f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_a9426c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_a9426c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl
new file mode 100644
index 0000000..f4bbdd4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_a9426c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a9426c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a9426c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9439679
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a9426c "textureStore_a9426c"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpConstantNull %v4uint
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a9426c = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %22 %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureStore_a9426c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_a9426c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_a9426c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl
new file mode 100644
index 0000000..186d1fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_a9426c() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a9426c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl
new file mode 100644
index 0000000..3eb9078
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_aeb38a() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_aeb38a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..207747f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_aeb38a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_aeb38a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..207747f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_aeb38a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_aeb38a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl
new file mode 100644
index 0000000..64d71b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_aeb38a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_aeb38a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl
new file mode 100644
index 0000000..816a29f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_aeb38a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_aeb38a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_aeb38a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm
new file mode 100644
index 0000000..9823237
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_aeb38a "textureStore_aeb38a"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_aeb38a = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %20 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl
new file mode 100644
index 0000000..9730895
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
+
+fn textureStore_aeb38a() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_aeb38a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl
new file mode 100644
index 0000000..8de25c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_b42fd3() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b42fd3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f7eb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b42fd3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b42fd3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2f7eb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+ arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b42fd3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b42fd3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl
new file mode 100644
index 0000000..921ec9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_b42fd3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_b42fd3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl
new file mode 100644
index 0000000..a888409
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_b42fd3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b42fd3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b42fd3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..e550c49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b42fd3 "textureStore_b42fd3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4uint = OpTypeVector %uint 4
+ %24 = OpConstantNull %v4uint
+ %25 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b42fd3 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %22 %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..70f8fdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_b42fd3() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b42fd3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl
new file mode 100644
index 0000000..c04799d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b70ded() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b70ded();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9fda40d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b70ded();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b70ded();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9fda40d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b70ded();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b70ded();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl
new file mode 100644
index 0000000..cd77fcd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_b70ded();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_b70ded();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl
new file mode 100644
index 0000000..947fb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_b70ded(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b70ded(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b70ded(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm
new file mode 100644
index 0000000..4bef24b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b70ded "textureStore_b70ded"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+ %v4uint = OpTypeVector %uint 4
+ %21 = OpConstantNull %v4uint
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b70ded = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureStore_b70ded
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_b70ded
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_b70ded
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl
new file mode 100644
index 0000000..59d6f6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
+
+fn textureStore_b70ded() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b70ded();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl
new file mode 100644
index 0000000..f23a704
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_b76ff3() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b76ff3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2310856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b76ff3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b76ff3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2310856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+ arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b76ff3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b76ff3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl
new file mode 100644
index 0000000..31af161
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_b76ff3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_b76ff3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl
new file mode 100644
index 0000000..04029e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_b76ff3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b76ff3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b76ff3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm
new file mode 100644
index 0000000..54f83ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b76ff3 "textureStore_b76ff3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %21 = OpConstantNull %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b76ff3 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl
new file mode 100644
index 0000000..13c012c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
+
+fn textureStore_b76ff3() {
+ textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b76ff3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl
new file mode 100644
index 0000000..2503648
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b77161() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b77161();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59dffc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b77161();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b77161();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b77161();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59dffc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b77161();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b77161();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b77161();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl
new file mode 100644
index 0000000..1ac7ccd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_b77161();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_b77161();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_b77161();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl
new file mode 100644
index 0000000..260b776
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_b77161(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b77161(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b77161(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm
new file mode 100644
index 0000000..714b0c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b77161 "textureStore_b77161"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+ %v4uint = OpTypeVector %uint 4
+ %21 = OpConstantNull %v4uint
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b77161 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureStore_b77161
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_b77161
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_b77161
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl
new file mode 100644
index 0000000..c32b685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
+
+fn textureStore_b77161() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b77161();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl
new file mode 100644
index 0000000..c3727f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_c1f29e() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c1f29e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8b2154a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c1f29e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c1f29e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8b2154a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c1f29e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c1f29e();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl
new file mode 100644
index 0000000..9f4f693
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_c1f29e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_c1f29e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl
new file mode 100644
index 0000000..f99aee7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_c1f29e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_c1f29e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_c1f29e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f99a79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_c1f29e "textureStore_c1f29e"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_c1f29e = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl
new file mode 100644
index 0000000..0b929ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
+
+fn textureStore_c1f29e() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c1f29e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl
new file mode 100644
index 0000000..3263299
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_c2ca46() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c2ca46();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8e5aee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c2ca46();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c2ca46();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8e5aee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+ arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c2ca46();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c2ca46();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl
new file mode 100644
index 0000000..2155bb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_c2ca46();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_c2ca46();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl
new file mode 100644
index 0000000..43cef9a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_c2ca46(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_c2ca46(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_c2ca46(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e8f100
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_c2ca46 "textureStore_c2ca46"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+ %v4int = OpTypeVector %int 4
+ %25 = OpConstantNull %v4int
+ %26 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_c2ca46 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %23 %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl
new file mode 100644
index 0000000..2598ef9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_c2ca46() {
+ textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c2ca46();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl
new file mode 100644
index 0000000..fcca551
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_cb3b0b() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_cb3b0b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..643e053
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_cb3b0b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_cb3b0b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..643e053
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_cb3b0b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_cb3b0b();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl
new file mode 100644
index 0000000..7d048d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_cb3b0b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_cb3b0b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl
new file mode 100644
index 0000000..070eb53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_cb3b0b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_cb3b0b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_cb3b0b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..8220c1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_cb3b0b "textureStore_cb3b0b"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_cb3b0b = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d7d2c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
+
+fn textureStore_cb3b0b() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_cb3b0b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl
new file mode 100644
index 0000000..aff8c5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_d26166() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d26166();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f98702f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d26166();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d26166();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d26166();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f98702f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+ arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d26166();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d26166();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d26166();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl
new file mode 100644
index 0000000..ac9e79c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_d26166();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_d26166();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_d26166();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl
new file mode 100644
index 0000000..ea57840
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_d26166(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_d26166(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_d26166(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm
new file mode 100644
index 0000000..b619746
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_d26166 "textureStore_d26166"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+ %v4uint = OpTypeVector %uint 4
+ %21 = OpConstantNull %v4uint
+ %22 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_d26166 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+ %24 = OpLabel
+ %25 = OpFunctionCall %void %textureStore_d26166
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %27 = OpLabel
+ %28 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %28
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_d26166
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_d26166
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ae6acf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
+
+fn textureStore_d26166() {
+ textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d26166();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl
new file mode 100644
index 0000000..0430ac6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_d82b0a() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d82b0a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9eb672e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d82b0a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d82b0a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9eb672e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d82b0a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d82b0a();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl
new file mode 100644
index 0000000..6baa1cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_d82b0a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_d82b0a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl
new file mode 100644
index 0000000..283430c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_d82b0a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_d82b0a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_d82b0a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm
new file mode 100644
index 0000000..78fb6b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_d82b0a "textureStore_d82b0a"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_d82b0a = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl
new file mode 100644
index 0000000..840ebef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
+
+fn textureStore_d82b0a() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d82b0a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl
new file mode 100644
index 0000000..a285481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_db92a2() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_db92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0cc9f6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_db92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_db92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0cc9f6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_db92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_db92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..67c6b85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_db92a2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_db92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl
new file mode 100644
index 0000000..1e319a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_db92a2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_db92a2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_db92a2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..e708f64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_db92a2 "textureStore_db92a2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_db92a2 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %20 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_db92a2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_db92a2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_db92a2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..3d6717e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
+
+fn textureStore_db92a2() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_db92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl
new file mode 100644
index 0000000..77739a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_de4b94() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_de4b94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e830000
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_de4b94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_de4b94();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e830000
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+ arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_de4b94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_de4b94();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl
new file mode 100644
index 0000000..83e4696
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_de4b94();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_de4b94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl
new file mode 100644
index 0000000..8402154
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_de4b94(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_de4b94(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_de4b94(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm
new file mode 100644
index 0000000..b5ffea9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_de4b94 "textureStore_de4b94"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v4int = OpTypeVector %int 4
+ %22 = OpConstantNull %v4int
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_de4b94 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %uint_1 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_de4b94
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_de4b94
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_de4b94
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl
new file mode 100644
index 0000000..bdd4cad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
+
+fn textureStore_de4b94() {
+ textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_de4b94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl
new file mode 100644
index 0000000..b7e07e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_e7c6d8() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e7c6d8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87e9182
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e7c6d8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e7c6d8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87e9182
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+ arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e7c6d8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e7c6d8();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl
new file mode 100644
index 0000000..9943f8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_e7c6d8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_e7c6d8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl
new file mode 100644
index 0000000..85510ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_e7c6d8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_e7c6d8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_e7c6d8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e9be8b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_e7c6d8 "textureStore_e7c6d8"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %20 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_e7c6d8 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %uint_1 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+ %22 = OpLabel
+ %23 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %25 = OpLabel
+ %26 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %26
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e17151
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
+
+fn textureStore_e7c6d8() {
+ textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e7c6d8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl
new file mode 100644
index 0000000..8d6a6aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_e8cbf7() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e8cbf7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c5cfb67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e8cbf7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e8cbf7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c5cfb67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+ arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e8cbf7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e8cbf7();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl
new file mode 100644
index 0000000..2b6995d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+ textureStore_e8cbf7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+ textureStore_e8cbf7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl
new file mode 100644
index 0000000..e263440
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) {
+ tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_e8cbf7(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_e8cbf7(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_e8cbf7(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..38ad68a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_e8cbf7 "textureStore_e8cbf7"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %20 = OpConstantNull %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+ %23 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_e8cbf7 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %20 %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+ %25 = OpLabel
+ %26 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %28 = OpLabel
+ %29 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %29
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..33cb1d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
+
+fn textureStore_e8cbf7() {
+ textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e8cbf7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl
new file mode 100644
index 0000000..e73dc3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_f1e6d3() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_f1e6d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b02d310
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_f1e6d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_f1e6d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b02d310
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+ arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_f1e6d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_f1e6d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl
new file mode 100644
index 0000000..ba30681
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+ textureStore_f1e6d3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+ textureStore_f1e6d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl
new file mode 100644
index 0000000..06ddbc1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) {
+ tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_f1e6d3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_f1e6d3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_f1e6d3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b45b31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_f1e6d3 "textureStore_f1e6d3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %21 = OpConstantNull %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+ %24 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_f1e6d3 = OpFunction %void None %13
+ %16 = OpLabel
+ %18 = OpLoad %11 %arg_0
+ OpImageWrite %18 %21 %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..a68c2ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
+
+fn textureStore_f1e6d3() {
+ textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_f1e6d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl
new file mode 100644
index 0000000..323cd36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl
@@ -0,0 +1,44 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_fcbe66() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_fcbe66();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1b554d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_fcbe66();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_fcbe66();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1b554d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+ arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_fcbe66();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_fcbe66();
+ return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl
new file mode 100644
index 0000000..87b611e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+ textureStore_fcbe66();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+ textureStore_fcbe66();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl
new file mode 100644
index 0000000..c2349be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_fcbe66(texture3d<float, access::write> tint_symbol_1) {
+ tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_fcbe66(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_fcbe66(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_fcbe66(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm
new file mode 100644
index 0000000..6617ea5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_fcbe66 "textureStore_fcbe66"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %20 = OpConstantNull %v3uint
+ %21 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_fcbe66 = OpFunction %void None %12
+ %15 = OpLabel
+ %17 = OpLoad %11 %arg_0
+ OpImageWrite %17 %20 %5
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+ %23 = OpLabel
+ %24 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %26 = OpLabel
+ %27 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %27
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b58eeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
+
+fn textureStore_fcbe66() {
+ textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_fcbe66();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
index 2e4508d..f1f3224 100644
--- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_06794e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000204EECC7200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
index 4f8832f..b4a69e2 100644
--- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_5edd96();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000292A0E96D40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
index cc78b8f..208ae1c 100644
--- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_5f36bf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237E1607910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
index a45d63b..ed7f50f 100644
--- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_7be8b2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EDDB33C1F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
index ec91e0b..0ac951e 100644
--- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_844869();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F000A07970(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
index 7a4521b..bb6fb91 100644
--- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_8c06ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028A648373A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
index dd484fc..d92de90 100644
--- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_b9ad1f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E12EBEEBC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
index 0fdbfb1..8103bfb 100644
--- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_d6faec();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002356649E890(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
index 16ac417..0429c73 100644
--- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
transpose_faeb05();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019548DF3C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
index e27ff8b..d25fa79 100644
--- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
trunc_103ab8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CEF83F530(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
index 003cc1e..58542bd 100644
--- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
trunc_a56109();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C5ED1620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
index afe8dc6..ad2b8b9 100644
--- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
trunc_cc2b0d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
index 08aa6d3..e591b7f 100644
--- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
trunc_ce7c17();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000235C1E68810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
index 5e90e2d..12b231a 100644
--- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
abs_421ca3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C922E88770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C922E88770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
index 1f4e9ce..daeb777 100644
--- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
abs_538d29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8FDD307F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8FDD307F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
index dc15e74..88125e3 100644
--- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
abs_5ae4fe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000183992C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000183992C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
index 891b948..23b1f74 100644
--- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
abs_fd247f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C33CE4C600(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C33CE4C600(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
index 6332759..6b1ebd0 100644
--- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
acos_004aff();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000014A098A05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000014A098A05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
index 388e412..67c0aa3 100644
--- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
acos_203628();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000227066CF430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000227066CF430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
index 48013a1..949afd2 100644
--- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
acos_303e3d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C6C153CEA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C6C153CEA0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
index 9b3376d..3b14b67 100644
--- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
acos_f47057();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000287C9AECA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000287C9AECA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
index bfa965b..c117b61 100644
--- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
acosh_5f49d8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002311F9F6BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
index ca1ca13..042317e 100644
--- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
acosh_a37dfe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D63F571640(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
index f2776f0..6265bcb 100644
--- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
acosh_de60d8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E640184D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
index a531094..d89968c 100644
--- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
acosh_f56574();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027554446BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RO {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RO {
^^^^^^
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
SKIP: FAILED
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
arg_0: array<f16>,
^^^^^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
/* align(2) size(2) */ struct SB_RW {
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
/* */ };
struct SB_RW {
^^^^^^
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
^^^^^
diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
index 806254c..20abaf0 100644
--- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
asin_11dfda();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D54DD58900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D54DD58900(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
index c95a38d..0c2024e 100644
--- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
asin_2d8e29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000243E5218C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000243E5218C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
index 16015bb..746cafe 100644
--- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
asin_3cfbd4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019720581EE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019720581EE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
index 729a746..fabbdb2 100644
--- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
asin_b4aced();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000274BBD1CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000274BBD1CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
index dcbf450..d8d7a07 100644
--- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
asinh_468a48();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002776ED11E20(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
index 60b07b0..21e7f11 100644
--- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
asinh_95ab2b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002E3B2D56BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
index 2bec5b5..1312d34 100644
--- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
asinh_ad8f8b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8AF6F1580(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
index 75a4736..28c45da 100644
--- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
asinh_fb5e8c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B966509E00(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
index 04ac231..ba6935d 100644
--- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
atan_19faea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F5B44507F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F5B44507F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
index b1775ff..4000184 100644
--- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
atan_1e1764();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015CC8119100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015CC8119100(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
index 7eeb502..cb19bf0 100644
--- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
atan_a5f421();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E218212B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E218212B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
index 1fae88d..c6c5603 100644
--- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
atan_a7ba61();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000193197C2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000193197C2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
index 7952947..3cd3e43 100644
--- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
atan2_21dfea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
index cdf1948..0c18f34 100644
--- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
atan2_93febc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
index 044e1b8..0cba786 100644
--- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
atan2_ca698e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000284FEEEF860(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000284FEEEF860(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
index 926647d..2213c7c 100644
--- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
atan2_d983ab();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
index c08dcf6..b4b103d 100644
--- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
atanh_5bf88d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000223A4C149E0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
index b725226..e79deef 100644
--- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
atanh_d2d8cd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000275850EA270(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
index a96d584..e1d03df 100644
--- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
atanh_e3b450();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C82047E7C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
index c96a0ee..ddda081 100644
--- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
atanh_ec4b06();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AC957584B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
index 75dab64..3102431 100644
--- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
ceil_09bf52();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A987B49660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A987B49660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
index c34ea03..87fd945 100644
--- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
ceil_18c240();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F7F15A6FA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F7F15A6FA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
index c01139b..3761d12 100644
--- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
ceil_4bca2a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CF8246830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CF8246830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
index ecdbf03..9285041 100644
--- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
ceil_f3f889();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002391D5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002391D5D1160(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
index 1169ce4..ef2952b 100644
--- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
clamp_235b29();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
index 946d07a..21a3aec 100644
--- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
clamp_2c251b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
index 6c663b8..85b3969 100644
--- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
clamp_553ffb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022BE4491540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022BE4491540(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
index 87a16e6..fd0e57e 100644
--- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
clamp_b195eb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
index 6a8d875..06f97cd 100644
--- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cos_0835a8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB6F714B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB6F714B0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
index 01410b8..92c2a80 100644
--- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cos_0a89f7();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012D2C4B1DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012D2C4B1DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
index 856b91f..c1e3823 100644
--- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cos_5bc2c6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021A2289CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021A2289CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
index fb57ccb..9381bca 100644
--- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cos_fc047d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023368939570(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023368939570(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
index daec563..02541f9 100644
--- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cosh_2ed778();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025119222EB0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025119222EB0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
index 5838354..ed7b63b 100644
--- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cosh_3b7bbf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023E2A2C07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023E2A2C07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
index a35fa62..4237902 100644
--- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cosh_43b672();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000244BAA52310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000244BAA52310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
index 86a786d..0a013b6 100644
--- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
cosh_b1b8a0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FD1882B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FD1882B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
index 9c32ca7..296baa1 100644
--- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
cross_9857cb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
index dc4b54a..2fc1013 100644
--- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
degrees_3055d3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000151C0FBF8C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
index 32b3d34..4d2d201 100644
--- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
degrees_5e9805();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020047AF8DA0(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
index 5066e38..71e7b58 100644
--- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
degrees_dfe8f4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000192E8B81620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
index b378860..cee3765 100644
--- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
degrees_f59715();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022454CA0150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
index 3db7954..6488184 100644
--- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
determinant_32bfde();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
index d769802..08dfa53 100644
--- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
determinant_d7c86f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
index a06af79..e3bcce0 100644
--- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
determinant_fc12a5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
index 019f6af..0804174 100644
--- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
distance_7272f3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
index 42c0407..4377906 100644
--- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
distance_7d201f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A788F9640(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A788F9640(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
index e6d94bf..b093422 100644
--- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
distance_892a5d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
index 354f95e..b3c81f0 100644
--- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
distance_928fa0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
index ad26057..a32263f 100644
--- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
dot_8e40f1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
index 2a3cca8..83129f5 100644
--- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
dot_cd5a04();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
index 67a0bee..f193fc7 100644
--- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
dot_d0d179();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index 733f9e5..b5bc698 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -37,6 +37,3 @@
dot4I8Packed_881e62();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A416C12830(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
-
diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
index 2189322..78cb718 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
@@ -25,4 +25,7 @@
dot4I8Packed_881e62();
}
-Failed to generate: error: Unknown import method: dot4I8Packed
+Failed to generate: builtins/gen/var/dot4I8Packed/881e62.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index fef2404..fb71ba6 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -37,6 +37,3 @@
dot4U8Packed_fbed7b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000191724B1570(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
-
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
index 4ca1d46..be47b5c 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
@@ -25,4 +25,7 @@
dot4U8Packed_fbed7b();
}
-Failed to generate: error: Unknown import method: dot4U8Packed
+Failed to generate: builtins/gen/var/dot4U8Packed/fbed7b.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
index ebcc65f..0c64a84 100644
--- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp_13806d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002270EAE6F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002270EAE6F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
index 0f2359d..4a68530 100644
--- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp_2e08e2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256E60D6F90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256E60D6F90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
index 30ab783..9caffbf 100644
--- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp_611a87();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002855D95D650(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002855D95D650(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
index ad6ebca..1b4b45a 100644
--- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp_c18fe9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE86501340(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE86501340(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
index aaf1ee1..4736202 100644
--- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp2_151a4c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F32148910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F32148910(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
index 3284d6f..43e987d 100644
--- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp2_751377();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028B810B9560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028B810B9560(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
index dad6555..2cd60f8 100644
--- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp2_b408e4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CEFA5170D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CEFA5170D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
index 87e544c..bd4753b 100644
--- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
exp2_ffa827();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E8001E07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E8001E07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
index 13e64eb..a31db9b 100644
--- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
faceForward_524986();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
index a1942e93..69747ce 100644
--- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
faceForward_cc63dc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
index 68f1d02..8f3d052 100644
--- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
faceForward_fb0f2e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
index e347826..d326422 100644
--- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
floor_3802c0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CFD3102AA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CFD3102AA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
index 04bf97a..0bf7dca 100644
--- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
floor_84658c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000208743D86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000208743D86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
index b670bde..6b49520 100644
--- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
floor_a2d31b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020277229EB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020277229EB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
index 04d8270..622c043 100644
--- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
floor_b6e09c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FC8E37C9F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FC8E37C9F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
index 4cc79d7..acfcf1a 100644
--- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
fma_ab7818();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
index c30ed3a..84e6b2a 100644
--- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
fma_bf21b6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
index 0085a06..d030535 100644
--- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
fma_c8abb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001545EC319C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001545EC319C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
index 0866b5c..64f994a 100644
--- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
fma_e7abdc();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
index 87fc1a1..0c48407 100644
--- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
fract_181aa9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000290A4231990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000290A4231990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
index bf6c7ae..56d1880 100644
--- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
fract_498c77();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8576786D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8576786D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
index 6771ca7..4b65f46 100644
--- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
fract_958a1d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002450F006F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002450F006F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
index c481b82..e8e9fa1 100644
--- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
fract_eb38ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B27352E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B27352E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
index c514368..507defa 100644
--- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
frexp_3dd21e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B0820A2F50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
index e4e360f..765ece2 100644
--- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
frexp_5257dd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029E12ED17D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
index 82d183a..5b4c0ab 100644
--- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
frexp_5f47bf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002974137DC80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
index 31c17af..862b97d 100644
--- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
frexp_ae4a66();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B22CBDA70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
index 68da594..6353e2e 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
inverseSqrt_440300();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CC4502790(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CC4502790(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
index 13b4979..2f8cf5c 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
inverseSqrt_5f51f8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002676056B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002676056B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
index 4fd1981..2531da9 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
inverseSqrt_b85ebd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000214452BD540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000214452BD540(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
index 5079fc1..681772a 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
inverseSqrt_cbdc70();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C10401C30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C10401C30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
index e19db38..9ae2336 100644
--- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
ldexp_3d90b4();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000297E2767C20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000297E2767C20(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
index 77d2859..3a434be 100644
--- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
ldexp_624e0c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8D38A1580(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8D38A1580(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
index fa06333..9f483e1 100644
--- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
ldexp_7485ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001553C486F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001553C486F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
index 07506fc..2b90260 100644
--- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
ldexp_7fa13c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020AEA25D620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020AEA25D620(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
index 01eb851..3c23526 100644
--- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
length_3f0e13();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
index 4ea492e..b5542b5 100644
--- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
length_5b1a9b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
index 1629874..422bf1d 100644
--- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
length_ba16d6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
index ff57d0b..51ff282 100644
--- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
length_c158da();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000229284770C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000229284770C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
index 0ea573c..f6fed76 100644
--- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log_6ff86f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029DD70F8770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029DD70F8770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
index 5c7cd72..c8f8fb2 100644
--- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log_8f0e32();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A51B8C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A51B8C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
index 5929a1c..1842fc3 100644
--- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log_c9f489();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000242D2E74480(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000242D2E74480(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
index 52bc9ae..8e10438 100644
--- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log_cdbdc1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002F51ED070D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002F51ED070D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
index 2bdd289..a064161 100644
--- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log2_38b478();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021830188770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021830188770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
index 64e5e4a..00d4694 100644
--- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log2_776088();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FF2A6D2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FF2A6D2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
index d5a8f48..b2942db 100644
--- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log2_8c10b3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002320D6B2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002320D6B2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
index c6e2e2b..c887b557 100644
--- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
log2_fb9f0b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000196C422E8F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000196C422E8F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
index 15b4bff..33ea840 100644
--- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
max_111ac0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261ECC86E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261ECC86E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
index 6402eb7..4479358 100644
--- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
max_34956e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
index 3f48199..517ecfd 100644
--- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
max_445169();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
index 1251ca9..5f4ea88 100644
--- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
max_e14f2b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
index 1e7afd7..62d0a13 100644
--- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
min_7c710a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
index 5da4fb5..a92ab98 100644
--- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
min_ab0acd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
index 77aa23f..8274c9c 100644
--- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
min_ac84d6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000216706F6E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000216706F6E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
index 7a24d5d..b29a781 100644
--- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
min_e780f9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
index f7267d2..7a960c5 100644
--- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
mix_38cbbb();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000265C36E19E0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000265C36E19E0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
index a54e8bd..28746be 100644
--- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_63f2fd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
index 034d036..bc20a21 100644
--- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_98ee3e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
index c8b6210..b076788 100644
--- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_c1aec6();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
index 088d879..9a64812 100644
--- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_e46a83();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
index 7e6e6f0..bc1e9cc 100644
--- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_ee2468();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
index 97176f9..07c8f81 100644
--- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
mix_f1a543();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
index 64e0fc4..f603a26 100644
--- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
modf_45005f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022A03927740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
index db80c1f..a744ba3 100644
--- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
modf_8dbbbf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A838D20100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
index d2a2137..c859c5c 100644
--- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
modf_995934();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022D4D8C17A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
index 412c83d..c31eba6 100644
--- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
modf_a545b9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F329190D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
index 0515aa9..446e72a 100644
--- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
normalize_39d5ec();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F4DE48920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F4DE48920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
index ef29d84..aefa43f 100644
--- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
normalize_7990f3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000234A30F1570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000234A30F1570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
index 04068803..99e6565 100644
--- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
normalize_b8cb8d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021732CD97D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021732CD97D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
index 11cb081..7b02c07 100644
--- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
pow_4f33b2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
index a893034..4af4f1a 100644
--- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
pow_ce9ef5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001987C544730(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001987C544730(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
index 49f883c..fd19bd5 100644
--- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
pow_f37b25();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
index 9bad326..90c9918 100644
--- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
pow_fa5429();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
index d26e91e..697a96d 100644
--- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
radians_208fd9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025E7A643540(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
index e58dd03..b93f28d 100644
--- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
radians_44f20b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F25F161620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
index ca0996d..d824c99 100644
--- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
radians_7ea4c7();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CCED30150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
index 0ea92ab..61dd8b0 100644
--- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
radians_fbacf0();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002290DE021A0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
index 30317a4..84245f1 100644
--- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
reflect_310de5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
index 7f3977e..a9f8023 100644
--- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
reflect_61ca21();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
index 7979837..36a346f 100644
--- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
reflect_bb15ac();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
index 9201cef..bb32e3b 100644
--- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
refract_0594ba();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
index 7d3be7d..b4f13e0 100644
--- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
refract_570cb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
index 260d085..3f0f6be 100644
--- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
refract_8984af();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
index b1f7b10..9ac2d12 100644
--- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
round_9078ef();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E2DBC1640(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E2DBC1640(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
index 95b83e2..4e5f123 100644
--- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
round_d87e84();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013FF5D11570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013FF5D11570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
index 64c5a88..921ccde 100644
--- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
round_e1bba2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DBC8633250(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DBC8633250(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
index b1bdd81..5a06695 100644
--- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
round_f665b5();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023EB7FA70D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023EB7FA70D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
index 7a4deca..5f02aae 100644
--- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
saturate_462535();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000001DC3F306920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x000001DC3F306920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
index 314bc8a..0ef67b8 100644
--- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
saturate_cd2028();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000112C07589F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x00000112C07589F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
index 75dd778..3f92fa4 100644
--- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
saturate_dcde71();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x0000023B2F7F4970(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x0000023B2F7F4970(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
index 3a649ba..5c2b820 100644
--- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
saturate_e8df56();
return;
}
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000001DB75B70300(2,3-11): error X3000: unrecognized identifier 'float16_t'
-C:\src\dawn\test\tint\Shader@0x000001DB75B70300(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
index e8c0804..91c838c 100644
--- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
select_10e73b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B6F116BCD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B6F116BCD0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
index a7ddf09..ac216fa 100644
--- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_1ada2a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
index 41ea9bf..50237cf 100644
--- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_53d518();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
index 844a4b7..c171292 100644
--- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_830dd9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
index 341d518..f4865d5 100644
--- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_86f9bd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
index 9ac9d28..6a64b7e 100644
--- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_a081f1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
index 89935f9..23bf4d5 100644
--- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
select_ed7c13();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
index 15614dd..3359004 100644
--- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sign_160933();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D74F9AEFE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D74F9AEFE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
index 0f5e127..9d8131c 100644
--- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sign_5d283a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025242B02410(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025242B02410(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
index f270ceb..ae76047 100644
--- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sign_7c85ea();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025B195644F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025B195644F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
index 2756198..735e750 100644
--- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sign_ccdb3c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F56D505E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F56D505E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
index 06f82a8..8b8d223 100644
--- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sin_2c903b();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022899018770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022899018770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
index 8ea97b8..9fe0a31 100644
--- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sin_3cca11();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FCDD1705E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FCDD1705E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
index cf3f4d4..26a60e2 100644
--- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sin_5c0712();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000260A64A2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000260A64A2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
index 40199e2..4ce2ce2 100644
--- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sin_66a59f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001826042C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001826042C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
index 218f8d2..010bd52 100644
--- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sinh_0908c1();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A72348830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A72348830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
index 7029997..1204a4a 100644
--- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sinh_69cce2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002177048C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002177048C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
index 65bd9a3..c12d5f5 100644
--- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sinh_924f19();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023F87A98990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023F87A98990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
index 6d013e8..beeee6f 100644
--- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sinh_ba7e25();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CF8F9907F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CF8F9907F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
index 8bc9391..e31f56f 100644
--- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
smoothstep_12c031();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
index e740197..b5bdb64 100644
--- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
smoothstep_586e12();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CA5325EE80(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CA5325EE80(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
index dd99645..6fb59fa 100644
--- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
smoothstep_6e7a74();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
index dcf7052..f41d30c 100644
--- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
smoothstep_c43ebd();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
index 888036e..41d7162 100644
--- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sqrt_803d1c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017B75EA30C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017B75EA30C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
index 68388d4..a0cf37a 100644
--- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sqrt_895a0c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000173DFA01300(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000173DFA01300(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
index 2dae4c2..64f1ffc 100644
--- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sqrt_d9ab4d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261E9DA1200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261E9DA1200(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
index 9a31e13..3fedcd9 100644
--- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
sqrt_ec33e9();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A68F39AB60(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A68F39AB60(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
index f643e8f..e7aee04 100644
--- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
step_07cb06();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
index 1d7db44..4818e72 100644
--- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
step_630d07();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024979951900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024979951900(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
index 7bae936..8328420 100644
--- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
step_baa320();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
index 285ad21..29ed50d 100644
--- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
step_cc6b61();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
index c932938..a89a0d1 100644
--- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tan_539e54();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE30C0C880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE30C0C880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
index bfffaf2..1e2d978 100644
--- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tan_9f7c9c();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013C12D4B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013C12D4B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
index 6df8e23..44dc465 100644
--- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tan_d4d491();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026911B52E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026911B52E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
index 2c6f4b3..7520c26 100644
--- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tan_db0456();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CB9A7E270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CB9A7E270(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
index a8775d6..09a20f1 100644
--- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tanh_06a4fe();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028509F68770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028509F68770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
index 8c81022..796f6e4 100644
--- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tanh_5b19af();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A07EE64130(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A07EE64130(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
index 56aff70..5011426 100644
--- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tanh_6d105a();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022C76563400(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022C76563400(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
index 4ce0631..8c4f0ad 100644
--- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
tanh_e8efb3();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C348DBBA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C348DBBA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
new file mode 100644
index 0000000..5f926ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<i32>
+fn textureDimensions_0a1ce8() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0a1ce8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a8a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0a1ce8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a8a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0a1ce8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0a1ce8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
new file mode 100644
index 0000000..ef24d5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_0a1ce8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_0a1ce8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
new file mode 100644
index 0000000..da0abf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0a1ce8(depth2d_array<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_0a1ce8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0a1ce8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0a1ce8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e9dc56
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0a1ce8 "textureDimensions_0a1ce8"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0a1ce8 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_0a1ce8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
new file mode 100644
index 0000000..cec85de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_0a1ce8() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0a1ce8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
new file mode 100644
index 0000000..dbc0ee9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> i32
+fn textureDimensions_0d7633() {
+ var arg_1 = 1u;
+ var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0d7633();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5653b0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0d7633();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0d7633();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5653b0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0d7633();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0d7633();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
new file mode 100644
index 0000000..91d58d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_0d7633();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_0d7633();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_0d7633();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
new file mode 100644
index 0000000..5e838d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0d7633(texture1d<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+ textureDimensions_0d7633(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0d7633(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0d7633(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
new file mode 100644
index 0000000..4991015
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0d7633 "textureDimensions_0d7633"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+%_ptr_Function_int = OpTypePointer Function %int
+ %27 = OpConstantNull %int
+ %28 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0d7633 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_int Function %27
+ OpStore %arg_1 %uint_1
+ %23 = OpLoad %11 %arg_0
+ %24 = OpLoad %uint %arg_1
+ %22 = OpImageQuerySizeLod %int %23 %24
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %34
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_0d7633
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c00e85
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_0d7633() {
+ var arg_1 = 1u;
+ var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0d7633();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
new file mode 100644
index 0000000..b9abbbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_0e28d3() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0e28d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b2431e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0e28d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0e28d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b2431e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_0e28d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_0e28d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
new file mode 100644
index 0000000..fb1cefc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_0e28d3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_0e28d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
new file mode 100644
index 0000000..c37cac9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0e28d3(texturecube_array<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_0e28d3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_0e28d3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_0e28d3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..de08fb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_0e28d3 "textureDimensions_0e28d3"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_0e28d3 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_0e28d3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..32b59d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_0e28d3() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_0e28d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
new file mode 100644
index 0000000..39dfc95
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> i32
+fn textureDimensions_16f7cb() {
+ var arg_1 = 1u;
+ var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_16f7cb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..93f39f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_16f7cb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_16f7cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..93f39f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_16f7cb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_16f7cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
new file mode 100644
index 0000000..4997a45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_16f7cb();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_16f7cb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
new file mode 100644
index 0000000..153a6f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_16f7cb(texture1d<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+ textureDimensions_16f7cb(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_16f7cb(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_16f7cb(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..3664be0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_16f7cb "textureDimensions_16f7cb"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+ %27 = OpConstantNull %int
+ %28 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_16f7cb = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_int Function %27
+ OpStore %arg_1 %uint_1
+ %23 = OpLoad %11 %arg_0
+ %24 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %int %23 %24
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %34
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_16f7cb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15d59f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_16f7cb() {
+ var arg_1 = 1u;
+ var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_16f7cb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
new file mode 100644
index 0000000..006bfd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> i32
+fn textureDimensions_1e3981() {
+ var arg_1 = 1u;
+ var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_1e3981();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..31d4651
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_1e3981();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_1e3981();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..31d4651
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+ uint arg_1 = 1u;
+ int2 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+ int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_1e3981();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_1e3981();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
new file mode 100644
index 0000000..c87c594
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_1e3981();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_1e3981();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+ uint arg_1 = 1u;
+ int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_1e3981();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
new file mode 100644
index 0000000..ff14fe6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1e3981(texture1d<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_1e3981(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_1e3981(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_1e3981(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
new file mode 100644
index 0000000..14764a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_1e3981 "textureDimensions_1e3981"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+ %27 = OpConstantNull %int
+ %28 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_1e3981 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_int Function %27
+ OpStore %arg_1 %uint_1
+ %23 = OpLoad %11 %arg_0
+ %24 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %int %23 %24
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %33 = OpLabel
+ %34 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %34
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_1e3981
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
new file mode 100644
index 0000000..2c5e4ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_1e3981() {
+ var arg_1 = 1u;
+ var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_1e3981();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
new file mode 100644
index 0000000..62690e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_216688() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_216688();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..878e5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_216688();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_216688();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..878e5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_216688();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_216688();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
new file mode 100644
index 0000000..0a8a3e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_216688();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_216688();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_216688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
new file mode 100644
index 0000000..a75efa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_216688(texture2d_array<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_216688(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_216688(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_216688(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
new file mode 100644
index 0000000..ca7d09b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_216688 "textureDimensions_216688"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_216688 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_216688
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_216688
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_216688
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
new file mode 100644
index 0000000..1914b2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_216688() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_216688();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
new file mode 100644
index 0000000..c6ad068
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_220dc3() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_220dc3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..01303f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_220dc3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_220dc3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..01303f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_220dc3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_220dc3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
new file mode 100644
index 0000000..1c957c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_220dc3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_220dc3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_220dc3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
new file mode 100644
index 0000000..ee8e56e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_220dc3(texture2d<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_220dc3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_220dc3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_220dc3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
new file mode 100644
index 0000000..dd0cfd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_220dc3 "textureDimensions_220dc3"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_220dc3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_220dc3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
new file mode 100644
index 0000000..e377046
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_220dc3() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_220dc3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
new file mode 100644
index 0000000..3b083d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_2d4299() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_2d4299();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3e5b1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_2d4299();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_2d4299();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3e5b1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_2d4299();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_2d4299();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
new file mode 100644
index 0000000..3545ee2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_2d4299();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_2d4299();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_2d4299();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
new file mode 100644
index 0000000..2db62ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2d4299(texturecube_array<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+ textureDimensions_2d4299(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_2d4299(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_2d4299(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
new file mode 100644
index 0000000..2212170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_2d4299 "textureDimensions_2d4299"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_2d4299 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %22 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_2d4299
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ae3821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_2d4299() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_2d4299();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
new file mode 100644
index 0000000..8878859
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_4d42cf() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_4d42cf();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffe5165
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_4d42cf();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_4d42cf();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ffe5165
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_4d42cf();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_4d42cf();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
new file mode 100644
index 0000000..80a93e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_4d42cf();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_4d42cf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
new file mode 100644
index 0000000..3876b26
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4d42cf(texture2d<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+ textureDimensions_4d42cf(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_4d42cf(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_4d42cf(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
new file mode 100644
index 0000000..60daa9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_4d42cf "textureDimensions_4d42cf"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_4d42cf = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %22 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_4d42cf
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
new file mode 100644
index 0000000..46f0072
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_4d42cf() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_4d42cf();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
new file mode 100644
index 0000000..f4fd35d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_5331e0() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_5331e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a72144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_5331e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_5331e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a72144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_5331e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_5331e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
new file mode 100644
index 0000000..4d19c59
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_5331e0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_5331e0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_5331e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
new file mode 100644
index 0000000..4b62c26
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_5331e0(texture2d<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+ textureDimensions_5331e0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_5331e0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_5331e0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..57f4f74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_5331e0 "textureDimensions_5331e0"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_5331e0 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_5331e0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..632c211
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_5331e0() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_5331e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
new file mode 100644
index 0000000..aa317c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<i32>
+fn textureDimensions_647386() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_647386();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c55003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_647386();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_647386();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c55003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_647386();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_647386();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
new file mode 100644
index 0000000..f8b6013
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_647386();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_647386();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_647386();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
new file mode 100644
index 0000000..c2d57d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_647386(depthcube<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+ textureDimensions_647386(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_647386(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_647386(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
new file mode 100644
index 0000000..9421e4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_647386 "textureDimensions_647386"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_647386 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_647386
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_647386
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_647386
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
new file mode 100644
index 0000000..291fd11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_647386() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_647386();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
new file mode 100644
index 0000000..62b84fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_6eae7f() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_6eae7f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b39d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_6eae7f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_6eae7f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b39d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_6eae7f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_6eae7f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
new file mode 100644
index 0000000..d9dbf803
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_6eae7f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_6eae7f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
new file mode 100644
index 0000000..7560fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6eae7f(texturecube<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+ textureDimensions_6eae7f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_6eae7f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_6eae7f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
new file mode 100644
index 0000000..b794707
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_6eae7f "textureDimensions_6eae7f"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_6eae7f = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %22 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_6eae7f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
new file mode 100644
index 0000000..8205d78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_6eae7f() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_6eae7f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
new file mode 100644
index 0000000..623c316
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<i32>
+fn textureDimensions_71b9f4() {
+ var arg_1 = 1u;
+ var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_71b9f4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..407d300
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_71b9f4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_71b9f4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..407d300
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_71b9f4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_71b9f4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
new file mode 100644
index 0000000..6294f19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_71b9f4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_71b9f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
new file mode 100644
index 0000000..21a0b0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_71b9f4(texture3d<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+ textureDimensions_71b9f4(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_71b9f4(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_71b9f4(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..d48fdbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_71b9f4 "textureDimensions_71b9f4"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %28 = OpConstantNull %v3int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_71b9f4 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v3int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %22 = OpImageQuerySizeLod %v3int %24 %25
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_71b9f4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..816599d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_71b9f4() {
+ var arg_1 = 1u;
+ var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_71b9f4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
new file mode 100644
index 0000000..1ced4d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_7c8821() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_7c8821();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f7ce2e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_7c8821();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_7c8821();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f7ce2e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_7c8821();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_7c8821();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
new file mode 100644
index 0000000..bbb0144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_7c8821();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_7c8821();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_7c8821();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
new file mode 100644
index 0000000..e8839a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7c8821(texture2d_array<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+ textureDimensions_7c8821(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_7c8821(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_7c8821(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
new file mode 100644
index 0000000..33509d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_7c8821 "textureDimensions_7c8821"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_7c8821 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %22 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_7c8821
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
new file mode 100644
index 0000000..9baa51c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_7c8821() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_7c8821();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
new file mode 100644
index 0000000..3ea127b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_8d87ed() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_8d87ed();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..29572e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_8d87ed();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_8d87ed();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..29572e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_8d87ed();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_8d87ed();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
new file mode 100644
index 0000000..bbfcd7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_8d87ed();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_8d87ed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
new file mode 100644
index 0000000..9569829
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8d87ed(texturecube<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+ textureDimensions_8d87ed(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_8d87ed(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_8d87ed(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8f2408
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_8d87ed "textureDimensions_8d87ed"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_8d87ed = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_8d87ed
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
new file mode 100644
index 0000000..8b60de3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_8d87ed() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_8d87ed();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
new file mode 100644
index 0000000..55c8637
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<i32>
+fn textureDimensions_941d6e() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_941d6e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3288317
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_941d6e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_941d6e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3288317
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_941d6e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_941d6e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
new file mode 100644
index 0000000..596c594
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_941d6e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_941d6e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_941d6e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
new file mode 100644
index 0000000..23a2e59
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_941d6e(depth2d<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+ textureDimensions_941d6e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_941d6e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_941d6e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
new file mode 100644
index 0000000..3742022
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_941d6e "textureDimensions_941d6e"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_941d6e = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_941d6e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
new file mode 100644
index 0000000..28c022e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_941d6e() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_941d6e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
new file mode 100644
index 0000000..f13a2e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_95b2db() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_95b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08889aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_95b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_95b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..08889aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+ uint arg_1 = 1u;
+ int3 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_95b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_95b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..6fe419a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_95b2db();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_95b2db();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_95b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
new file mode 100644
index 0000000..da2b344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_95b2db(texturecube<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+ textureDimensions_95b2db(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_95b2db(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_95b2db(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..bd03b31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_95b2db "textureDimensions_95b2db"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %28 = OpConstantNull %v2int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_95b2db = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v2int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_95b2db
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..401bfba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_95b2db() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_95b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
new file mode 100644
index 0000000..a82b951
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<i32>
+fn textureDimensions_d1a23d() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_d1a23d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d05a16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_d1a23d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_d1a23d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d05a16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_d1a23d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_d1a23d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
new file mode 100644
index 0000000..acd0609
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_d1a23d();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_d1a23d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
new file mode 100644
index 0000000..d24c988
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d1a23d(depthcube_array<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+ textureDimensions_d1a23d(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_d1a23d(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_d1a23d(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea98181
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_d1a23d "textureDimensions_d1a23d"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_d1a23d = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_d1a23d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
new file mode 100644
index 0000000..291f42f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_d1a23d() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_d1a23d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
new file mode 100644
index 0000000..c027716
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_dc7798() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_dc7798();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1b5d48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_dc7798();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_dc7798();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1b5d48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_dc7798();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_dc7798();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
new file mode 100644
index 0000000..030e852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_dc7798();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_dc7798();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_dc7798();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
new file mode 100644
index 0000000..7b30672
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dc7798(texture2d_array<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+ textureDimensions_dc7798(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_dc7798(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_dc7798(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
new file mode 100644
index 0000000..433c03e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_dc7798 "textureDimensions_dc7798"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_dc7798 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_dc7798
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
new file mode 100644
index 0000000..f584475
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_dc7798() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_dc7798();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
new file mode 100644
index 0000000..6f4b6a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_e17db8() {
+ var arg_1 = 1u;
+ var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_e17db8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dbcc16e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_e17db8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_e17db8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dbcc16e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_e17db8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_e17db8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
new file mode 100644
index 0000000..bf89199
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+ textureDimensions_e17db8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+ textureDimensions_e17db8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+ uint arg_1 = 1u;
+ ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+ textureDimensions_e17db8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
new file mode 100644
index 0000000..e6437ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e17db8(texturecube_array<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+ textureDimensions_e17db8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_e17db8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_e17db8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
new file mode 100644
index 0000000..a04c591
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_e17db8 "textureDimensions_e17db8"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %30 = OpConstantNull %v2int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_e17db8 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v2int Function %30
+ OpStore %arg_1 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %24 = OpImageQuerySizeLod %v3int %26 %27
+ %21 = OpVectorShuffle %v2int %24 %24 0 1
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureDimensions_e17db8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
new file mode 100644
index 0000000..b1a7a1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_e17db8() {
+ var arg_1 = 1u;
+ var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_e17db8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
new file mode 100644
index 0000000..08e0d0c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<i32>
+fn textureDimensions_f32242() {
+ var arg_1 = 1u;
+ var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_f32242();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf7de13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_f32242();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_f32242();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf7de13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_f32242();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_f32242();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
new file mode 100644
index 0000000..85cceb2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_f32242();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_f32242();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_f32242();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
new file mode 100644
index 0000000..77b6336
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f32242(texture3d<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+ textureDimensions_f32242(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_f32242(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_f32242(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
new file mode 100644
index 0000000..614e908
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_f32242 "textureDimensions_f32242"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %28 = OpConstantNull %v3int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_f32242 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v3int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v3int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_f32242
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
new file mode 100644
index 0000000..a9d3ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_f32242() {
+ var arg_1 = 1u;
+ var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_f32242();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
new file mode 100644
index 0000000..31013b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<i32>
+fn textureDimensions_fbdfb6() {
+ var arg_1 = 1u;
+ var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_fbdfb6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6b9fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_fbdfb6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6b9fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+ uint arg_1 = 1u;
+ int4 tint_tmp;
+ arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+ int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureDimensions_fbdfb6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureDimensions_fbdfb6();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
new file mode 100644
index 0000000..62b4cbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+ textureDimensions_fbdfb6();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+ uint arg_1 = 1u;
+ ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+ textureDimensions_fbdfb6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
new file mode 100644
index 0000000..a9b385d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_fbdfb6(texture3d<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+ textureDimensions_fbdfb6(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureDimensions_fbdfb6(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureDimensions_fbdfb6(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
new file mode 100644
index 0000000..cb182db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability ImageQuery
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureDimensions_fbdfb6 "textureDimensions_fbdfb6"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %int = OpTypeInt 32 1
+ %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %28 = OpConstantNull %v3int
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureDimensions_fbdfb6 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v3int Function %28
+ OpStore %arg_1 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %21 = OpImageQuerySizeLod %v3int %24 %25
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureDimensions_fbdfb6
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b1a31e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_fbdfb6() {
+ var arg_1 = 1u;
+ var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureDimensions_fbdfb6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
new file mode 100644
index 0000000..472ed0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
+fn textureGather_0166ec() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_0166ec();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d0981dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+ float3 arg_3 = (0.0f).xxx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_0166ec();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_0166ec();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d0981dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+ float3 arg_3 = (0.0f).xxx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_0166ec();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_0166ec();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
new file mode 100644
index 0000000..0968a8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ vec3 arg_3 = vec3(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_0166ec();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ vec3 arg_3 = vec3(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_0166ec();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+ vec3 arg_3 = vec3(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_0166ec();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
new file mode 100644
index 0000000..c58d5a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_0166ec(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_0166ec(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_0166ec(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..d5f7045
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_0166ec "textureGather_0166ec"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %v4int = OpTypeVector %int 4
+ %28 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_0166ec = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_3
+ %24 = OpImageGather %v4int %29 %30 %uint_1
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGather_0166ec
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_0166ec
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_0166ec
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..fca6c70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_0166ec() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_0166ec();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
new file mode 100644
index 0000000..e7aeacf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_04fa78() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_04fa78();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9297a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_04fa78();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_04fa78();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9297a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_04fa78();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_04fa78();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl
new file mode 100644
index 0000000..ae9e2a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_04fa78();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_04fa78();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_04fa78();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
new file mode 100644
index 0000000..4a1a248
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_04fa78(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_04fa78(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_04fa78(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
new file mode 100644
index 0000000..e3140b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_04fa78 "textureGather_04fa78"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_04fa78 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_04fa78
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_04fa78
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_04fa78
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
new file mode 100644
index 0000000..de2c50b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_04fa78() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_04fa78();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
new file mode 100644
index 0000000..65736b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_11b2db() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_11b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5638aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+ float3 arg_3 = (0.0f).xxx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_11b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_11b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5638aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+ float3 arg_3 = (0.0f).xxx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_11b2db();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_11b2db();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..dc0f613
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec3 arg_3 = vec3(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_11b2db();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec3 arg_3 = vec3(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_11b2db();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+ vec3 arg_3 = vec3(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_11b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
new file mode 100644
index 0000000..d99c749
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_11b2db(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_11b2db(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_11b2db(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..0e70b08
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_11b2db "textureGather_11b2db"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %26 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_11b2db = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ %24 = OpLoad %14 %arg_2
+ %25 = OpLoad %11 %arg_1
+ %27 = OpSampledImage %26 %25 %24
+ %28 = OpLoad %v3float %arg_3
+ %23 = OpImageGather %v4float %27 %28 %uint_1
+ OpStore %res %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_11b2db
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_11b2db
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_11b2db
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..90c1647
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_11b2db() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_11b2db();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
new file mode 100644
index 0000000..7888218
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_17baac() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_17baac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9002334
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_17baac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_17baac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_17baac();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9002334
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_17baac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_17baac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_17baac();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
new file mode 100644
index 0000000..d40ca8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_17baac();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_17baac();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_17baac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
new file mode 100644
index 0000000..8843160
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_17baac(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_17baac(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_17baac(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa0a7ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_17baac "textureGather_17baac"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %42 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_17baac = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_17baac
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_17baac
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_17baac
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
new file mode 100644
index 0000000..708b14f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_17baac() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_17baac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
new file mode 100644
index 0000000..a58858c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_1bf0ab() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_1bf0ab();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f5b1e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_1bf0ab();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_1bf0ab();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f5b1e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_1bf0ab();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_1bf0ab();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
new file mode 100644
index 0000000..e7f08f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_1bf0ab();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_1bf0ab();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_1bf0ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
new file mode 100644
index 0000000..5040fe0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_1bf0ab(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_1bf0ab(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_1bf0ab(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..44eaae6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_1bf0ab "textureGather_1bf0ab"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_1bf0ab = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %35 = OpLoad %v2float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v3float %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_1bf0ab
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..75e5f39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_1bf0ab() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_1bf0ab();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
new file mode 100644
index 0000000..44f52d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_238ec4() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_238ec4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e49c257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_238ec4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_238ec4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e49c257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_238ec4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_238ec4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
new file mode 100644
index 0000000..680cf42
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_238ec4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_238ec4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_238ec4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
new file mode 100644
index 0000000..eeeca6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_238ec4(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_238ec4(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_238ec4(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
new file mode 100644
index 0000000..16698c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_238ec4 "textureGather_238ec4"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %42 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_238ec4 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_238ec4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_238ec4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_238ec4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
new file mode 100644
index 0000000..1e41345
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_238ec4() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_238ec4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl
new file mode 100644
index 0000000..8297c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_269250() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_269250();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6559297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_269250();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_269250();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_269250();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6559297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_269250();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_269250();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_269250();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
new file mode 100644
index 0000000..f3f577a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_269250();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_269250();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_269250();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
new file mode 100644
index 0000000..1e8f39c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_269250(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_269250(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_269250(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_269250(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
new file mode 100644
index 0000000..36bdfab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_269250 "textureGather_269250"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_269250 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_269250
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_269250
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_269250
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
new file mode 100644
index 0000000..e2c82c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_269250() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_269250();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
new file mode 100644
index 0000000..c2be9ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_2a4f40() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_2a4f40();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b3539d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_2a4f40();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_2a4f40();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b3539d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_2a4f40();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_2a4f40();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
new file mode 100644
index 0000000..bdf959d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+vec4 vertex_main() {
+ textureGather_2a4f40();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+void fragment_main() {
+ textureGather_2a4f40();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+void compute_main() {
+ textureGather_2a4f40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
new file mode 100644
index 0000000..e29dd88
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_2a4f40(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_2a4f40(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_2a4f40(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_2a4f40(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
new file mode 100644
index 0000000..f21c774
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_2a4f40 "textureGather_2a4f40"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_2a4f40 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %29 = OpLoad %14 %arg_1
+ %30 = OpLoad %11 %arg_0
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_2
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %int_0
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_2a4f40
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b827fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_2a4f40() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_2a4f40();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
new file mode 100644
index 0000000..6ca2fff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_4e8ac5() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_4e8ac5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7cd247
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_4e8ac5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_4e8ac5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b7cd247
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_4e8ac5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_4e8ac5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
new file mode 100644
index 0000000..6e29086
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_4e8ac5();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_4e8ac5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_4e8ac5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
new file mode 100644
index 0000000..da3939b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_4e8ac5(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_4e8ac5(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_4e8ac5(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_4e8ac5(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
new file mode 100644
index 0000000..32feb91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_4e8ac5 "textureGather_4e8ac5"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_4e8ac5 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_4e8ac5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
new file mode 100644
index 0000000..cb06b2a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_4e8ac5() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_4e8ac5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
new file mode 100644
index 0000000..c3bb248
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_59372a() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_59372a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e2af14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_59372a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_59372a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_59372a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e2af14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_59372a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_59372a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_59372a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
new file mode 100644
index 0000000..e93d50d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_59372a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_59372a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_59372a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
new file mode 100644
index 0000000..2299af0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_59372a(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_59372a(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_59372a(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
new file mode 100644
index 0000000..b38cf1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_59372a "textureGather_59372a"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %42 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_59372a = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_59372a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_59372a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_59372a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
new file mode 100644
index 0000000..84e71d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_59372a() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_59372a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
new file mode 100644
index 0000000..b47e75e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_6b7b74() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_6b7b74();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..691fd8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_6b7b74();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_6b7b74();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..691fd8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_6b7b74();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_6b7b74();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
new file mode 100644
index 0000000..bb9053c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_6b7b74();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_6b7b74();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_6b7b74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
new file mode 100644
index 0000000..188a667
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_6b7b74(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_6b7b74(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_6b7b74(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcb03e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_6b7b74 "textureGather_6b7b74"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %43 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %46 = OpConstantNull %v4uint
+ %47 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_6b7b74 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %46
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %35 = OpLoad %v2float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v3float %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_6b7b74
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..62867d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_6b7b74() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_6b7b74();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl
new file mode 100644
index 0000000..ac0b32b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_788010() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_788010();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..130a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_788010();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_788010();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_788010();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..130a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_788010();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_788010();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_788010();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl
new file mode 100644
index 0000000..ab20a08
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_788010();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_788010();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_788010();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
new file mode 100644
index 0000000..2c80712
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_788010(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_788010(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_788010(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_788010(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
new file mode 100644
index 0000000..d1df655
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_788010 "textureGather_788010"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_788010 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_788010
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_788010
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_788010
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
new file mode 100644
index 0000000..da05951
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_788010() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_788010();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
new file mode 100644
index 0000000..b781710
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_7dd226() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_7dd226();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..13f7566
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_7dd226();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_7dd226();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13f7566
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_7dd226();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_7dd226();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl
new file mode 100644
index 0000000..d7fca45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+vec4 vertex_main() {
+ textureGather_7dd226();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+void fragment_main() {
+ textureGather_7dd226();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+void compute_main() {
+ textureGather_7dd226();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
new file mode 100644
index 0000000..1c7b39b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_7dd226(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_7dd226(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_7dd226(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_7dd226(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc42b14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_7dd226 "textureGather_7dd226"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_7dd226 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %29 = OpLoad %14 %arg_1
+ %30 = OpLoad %11 %arg_0
+ %32 = OpSampledImage %31 %30 %29
+ %33 = OpLoad %v3float %arg_2
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %36 = OpCompositeExtract %float %33 2
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %int_0
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_7dd226
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_7dd226
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_7dd226
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
new file mode 100644
index 0000000..0e0eb90
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_7dd226() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_7dd226();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl
new file mode 100644
index 0000000..fdb7381
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_829357() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_829357();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..77abe9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_829357();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_829357();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_829357();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..77abe9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_829357();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_829357();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_829357();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl
new file mode 100644
index 0000000..ff8bc8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_829357();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_829357();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_829357();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
new file mode 100644
index 0000000..89c6bfb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_829357(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_829357(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_829357(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_829357(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
new file mode 100644
index 0000000..0e85359
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_829357 "textureGather_829357"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %42 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_829357 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %33 = OpLoad %v3float %arg_3
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %36 = OpCompositeExtract %float %33 2
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_829357
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_829357
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_829357
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
new file mode 100644
index 0000000..cddda4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_829357() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_829357();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
new file mode 100644
index 0000000..44ac499
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_8578bc() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8578bc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58ad0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8578bc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8578bc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58ad0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8578bc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8578bc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl
new file mode 100644
index 0000000..a3c29f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_8578bc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_8578bc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_8578bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
new file mode 100644
index 0000000..e802a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8578bc(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_8578bc(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_8578bc(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_8578bc(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c1c930
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_8578bc "textureGather_8578bc"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %42 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_8578bc = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %33 = OpLoad %v3float %arg_3
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %36 = OpCompositeExtract %float %33 2
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_8578bc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_8578bc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_8578bc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a4dd4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8578bc() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8578bc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
new file mode 100644
index 0000000..c94c858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
+fn textureGather_89680f() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_89680f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6d386c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+ float3 arg_3 = (0.0f).xxx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_89680f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_89680f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_89680f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6d386c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+ float3 arg_3 = (0.0f).xxx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_89680f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_89680f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_89680f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
new file mode 100644
index 0000000..6f98fe0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ vec3 arg_3 = vec3(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_89680f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ vec3 arg_3 = vec3(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_89680f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+ vec3 arg_3 = vec3(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_89680f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
new file mode 100644
index 0000000..e71f745
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_89680f(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_89680f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_89680f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_89680f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
new file mode 100644
index 0000000..700a3d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_89680f "textureGather_89680f"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %v4uint = OpTypeVector %uint 4
+ %28 = OpTypeSampledImage %11
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_89680f = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_3
+ %24 = OpImageGather %v4uint %29 %30 %uint_1
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_89680f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_89680f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_89680f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
new file mode 100644
index 0000000..47f8180
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_89680f() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_89680f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
new file mode 100644
index 0000000..0821f74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
+fn textureGather_8fae00() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8fae00();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f75e29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+ float2 arg_3 = (0.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8fae00();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8fae00();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f75e29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+ float2 arg_3 = (0.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_8fae00();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_8fae00();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
new file mode 100644
index 0000000..f787c2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_8fae00();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_8fae00();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_8fae00();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
new file mode 100644
index 0000000..55b262f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8fae00(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_8fae00(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_8fae00(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_8fae00(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
new file mode 100644
index 0000000..1739fb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_8fae00 "textureGather_8fae00"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %v4uint = OpTypeVector %uint 4
+ %28 = OpTypeSampledImage %11
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_8fae00 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %24 = OpImageGather %v4uint %29 %30 %uint_1
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_8fae00
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_8fae00
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_8fae00
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
new file mode 100644
index 0000000..69490b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8fae00() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_8fae00();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl
new file mode 100644
index 0000000..86df23b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_986700() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_986700();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..740ed2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+ float2 arg_3 = (0.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_986700();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_986700();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_986700();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..740ed2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+ float2 arg_3 = (0.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_986700();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_986700();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_986700();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
new file mode 100644
index 0000000..10921e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_986700();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_986700();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+ vec2 arg_3 = vec2(0.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_986700();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
new file mode 100644
index 0000000..024eebb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_986700(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_986700(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_986700(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
new file mode 100644
index 0000000..cca05f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_986700 "textureGather_986700"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %v4uint = OpTypeVector %uint 4
+ %28 = OpTypeSampledImage %11
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %34 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %37 = OpConstantNull %v4uint
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_986700 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %res = OpVariable %_ptr_Function_v4uint Function %37
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %24 = OpImageGather %v4uint %29 %30 %uint_1 ConstOffset %34
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_986700
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_986700
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_986700
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
new file mode 100644
index 0000000..eb8526e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_986700() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_986700();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
new file mode 100644
index 0000000..37a6cb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_a0372b() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a0372b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb8e7d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a0372b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a0372b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fb8e7d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a0372b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a0372b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
new file mode 100644
index 0000000..4df8d22
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_a0372b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_a0372b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_a0372b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
new file mode 100644
index 0000000..7a6f23d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a0372b(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_a0372b(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_a0372b(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_a0372b(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
new file mode 100644
index 0000000..79bf8c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_a0372b "textureGather_a0372b"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_a0372b = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %35 = OpLoad %v2float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v3float %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_a0372b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_a0372b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_a0372b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c3d9988
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_a0372b() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a0372b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
new file mode 100644
index 0000000..f58770c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_a68027() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a68027();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97ae67b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a68027();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a68027();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a68027();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97ae67b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_a68027();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_a68027();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_a68027();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
new file mode 100644
index 0000000..24ac721
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureGather_a68027();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+void fragment_main() {
+ textureGather_a68027();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+void compute_main() {
+ textureGather_a68027();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
new file mode 100644
index 0000000..6584b67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_a68027(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_a68027(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_a68027(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0830ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGather_a68027 "textureGather_a68027"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+ %v2int = OpTypeVector %int 2
+ %43 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_a68027 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %29 = OpLoad %14 %arg_1
+ %30 = OpLoad %11 %arg_0
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_2
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %43
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_a68027
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_a68027
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_a68027
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
new file mode 100644
index 0000000..f7aa73b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_a68027() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_a68027();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
new file mode 100644
index 0000000..f957864
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_bd33b6() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_bd33b6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dd45876
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_bd33b6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_bd33b6();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd45876
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_bd33b6();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_bd33b6();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
new file mode 100644
index 0000000..1895dfa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_bd33b6();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_bd33b6();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_bd33b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
new file mode 100644
index 0000000..7453f31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_bd33b6(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_bd33b6(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_bd33b6(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..f222d1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_bd33b6 "textureGather_bd33b6"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %v2int = OpTypeVector %int 2
+ %43 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %46 = OpConstantNull %v4int
+ %47 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_bd33b6 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %46
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_bd33b6
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..af77362
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_bd33b6() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_bd33b6();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
new file mode 100644
index 0000000..d975202
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_be276f() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_be276f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..076da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_be276f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_be276f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_be276f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..076da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_be276f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_be276f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_be276f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl
new file mode 100644
index 0000000..1cd067d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_be276f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_be276f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_be276f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
new file mode 100644
index 0000000..537029e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_be276f(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_be276f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_be276f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_be276f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
new file mode 100644
index 0000000..c43168e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_be276f "textureGather_be276f"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_be276f = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %34 = OpLoad %v3float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %37 = OpCompositeExtract %float %34 2
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_be276f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_be276f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_be276f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
new file mode 100644
index 0000000..6bcb853
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_be276f() {
+ const arg_0 = 1;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_be276f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
new file mode 100644
index 0000000..d841c27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
+fn textureGather_ccadde() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ccadde();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b760a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+ float2 arg_3 = (0.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ccadde();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ccadde();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b760a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+ float2 arg_3 = (0.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ccadde();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ccadde();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
new file mode 100644
index 0000000..5268f1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ccadde();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_ccadde();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_ccadde();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
new file mode 100644
index 0000000..47a6567
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ccadde(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ccadde(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ccadde(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ccadde(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8acb0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ccadde "textureGather_ccadde"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %v4int = OpTypeVector %int 4
+ %28 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ccadde = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %24 = OpImageGather %v4int %29 %30 %uint_1
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGather_ccadde
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_ccadde
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_ccadde
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
new file mode 100644
index 0000000..15cdbb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ccadde() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ccadde();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
new file mode 100644
index 0000000..284bfa6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_ce5578() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ce5578();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7df33ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ce5578();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ce5578();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7df33ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ce5578();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ce5578();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
new file mode 100644
index 0000000..ec03098
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ce5578();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_ce5578();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_ce5578();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
new file mode 100644
index 0000000..14a5c03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ce5578(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ce5578(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ce5578(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
new file mode 100644
index 0000000..54bd0b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ce5578 "textureGather_ce5578"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %43 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %46 = OpConstantNull %v4uint
+ %47 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ce5578 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %46
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %35 = OpLoad %v2float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v3float %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_ce5578
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_ce5578
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_ce5578
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
new file mode 100644
index 0000000..1246a35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ce5578() {
+ const arg_0 = 1;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ce5578();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
new file mode 100644
index 0000000..bd3e4df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_cf9112() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_cf9112();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cefff93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_cf9112();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_cf9112();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cefff93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_cf9112();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_cf9112();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
new file mode 100644
index 0000000..60d154e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_cf9112();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_cf9112();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_cf9112();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
new file mode 100644
index 0000000..0d762a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_cf9112(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_cf9112(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_cf9112(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
new file mode 100644
index 0000000..05debe8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_cf9112 "textureGather_cf9112"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %28 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %v2int = OpTypeVector %int 2
+ %43 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %46 = OpConstantNull %v4int
+ %47 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_cf9112 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %28
+ %res = OpVariable %_ptr_Function_v4int Function %46
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %15 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_cf9112
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_cf9112
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_cf9112
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
new file mode 100644
index 0000000..ac3035b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_cf9112() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_cf9112();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
new file mode 100644
index 0000000..529a2b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_d6507c() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d6507c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..158dc3c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+ float2 arg_3 = (0.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d6507c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d6507c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..158dc3c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+ float2 arg_3 = (0.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d6507c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d6507c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
new file mode 100644
index 0000000..493bc74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_d6507c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_d6507c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_d6507c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
new file mode 100644
index 0000000..2a6abf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_d6507c(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_d6507c(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_d6507c(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
new file mode 100644
index 0000000..6ea4db6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_d6507c "textureGather_d6507c"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %26 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_d6507c = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ %24 = OpLoad %14 %arg_2
+ %25 = OpLoad %11 %arg_1
+ %27 = OpSampledImage %26 %25 %24
+ %28 = OpLoad %v2float %arg_3
+ %23 = OpImageGather %v4float %27 %28 %uint_1 ConstOffset %33
+ OpStore %res %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGather_d6507c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_d6507c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_d6507c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
new file mode 100644
index 0000000..97e61e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d6507c() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d6507c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
new file mode 100644
index 0000000..c9d9eac8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_d8e958() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d8e958();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..03635a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+ float2 arg_3 = (0.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d8e958();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d8e958();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..03635a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+ float2 arg_3 = (0.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_d8e958();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_d8e958();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
new file mode 100644
index 0000000..ec027e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_d8e958();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+ textureGather_d8e958();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+ vec2 arg_3 = vec2(0.0f);
+ vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+ textureGather_d8e958();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
new file mode 100644
index 0000000..0cf129f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d8e958(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_d8e958(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_d8e958(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_d8e958(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
new file mode 100644
index 0000000..3800a97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_d8e958 "textureGather_d8e958"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %26 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_d8e958 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ %24 = OpLoad %14 %arg_2
+ %25 = OpLoad %11 %arg_1
+ %27 = OpSampledImage %26 %25 %24
+ %28 = OpLoad %v2float %arg_3
+ %23 = OpImageGather %v4float %27 %28 %uint_1
+ OpStore %res %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureGather_d8e958
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_d8e958
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_d8e958
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4776fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d8e958() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_d8e958();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
new file mode 100644
index 0000000..b51c3e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_dc6661() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_dc6661();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0fc31ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+ float2 arg_3 = (0.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_dc6661();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_dc6661();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0fc31ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+ float2 arg_3 = (0.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_dc6661();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_dc6661();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
new file mode 100644
index 0000000..98f224d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_dc6661();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+ textureGather_dc6661();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+ vec2 arg_3 = vec2(0.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+ textureGather_dc6661();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
new file mode 100644
index 0000000..479290e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_dc6661(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_dc6661(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_dc6661(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6e8142
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_dc6661 "textureGather_dc6661"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %v4int = OpTypeVector %int 4
+ %28 = OpTypeSampledImage %11
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+ %v2int = OpTypeVector %int 2
+ %34 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %37 = OpConstantNull %v4int
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_dc6661 = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+ %res = OpVariable %_ptr_Function_v4int Function %37
+ OpStore %arg_3 %21
+ %26 = OpLoad %15 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %24 = OpImageGather %v4int %29 %30 %uint_1 ConstOffset %34
+ OpStore %res %24
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_dc6661
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_dc6661
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_dc6661
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
new file mode 100644
index 0000000..b639399
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_dc6661() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ const arg_4 = vec2<i32>();
+ var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_dc6661();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
new file mode 100644
index 0000000..6d145fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_e2acac() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_e2acac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..57cafd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_e2acac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_e2acac();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..57cafd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+ float3 arg_3 = (0.0f).xxx;
+ uint arg_4 = 1u;
+ uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_e2acac();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_e2acac();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl
new file mode 100644
index 0000000..a4fd26f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_e2acac();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_e2acac();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+ vec3 arg_3 = vec3(0.0f);
+ uint arg_4 = 1u;
+ uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_e2acac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
new file mode 100644
index 0000000..1fdaddc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_e2acac(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_3 = float3(0.0f);
+ uint arg_4 = 1u;
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_e2acac(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_e2acac(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_e2acac(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6a7322
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_e2acac "textureGather_e2acac"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+ %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %32 = OpTypeSampledImage %11
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_e2acac = OpFunction %void None %16
+ %19 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_3 %21
+ OpStore %arg_4 %uint_1
+ %30 = OpLoad %15 %arg_2
+ %31 = OpLoad %11 %arg_1
+ %33 = OpSampledImage %32 %31 %30
+ %34 = OpLoad %v3float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %37 = OpCompositeExtract %float %34 2
+ %39 = OpLoad %uint %arg_4
+ %38 = OpConvertUToF %float %39
+ %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
+ %28 = OpImageGather %v4uint %33 %40 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_e2acac
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_e2acac
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %16
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_e2acac
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3fda10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_e2acac() {
+ const arg_0 = 1u;
+ var arg_3 = vec3<f32>();
+ var arg_4 = 1u;
+ var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_e2acac();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
new file mode 100644
index 0000000..dc6250b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_ea8eb4() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ea8eb4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0759fa5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ea8eb4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ea8eb4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0759fa5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+ float2 arg_3 = (0.0f).xx;
+ uint arg_4 = 1u;
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGather_ea8eb4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGather_ea8eb4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
new file mode 100644
index 0000000..87e62b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+ textureGather_ea8eb4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+ textureGather_ea8eb4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+ vec2 arg_3 = vec2(0.0f);
+ uint arg_4 = 1u;
+ vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+ textureGather_ea8eb4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
new file mode 100644
index 0000000..51fd170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ea8eb4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_3 = float2(0.0f);
+ uint arg_4 = 1u;
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGather_ea8eb4(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGather_ea8eb4(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGather_ea8eb4(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
new file mode 100644
index 0000000..e629bb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %textureGather_ea8eb4 "textureGather_ea8eb4"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ OpDecorate %arg_2 DescriptorSet 1
+ OpDecorate %arg_2 Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %31 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %42 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureGather_ea8eb4 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_3 %20
+ OpStore %arg_4 %uint_1
+ %29 = OpLoad %14 %arg_2
+ %30 = OpLoad %11 %arg_1
+ %32 = OpSampledImage %31 %30 %29
+ %34 = OpLoad %v2float %arg_3
+ %35 = OpCompositeExtract %float %34 0
+ %36 = OpCompositeExtract %float %34 1
+ %38 = OpLoad %uint %arg_4
+ %37 = OpConvertUToF %float %38
+ %39 = OpCompositeConstruct %v3float %35 %36 %37
+ %28 = OpImageGather %v4float %32 %39 %uint_1
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_ea8eb4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
new file mode 100644
index 0000000..5062f18
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ea8eb4() {
+ const arg_0 = 1u;
+ var arg_3 = vec2<f32>();
+ var arg_4 = 1u;
+ var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGather_ea8eb4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
new file mode 100644
index 0000000..f54540c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_144a9a() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ const arg_5 = vec2<i32>();
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_144a9a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..889e75c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_144a9a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..889e75c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_144a9a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_144a9a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
new file mode 100644
index 0000000..000522c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_144a9a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void compute_main() {
+ textureGatherCompare_144a9a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
new file mode 100644
index 0000000..2332e49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_144a9a(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_144a9a(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_144a9a(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..d2973ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_144a9a "textureGatherCompare_144a9a"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %49 = OpTypeFunction %v4float
+%textureGatherCompare_144a9a = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %46
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureGatherCompare_144a9a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..3544909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_144a9a() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ const arg_5 = vec2<i32>();
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_144a9a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
new file mode 100644
index 0000000..d6ea315
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_2e409c() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_2e409c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..625ef635
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_2e409c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..625ef635
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_2e409c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_2e409c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl
new file mode 100644
index 0000000..51c85b2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_2e409c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+ textureGatherCompare_2e409c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
new file mode 100644
index 0000000..bd7e100
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_2e409c(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_2e409c(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_2e409c(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_2e409c(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
new file mode 100644
index 0000000..e65e051
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_2e409c "textureGatherCompare_2e409c"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+%textureGatherCompare_2e409c = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageDrefGather %v4float %35 %42 %43
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGatherCompare_2e409c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
new file mode 100644
index 0000000..384d9fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_2e409c() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_2e409c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
new file mode 100644
index 0000000..0dd8c4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_b5bc43() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_b5bc43();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f663775
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_b5bc43();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f663775
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureGatherCompare_b5bc43();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureGatherCompare_b5bc43();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
new file mode 100644
index 0000000..5e394d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+ textureGatherCompare_b5bc43();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+ textureGatherCompare_b5bc43();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
new file mode 100644
index 0000000..24c567b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_b5bc43(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureGatherCompare_b5bc43(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureGatherCompare_b5bc43(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureGatherCompare_b5bc43(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
new file mode 100644
index 0000000..770ddcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureGatherCompare_b5bc43 "textureGatherCompare_b5bc43"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+%textureGatherCompare_b5bc43 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageDrefGather %v4float %35 %42 %43
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
new file mode 100644
index 0000000..a17ccf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_b5bc43() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureGatherCompare_b5bc43();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl
new file mode 100644
index 0000000..1500697
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureLoad(texture: texture_1d<i32>, coords: u32, level: u32) -> vec4<i32>
+fn textureLoad_0cb698() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_0cb698();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7746f30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_0cb698();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_0cb698();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7746f30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_0cb698();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_0cb698();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl
new file mode 100644
index 0000000..740326a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_0cb698();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_0cb698();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_0cb698();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl
new file mode 100644
index 0000000..b2bd1b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0cb698(texture1d<int, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ int4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+ textureLoad_0cb698(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_0cb698(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_0cb698(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm
new file mode 100644
index 0000000..d824044
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_0cb698 "textureLoad_0cb698"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_0cb698 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_uint Function %21
+ %res = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %uint_1
+ %25 = OpLoad %11 %arg_0
+ %26 = OpLoad %uint %arg_1
+ %27 = OpLoad %uint %arg_2
+ %23 = OpImageFetch %v4int %25 %26 Lod %27
+ OpStore %res %23
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_0cb698
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl
new file mode 100644
index 0000000..97cffac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureLoad_0cb698() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_0cb698();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
new file mode 100644
index 0000000..13db23e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
@@ -0,0 +1,45 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1bfdfb() {
+ var arg_1 = vec2<u32>();
+ var res: vec4<f32> = textureLoad(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1bfdfb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..814c344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,112 @@
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+ uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ const bool3 cond = (abs(v) < float3((params.D).xxx));
+ const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+ return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = float3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = plane0.Load(uint3(coord, 0u)).rgb;
+ } else {
+ color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = mul(color, params.gamutConversionMatrix);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+ const uint scalar_offset = ((offset + 0u)) / 4;
+ const uint scalar_offset_1 = ((offset + 16u)) / 4;
+ const uint scalar_offset_2 = ((offset + 32u)) / 4;
+ return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_3 = ((offset + 0u)) / 4;
+ const uint scalar_offset_4 = ((offset + 4u)) / 4;
+ const uint scalar_offset_5 = ((offset + 8u)) / 4;
+ const uint scalar_offset_6 = ((offset + 12u)) / 4;
+ const uint scalar_offset_7 = ((offset + 16u)) / 4;
+ const uint scalar_offset_8 = ((offset + 20u)) / 4;
+ const uint scalar_offset_9 = ((offset + 24u)) / 4;
+ const uint scalar_offset_10 = ((offset + 28u)) / 4;
+ const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_11 = ((offset + 0u)) / 4;
+ const uint scalar_offset_12 = ((offset + 16u)) / 4;
+ const uint scalar_offset_13 = ((offset + 32u)) / 4;
+ return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_14 = ((offset + 0u)) / 4;
+ const uint scalar_offset_15 = ((offset + 4u)) / 4;
+ const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+ return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+ uint2 arg_1 = (0u).xx;
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1bfdfb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1bfdfb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..814c344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,112 @@
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+ uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ const bool3 cond = (abs(v) < float3((params.D).xxx));
+ const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+ return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = float3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = plane0.Load(uint3(coord, 0u)).rgb;
+ } else {
+ color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = mul(color, params.gamutConversionMatrix);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+ const uint scalar_offset = ((offset + 0u)) / 4;
+ const uint scalar_offset_1 = ((offset + 16u)) / 4;
+ const uint scalar_offset_2 = ((offset + 32u)) / 4;
+ return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_3 = ((offset + 0u)) / 4;
+ const uint scalar_offset_4 = ((offset + 4u)) / 4;
+ const uint scalar_offset_5 = ((offset + 8u)) / 4;
+ const uint scalar_offset_6 = ((offset + 12u)) / 4;
+ const uint scalar_offset_7 = ((offset + 16u)) / 4;
+ const uint scalar_offset_8 = ((offset + 20u)) / 4;
+ const uint scalar_offset_9 = ((offset + 24u)) / 4;
+ const uint scalar_offset_10 = ((offset + 28u)) / 4;
+ const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_11 = ((offset + 0u)) / 4;
+ const uint scalar_offset_12 = ((offset + 16u)) / 4;
+ const uint scalar_offset_13 = ((offset + 32u)) / 4;
+ return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+ const uint scalar_offset_14 = ((offset + 0u)) / 4;
+ const uint scalar_offset_15 = ((offset + 4u)) / 4;
+ const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+ return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+ uint2 arg_1 = (0u).xx;
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1bfdfb();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1bfdfb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
new file mode 100644
index 0000000..57b88a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -0,0 +1,196 @@
+#version 310 es
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+vec4 vertex_main() {
+ textureLoad_1bfdfb();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+void fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+struct GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+
+struct ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ GammaTransferParams gammaDecodeParams;
+ GammaTransferParams gammaEncodeParams;
+ mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+ ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+ bvec3 cond = lessThan(abs(v), vec3(params.D));
+ vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+ vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+ return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+ vec3 color = vec3(0.0f, 0.0f, 0.0f);
+ if ((params.numPlanes == 1u)) {
+ color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+ } else {
+ color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+void compute_main() {
+ textureLoad_1bfdfb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
new file mode 100644
index 0000000..7a9334b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
@@ -0,0 +1,90 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
+
+struct GammaTransferParams {
+ /* 0x0000 */ float G;
+ /* 0x0004 */ float A;
+ /* 0x0008 */ float B;
+ /* 0x000c */ float C;
+ /* 0x0010 */ float D;
+ /* 0x0014 */ float E;
+ /* 0x0018 */ float F;
+ /* 0x001c */ uint padding;
+};
+
+struct ExternalTextureParams {
+ /* 0x0000 */ uint numPlanes;
+ /* 0x0004 */ uint doYuvToRgbConversionOnly;
+ /* 0x0008 */ tint_array<int8_t, 8> tint_pad;
+ /* 0x0010 */ float3x4 yuvToRgbConversionMatrix;
+ /* 0x0040 */ GammaTransferParams gammaDecodeParams;
+ /* 0x0060 */ GammaTransferParams gammaEncodeParams;
+ /* 0x0080 */ float3x3 gamutConversionMatrix;
+};
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+ bool3 const cond = (fabs(v) < float3(params.D));
+ float3 const t = (sign(v) * ((params.C * fabs(v)) + params.F));
+ float3 const f = (sign(v) * (pow(((params.A * fabs(v)) + params.B), float3(params.G)) + params.E));
+ return select(f, t, cond);
+}
+
+float4 textureLoadExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, uint2 coord, ExternalTextureParams params) {
+ float3 color = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ color = float4(plane0.read(uint2(coord), 0u)).rgb;
+ } else {
+ color = (float4(plane0.read(uint2(coord), 0u)[0], float4(plane1.read(uint2(coord), 0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+ }
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ color = gammaCorrection(color, params.gammaDecodeParams);
+ color = (params.gamutConversionMatrix * color);
+ color = gammaCorrection(color, params.gammaEncodeParams);
+ }
+ return float4(color, 1.0f);
+}
+
+void textureLoad_1bfdfb(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) {
+ uint2 arg_1 = uint2(0u);
+ float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_4, texture2d<float, access::sample> tint_symbol_5, const constant ExternalTextureParams* const tint_symbol_6) {
+ textureLoad_1bfdfb(tint_symbol_4, tint_symbol_5, tint_symbol_6);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], texture2d<float, access::sample> tint_symbol_8 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_9 [[buffer(2)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_10 [[texture(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_12 [[buffer(2)]]) {
+ textureLoad_1bfdfb(tint_symbol_10, tint_symbol_11, tint_symbol_12);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_13 [[texture(0)]], texture2d<float, access::sample> tint_symbol_14 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_15 [[buffer(2)]]) {
+ textureLoad_1bfdfb(tint_symbol_13, tint_symbol_14, tint_symbol_15);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
new file mode 100644
index 0000000..872b502
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -0,0 +1,248 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 139
+; Schema: 0
+ OpCapability Shader
+ %28 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %ext_tex_plane_1 "ext_tex_plane_1"
+ OpName %ext_tex_params_block "ext_tex_params_block"
+ OpMemberName %ext_tex_params_block 0 "inner"
+ OpName %ExternalTextureParams "ExternalTextureParams"
+ OpMemberName %ExternalTextureParams 0 "numPlanes"
+ OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
+ OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
+ OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
+ OpName %GammaTransferParams "GammaTransferParams"
+ OpMemberName %GammaTransferParams 0 "G"
+ OpMemberName %GammaTransferParams 1 "A"
+ OpMemberName %GammaTransferParams 2 "B"
+ OpMemberName %GammaTransferParams 3 "C"
+ OpMemberName %GammaTransferParams 4 "D"
+ OpMemberName %GammaTransferParams 5 "E"
+ OpMemberName %GammaTransferParams 6 "F"
+ OpMemberName %GammaTransferParams 7 "padding"
+ OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
+ OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
+ OpName %ext_tex_params "ext_tex_params"
+ OpName %arg_0 "arg_0"
+ OpName %gammaCorrection "gammaCorrection"
+ OpName %v "v"
+ OpName %params "params"
+ OpName %textureLoadExternal "textureLoadExternal"
+ OpName %plane0 "plane0"
+ OpName %plane1 "plane1"
+ OpName %coord "coord"
+ OpName %params_0 "params"
+ OpName %color "color"
+ OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
+ OpName %arg_1 "arg_1"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %ext_tex_plane_1 DescriptorSet 1
+ OpDecorate %ext_tex_plane_1 Binding 1
+ OpDecorate %ext_tex_params_block Block
+ OpMemberDecorate %ext_tex_params_block 0 Offset 0
+ OpMemberDecorate %ExternalTextureParams 0 Offset 0
+ OpMemberDecorate %ExternalTextureParams 1 Offset 4
+ OpMemberDecorate %ExternalTextureParams 2 Offset 16
+ OpMemberDecorate %ExternalTextureParams 2 ColMajor
+ OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
+ OpMemberDecorate %ExternalTextureParams 3 Offset 64
+ OpMemberDecorate %GammaTransferParams 0 Offset 0
+ OpMemberDecorate %GammaTransferParams 1 Offset 4
+ OpMemberDecorate %GammaTransferParams 2 Offset 8
+ OpMemberDecorate %GammaTransferParams 3 Offset 12
+ OpMemberDecorate %GammaTransferParams 4 Offset 16
+ OpMemberDecorate %GammaTransferParams 5 Offset 20
+ OpMemberDecorate %GammaTransferParams 6 Offset 24
+ OpMemberDecorate %GammaTransferParams 7 Offset 28
+ OpMemberDecorate %ExternalTextureParams 4 Offset 96
+ OpMemberDecorate %ExternalTextureParams 5 Offset 128
+ OpMemberDecorate %ExternalTextureParams 5 ColMajor
+ OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
+ OpDecorate %ext_tex_params NonWritable
+ OpDecorate %ext_tex_params DescriptorSet 1
+ OpDecorate %ext_tex_params Binding 2
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %uint = OpTypeInt 32 0
+%mat3v4float = OpTypeMatrix %v4float 3
+%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
+ %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
+%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
+%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
+%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %22 = OpTypeFunction %v3float %v3float %GammaTransferParams
+ %bool = OpTypeBool
+ %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %42 = OpConstantNull %v3float
+ %v2uint = OpTypeVector %uint 2
+ %62 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
+ %uint_1 = OpConstant %uint 1
+ %78 = OpConstantNull %uint
+ %v2float = OpTypeVector %float 2
+ %float_1 = OpConstant %float 1
+ %void = OpTypeVoid
+ %109 = OpTypeFunction %void
+ %113 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_0 = OpConstant %uint 0
+%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %126 = OpTypeFunction %v4float
+%gammaCorrection = OpFunction %v3float None %22
+ %v = OpFunctionParameter %v3float
+ %params = OpFunctionParameter %GammaTransferParams
+ %26 = OpLabel
+ %40 = OpVariable %_ptr_Function_v3float Function %42
+ %52 = OpVariable %_ptr_Function_v3float Function %42
+ %58 = OpVariable %_ptr_Function_v3float Function %42
+ %27 = OpExtInst %v3float %28 FAbs %v
+ %29 = OpCompositeExtract %float %params 4
+ %30 = OpCompositeConstruct %v3float %29 %29 %29
+ %31 = OpFOrdLessThan %v3bool %27 %30
+ %34 = OpExtInst %v3float %28 FSign %v
+ %35 = OpCompositeExtract %float %params 3
+ %36 = OpExtInst %v3float %28 FAbs %v
+ %37 = OpVectorTimesScalar %v3float %36 %35
+ %38 = OpCompositeExtract %float %params 6
+ %43 = OpCompositeConstruct %v3float %38 %38 %38
+ %39 = OpFAdd %v3float %37 %43
+ %44 = OpFMul %v3float %34 %39
+ %45 = OpExtInst %v3float %28 FSign %v
+ %47 = OpCompositeExtract %float %params 1
+ %48 = OpExtInst %v3float %28 FAbs %v
+ %49 = OpVectorTimesScalar %v3float %48 %47
+ %50 = OpCompositeExtract %float %params 2
+ %53 = OpCompositeConstruct %v3float %50 %50 %50
+ %51 = OpFAdd %v3float %49 %53
+ %54 = OpCompositeExtract %float %params 0
+ %55 = OpCompositeConstruct %v3float %54 %54 %54
+ %46 = OpExtInst %v3float %28 Pow %51 %55
+ %56 = OpCompositeExtract %float %params 5
+ %59 = OpCompositeConstruct %v3float %56 %56 %56
+ %57 = OpFAdd %v3float %46 %59
+ %60 = OpFMul %v3float %45 %57
+ %61 = OpSelect %v3float %31 %44 %60
+ OpReturnValue %61
+ OpFunctionEnd
+%textureLoadExternal = OpFunction %v4float None %62
+ %plane0 = OpFunctionParameter %11
+ %plane1 = OpFunctionParameter %11
+ %coord = OpFunctionParameter %v2uint
+ %params_0 = OpFunctionParameter %ExternalTextureParams
+ %69 = OpLabel
+ %color = OpVariable %_ptr_Function_v3float Function %42
+ %71 = OpCompositeExtract %uint %params_0 0
+ %73 = OpIEqual %bool %71 %uint_1
+ OpSelectionMerge %74 None
+ OpBranchConditional %73 %75 %76
+ %75 = OpLabel
+ %77 = OpImageFetch %v4float %plane0 %coord Lod %78
+ %79 = OpVectorShuffle %v3float %77 %77 0 1 2
+ OpStore %color %79
+ OpBranch %74
+ %76 = OpLabel
+ %80 = OpImageFetch %v4float %plane0 %coord Lod %78
+ %81 = OpCompositeExtract %float %80 0
+ %82 = OpImageFetch %v4float %plane1 %coord Lod %78
+ %84 = OpVectorShuffle %v2float %82 %82 0 1
+ %85 = OpCompositeExtract %float %84 0
+ %86 = OpCompositeExtract %float %84 1
+ %88 = OpCompositeConstruct %v4float %81 %85 %86 %float_1
+ %89 = OpCompositeExtract %mat3v4float %params_0 2
+ %90 = OpVectorTimesMatrix %v3float %88 %89
+ OpStore %color %90
+ OpBranch %74
+ %74 = OpLabel
+ %91 = OpCompositeExtract %uint %params_0 1
+ %92 = OpIEqual %bool %91 %78
+ OpSelectionMerge %93 None
+ OpBranchConditional %92 %94 %93
+ %94 = OpLabel
+ %96 = OpLoad %v3float %color
+ %97 = OpCompositeExtract %GammaTransferParams %params_0 3
+ %95 = OpFunctionCall %v3float %gammaCorrection %96 %97
+ OpStore %color %95
+ %98 = OpCompositeExtract %mat3v3float %params_0 5
+ %99 = OpLoad %v3float %color
+ %100 = OpMatrixTimesVector %v3float %98 %99
+ OpStore %color %100
+ %102 = OpLoad %v3float %color
+ %103 = OpCompositeExtract %GammaTransferParams %params_0 4
+ %101 = OpFunctionCall %v3float %gammaCorrection %102 %103
+ OpStore %color %101
+ OpBranch %93
+ %93 = OpLabel
+ %104 = OpLoad %v3float %color
+ %105 = OpCompositeExtract %float %104 0
+ %106 = OpCompositeExtract %float %104 1
+ %107 = OpCompositeExtract %float %104 2
+ %108 = OpCompositeConstruct %v4float %105 %106 %107 %float_1
+ OpReturnValue %108
+ OpFunctionEnd
+%textureLoad_1bfdfb = OpFunction %void None %109
+ %112 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %113
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %113
+ %117 = OpLoad %11 %arg_0
+ %118 = OpLoad %11 %ext_tex_plane_1
+ %119 = OpLoad %v2uint %arg_1
+ %122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %123 = OpLoad %ExternalTextureParams %122
+ %116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
+ OpStore %res %116
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %126
+ %128 = OpLabel
+ %129 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %109
+ %131 = OpLabel
+ %132 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %132
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %109
+ %134 = OpLabel
+ %135 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %109
+ %137 = OpLabel
+ %138 = OpFunctionCall %void %textureLoad_1bfdfb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
new file mode 100644
index 0000000..52a6fc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_external;
+
+fn textureLoad_1bfdfb() {
+ var arg_1 = vec2<u32>();
+ var res : vec4<f32> = textureLoad(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1bfdfb();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
new file mode 100644
index 0000000..edd5e4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32>
+fn textureLoad_1c562a() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1c562a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0bb5f34
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1c562a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1c562a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0bb5f34
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_1c562a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_1c562a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
new file mode 100644
index 0000000..846f8f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_1c562a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_1c562a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_1c562a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
new file mode 100644
index 0000000..a8cffe5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ uint arg_2 = 1u;
+ uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+ textureLoad_1c562a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_1c562a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_1c562a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
new file mode 100644
index 0000000..ee1302d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_1c562a "textureLoad_1c562a"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_1c562a = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4uint %27 %28 Lod %29
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_1c562a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
new file mode 100644
index 0000000..6f9672a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureLoad_1c562a() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_1c562a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
new file mode 100644
index 0000000..39593e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32>
+fn textureLoad_21d1c4() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_21d1c4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..28c9d44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_21d1c4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_21d1c4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..28c9d44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_21d1c4();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_21d1c4();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
new file mode 100644
index 0000000..addbf63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_21d1c4();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_21d1c4();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_21d1c4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
new file mode 100644
index 0000000..c3441bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ uint arg_2 = 1u;
+ float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+ textureLoad_21d1c4(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_21d1c4(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_21d1c4(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
new file mode 100644
index 0000000..6d18184
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_21d1c4 "textureLoad_21d1c4"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_21d1c4 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v3uint %arg_1
+ %28 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4float %26 %27 Lod %28
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_21d1c4
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
new file mode 100644
index 0000000..f363fde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureLoad_21d1c4() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_21d1c4();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
new file mode 100644
index 0000000..9a79fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: u32) -> vec4<f32>
+fn textureLoad_2e09aa() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_2e09aa();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0219fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_2e09aa();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_2e09aa();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0219fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_2e09aa();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_2e09aa();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
new file mode 100644
index 0000000..e6b2a00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_2e09aa();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_2e09aa();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_2e09aa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
new file mode 100644
index 0000000..f1ec214
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+ textureLoad_2e09aa(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_2e09aa(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_2e09aa(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..751b31e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_2e09aa "textureLoad_2e09aa"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_2e09aa = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4float %26 %27 Sample %28
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_2e09aa
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..22a0a70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
+
+fn textureLoad_2e09aa() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_2e09aa();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
new file mode 100644
index 0000000..98c9832
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32>
+fn textureLoad_47e818() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_47e818();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..71c7aac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_47e818();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_47e818();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71c7aac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+ uint3 arg_1 = (0u).xxx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_47e818();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_47e818();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
new file mode 100644
index 0000000..a734ffb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_47e818();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_47e818();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+ uvec3 arg_1 = uvec3(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_47e818();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
new file mode 100644
index 0000000..7f3d122
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ uint arg_2 = 1u;
+ int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+ textureLoad_47e818(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_47e818(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_47e818(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
new file mode 100644
index 0000000..b4a1420
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_47e818 "textureLoad_47e818"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_47e818 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Lod %30
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_47e818
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_47e818
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_47e818
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
new file mode 100644
index 0000000..1086f04
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureLoad_47e818() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = 1u;
+ var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_47e818();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
new file mode 100644
index 0000000..034fef4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: u32) -> vec4<u32>
+fn textureLoad_49f76f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_49f76f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..16d7d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_49f76f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_49f76f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16d7d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_49f76f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_49f76f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
new file mode 100644
index 0000000..7e0cd86
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_49f76f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_49f76f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_49f76f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
new file mode 100644
index 0000000..af663e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+ textureLoad_49f76f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_49f76f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_49f76f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
new file mode 100644
index 0000000..51c8570
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_49f76f "textureLoad_49f76f"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_49f76f = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4uint %27 %28 Sample %29
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_49f76f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a6fcc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
+
+fn textureLoad_49f76f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_49f76f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
new file mode 100644
index 0000000..2c2af13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: u32) -> f32
+fn textureLoad_4db25c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_4db25c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6596af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_4db25c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_4db25c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6596af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_4db25c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_4db25c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
new file mode 100644
index 0000000..9c82b7f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_4db25c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void fragment_main() {
+ textureLoad_4db25c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void compute_main() {
+ textureLoad_4db25c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
new file mode 100644
index 0000000..f6283ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+ textureLoad_4db25c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_4db25c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_4db25c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e540a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_4db25c "textureLoad_4db25c"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_float = OpTypePointer Function %float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_4db25c = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Sample %29
+ %25 = OpCompositeExtract %float %26 0
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_4db25c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd9b07f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
+
+fn textureLoad_4db25c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_4db25c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl
new file mode 100644
index 0000000..2336058
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: u32) -> vec4<i32>
+fn textureLoad_639962() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_639962();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b349fe4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_639962();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_639962();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_639962();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b349fe4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_639962();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_639962();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_639962();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
new file mode 100644
index 0000000..b273a8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_639962();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_639962();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_639962();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
new file mode 100644
index 0000000..bd713c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+ textureLoad_639962(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_639962(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_639962(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
new file mode 100644
index 0000000..307a6eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_639962 "textureLoad_639962"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_639962 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Sample %30
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_639962
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_639962
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_639962
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
new file mode 100644
index 0000000..25ea34f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
+
+fn textureLoad_639962() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_639962();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl
new file mode 100644
index 0000000..eeee23a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureLoad(texture: texture_1d<f32>, coords: u32, level: u32) -> vec4<f32>
+fn textureLoad_6d376a() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_6d376a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cf3f78b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_6d376a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_6d376a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf3f78b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_6d376a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_6d376a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl
new file mode 100644
index 0000000..feaca4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_6d376a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_6d376a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_6d376a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl
new file mode 100644
index 0000000..c42b2ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6d376a(texture1d<float, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ float4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+ textureLoad_6d376a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_6d376a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_6d376a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5bed9d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_6d376a "textureLoad_6d376a"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %28 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_6d376a = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %uint_1
+ %23 = OpLoad %11 %arg_0
+ %24 = OpLoad %uint %arg_1
+ %25 = OpLoad %uint %arg_2
+ %22 = OpImageFetch %v4float %23 %24 Lod %25
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %33 = OpLabel
+ %34 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %34
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_6d376a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a485a5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureLoad_6d376a() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_6d376a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
new file mode 100644
index 0000000..bd1f65c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32>
+fn textureLoad_714471() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_714471();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c18883
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_714471();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_714471();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_714471();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c18883
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_714471();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_714471();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_714471();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
new file mode 100644
index 0000000..2c17c62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_714471();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_714471();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_714471();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
new file mode 100644
index 0000000..d147934
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+ textureLoad_714471(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_714471(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_714471(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
new file mode 100644
index 0000000..791435e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_714471 "textureLoad_714471"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_714471 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Lod %30
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_714471
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_714471
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_714471
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
new file mode 100644
index 0000000..6692a20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureLoad_714471() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_714471();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
new file mode 100644
index 0000000..19901a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: u32) -> f32
+fn textureLoad_7b63e0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_7b63e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..54f384a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_7b63e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_7b63e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..54f384a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_7b63e0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_7b63e0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
new file mode 100644
index 0000000..a024f9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_7b63e0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+void fragment_main() {
+ textureLoad_7b63e0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+void compute_main() {
+ textureLoad_7b63e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
new file mode 100644
index 0000000..31ac2eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+ textureLoad_7b63e0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_7b63e0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_7b63e0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..ae0386b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_7b63e0 "textureLoad_7b63e0"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v3uint = OpTypeVector %uint 3
+%_ptr_Function_float = OpTypePointer Function %float
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_7b63e0 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %uint_1
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %uint %arg_3
+ %27 = OpImageFetch %v4float %28 %34 Lod %35
+ %26 = OpCompositeExtract %float %27 0
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_7b63e0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..6839f8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureLoad_7b63e0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_7b63e0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
new file mode 100644
index 0000000..4ef1d0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32>
+fn textureLoad_84dee1() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_84dee1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7ab5799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_84dee1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_84dee1();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7ab5799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_84dee1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_84dee1();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
new file mode 100644
index 0000000..6706ec1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_84dee1();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_84dee1();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_84dee1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
new file mode 100644
index 0000000..545f668
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+ textureLoad_84dee1(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_84dee1(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_84dee1(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
new file mode 100644
index 0000000..d1c06a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_84dee1 "textureLoad_84dee1"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_84dee1 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4float %26 %27 Lod %28
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %37
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_84dee1
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
new file mode 100644
index 0000000..850b0fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureLoad_84dee1() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_84dee1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
new file mode 100644
index 0000000..3e96430
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<u32>
+fn textureLoad_8527b1() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_8527b1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e084b64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_8527b1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_8527b1();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e084b64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_8527b1();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_8527b1();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
new file mode 100644
index 0000000..01a6c24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+ textureLoad_8527b1();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+ textureLoad_8527b1();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+ textureLoad_8527b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
new file mode 100644
index 0000000..c84a237
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+ textureLoad_8527b1(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_8527b1(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_8527b1(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8edef0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_8527b1 "textureLoad_8527b1"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %38 = OpConstantNull %v4uint
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_8527b1 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4uint Function %38
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %uint_1
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %uint %arg_3
+ %26 = OpImageFetch %v4uint %28 %34 Lod %35
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_8527b1
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f2f110
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureLoad_8527b1() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_8527b1();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
new file mode 100644
index 0000000..cf0ac23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32>
+fn textureLoad_897cf3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_897cf3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7f68c6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_897cf3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_897cf3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7f68c6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_897cf3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_897cf3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
new file mode 100644
index 0000000..4c8f3f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_897cf3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_897cf3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_897cf3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
new file mode 100644
index 0000000..004547d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+ textureLoad_897cf3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_897cf3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_897cf3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
new file mode 100644
index 0000000..43e8cfb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_897cf3 "textureLoad_897cf3"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
+ %33 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_897cf3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %25 = OpImageFetch %v4uint %27 %28 Lod %29
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %39
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_897cf3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
new file mode 100644
index 0000000..a690f92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureLoad_897cf3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_897cf3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
new file mode 100644
index 0000000..7dd1032
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<f32>
+fn textureLoad_96efd5() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_96efd5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..06c757a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_96efd5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_96efd5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06c757a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_96efd5();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_96efd5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
new file mode 100644
index 0000000..1949301
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+ textureLoad_96efd5();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+ textureLoad_96efd5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+ textureLoad_96efd5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
new file mode 100644
index 0000000..56325e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+ textureLoad_96efd5(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_96efd5(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_96efd5(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
new file mode 100644
index 0000000..7529e7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_96efd5 "textureLoad_96efd5"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %37 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_96efd5 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpCompositeExtract %uint %29 0
+ %31 = OpCompositeExtract %uint %29 1
+ %32 = OpLoad %uint %arg_2
+ %33 = OpCompositeConstruct %v3uint %30 %31 %32
+ %34 = OpLoad %uint %arg_3
+ %26 = OpImageFetch %v4float %27 %33 Lod %34
+ OpStore %res %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %42 = OpLabel
+ %43 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %43
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureLoad_96efd5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
new file mode 100644
index 0000000..1dd4f6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureLoad_96efd5() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_96efd5();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
new file mode 100644
index 0000000..61e56bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<i32>
+fn textureLoad_9885b0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9885b0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..70b8ef5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9885b0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9885b0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..70b8ef5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9885b0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9885b0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
new file mode 100644
index 0000000..6ecf66c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+ textureLoad_9885b0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+ textureLoad_9885b0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+ textureLoad_9885b0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
new file mode 100644
index 0000000..2f75ea8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+ textureLoad_9885b0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_9885b0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_9885b0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..6faf53b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_9885b0 "textureLoad_9885b0"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %39 = OpConstantNull %v4int
+ %40 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_9885b0 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %39
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %uint_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpCompositeExtract %uint %31 0
+ %33 = OpCompositeExtract %uint %31 1
+ %34 = OpLoad %uint %arg_2
+ %35 = OpCompositeConstruct %v3uint %32 %33 %34
+ %36 = OpLoad %uint %arg_3
+ %27 = OpImageFetch %v4int %29 %35 Lod %36
+ OpStore %res %27
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_9885b0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ac0400
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureLoad_9885b0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = 1u;
+ var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9885b0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
new file mode 100644
index 0000000..48c2b12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32
+fn textureLoad_9ed19e() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res: f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9ed19e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..90bb9c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float res = arg_0.Load(uint3(arg_1, arg_2)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9ed19e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9ed19e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..90bb9c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float res = arg_0.Load(uint3(arg_1, arg_2)).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_9ed19e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_9ed19e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
new file mode 100644
index 0000000..43575c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+vec4 vertex_main() {
+ textureLoad_9ed19e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void fragment_main() {
+ textureLoad_9ed19e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void compute_main() {
+ textureLoad_9ed19e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
new file mode 100644
index 0000000..e85b151
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+ textureLoad_9ed19e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_9ed19e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_9ed19e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
new file mode 100644
index 0000000..aa66bcb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_9ed19e "textureLoad_9ed19e"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_float = OpTypePointer Function %float
+ %32 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_9ed19e = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Lod %29
+ %25 = OpCompositeExtract %float %26 0
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %37 = OpLabel
+ %38 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %38
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_9ed19e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
new file mode 100644
index 0000000..b50d5ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureLoad_9ed19e() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_9ed19e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl
new file mode 100644
index 0000000..4b2c143
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureLoad(texture: texture_1d<u32>, coords: u32, level: u32) -> vec4<u32>
+fn textureLoad_bc3201() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_bc3201();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..36ab4d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_bc3201();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_bc3201();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36ab4d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureLoad_bc3201();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureLoad_bc3201();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl
new file mode 100644
index 0000000..9c502e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+ textureLoad_bc3201();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+ textureLoad_bc3201();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+ textureLoad_bc3201();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl
new file mode 100644
index 0000000..3f5c7f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bc3201(texture1d<uint, access::sample> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint arg_2 = 1u;
+ uint4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+ textureLoad_bc3201(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+ textureLoad_bc3201(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+ textureLoad_bc3201(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm
new file mode 100644
index 0000000..393bb93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Sampled1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureLoad_bc3201 "textureLoad_bc3201"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureLoad_bc3201 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %uint_1
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %uint %arg_2
+ %22 = OpImageFetch %v4uint %24 %25 Lod %26
+ OpStore %res %22
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_bc3201
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl
new file mode 100644
index 0000000..0d810d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureLoad_bc3201() {
+ var arg_1 = 1u;
+ var arg_2 = 1u;
+ var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureLoad_bc3201();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl
new file mode 100644
index 0000000..5531467
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSample_193203() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c60f2c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+void fragment_main() {
+ textureSample_193203();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c60f2c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+void fragment_main() {
+ textureSample_193203();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
new file mode 100644
index 0000000..4c0e571
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_193203() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0));
+}
+
+void fragment_main() {
+ textureSample_193203();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
new file mode 100644
index 0000000..ffe8266
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_193203(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
new file mode 100644
index 0000000..bfa4c0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
@@ -0,0 +1,69 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_193203 "textureSample_193203"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %25 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %36 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %39 = OpConstantNull %v4float
+%textureSample_193203 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %39
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %28 = OpLoad %v2float %arg_2
+ %29 = OpCompositeExtract %float %28 0
+ %30 = OpCompositeExtract %float %28 1
+ %32 = OpLoad %uint %arg_3
+ %31 = OpConvertUToF %float %32
+ %33 = OpCompositeConstruct %v3float %29 %30 %31
+ %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %36
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSample_193203
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
new file mode 100644
index 0000000..0060bd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_193203() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
new file mode 100644
index 0000000..b4f2ced
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> f32
+fn textureSample_1a4e1b() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8e8c108
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8e8c108
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
new file mode 100644
index 0000000..732d16f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_1a4e1b() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f));
+}
+
+void fragment_main() {
+ textureSample_1a4e1b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
new file mode 100644
index 0000000..f7bc435
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_1a4e1b(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_1a4e1b(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..c89531b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_1a4e1b "textureSample_1a4e1b"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %26 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_float = OpTypePointer Function %float
+ %37 = OpConstantNull %float
+%textureSample_1a4e1b = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_float Function %37
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %24 = OpLoad %7 %arg_1
+ %25 = OpLoad %3 %arg_0
+ %27 = OpSampledImage %26 %25 %24
+ %29 = OpLoad %v2float %arg_2
+ %30 = OpCompositeExtract %float %29 0
+ %31 = OpCompositeExtract %float %29 1
+ %33 = OpLoad %uint %arg_3
+ %32 = OpConvertUToF %float %33
+ %34 = OpCompositeConstruct %v3float %30 %31 %32
+ %22 = OpImageSampleImplicitLod %v4float %27 %34
+ %21 = OpCompositeExtract %float %22 0
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSample_1a4e1b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..3b49da8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_1a4e1b() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
new file mode 100644
index 0000000..96ff918
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32
+fn textureSample_4703d0() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3761e5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3761e5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl
new file mode 100644
index 0000000..fc371e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_4703d0() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), ivec2(0));
+}
+
+void fragment_main() {
+ textureSample_4703d0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
new file mode 100644
index 0000000..77d8949
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_4703d0(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..ed2182b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_4703d0 "textureSample_4703d0"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %26 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %37 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %40 = OpConstantNull %float
+%textureSample_4703d0 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_float Function %40
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %24 = OpLoad %7 %arg_1
+ %25 = OpLoad %3 %arg_0
+ %27 = OpSampledImage %26 %25 %24
+ %29 = OpLoad %v2float %arg_2
+ %30 = OpCompositeExtract %float %29 0
+ %31 = OpCompositeExtract %float %29 1
+ %33 = OpLoad %uint %arg_3
+ %32 = OpConvertUToF %float %33
+ %34 = OpCompositeConstruct %v3float %30 %31 %32
+ %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %37
+ %21 = OpCompositeExtract %float %22 0
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSample_4703d0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..00781e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_4703d0() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
new file mode 100644
index 0000000..a31832c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> f32
+fn textureSample_7fd8cb() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ddbeb1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ddbeb1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl
new file mode 100644
index 0000000..d95de69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSample_7fd8cb() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0f);
+}
+
+void fragment_main() {
+ textureSample_7fd8cb();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
new file mode 100644
index 0000000..80016e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_7fd8cb(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_7fd8cb(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..962925e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -0,0 +1,68 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_7fd8cb "textureSample_7fd8cb"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %26 = OpTypeSampledImage %3
+%_ptr_Function_float = OpTypePointer Function %float
+ %37 = OpConstantNull %float
+%textureSample_7fd8cb = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_float Function %37
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %24 = OpLoad %7 %arg_1
+ %25 = OpLoad %3 %arg_0
+ %27 = OpSampledImage %26 %25 %24
+ %28 = OpLoad %v3float %arg_2
+ %29 = OpCompositeExtract %float %28 0
+ %30 = OpCompositeExtract %float %28 1
+ %31 = OpCompositeExtract %float %28 2
+ %33 = OpLoad %uint %arg_3
+ %32 = OpConvertUToF %float %33
+ %34 = OpCompositeConstruct %v4float %29 %30 %31 %32
+ %22 = OpImageSampleImplicitLod %v4float %27 %34
+ %21 = OpCompositeExtract %float %22 0
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSample_7fd8cb
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..6ed7b4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_7fd8cb() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
new file mode 100644
index 0000000..6f0116e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_bc7477() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ef25be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5ef25be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl
new file mode 100644
index 0000000..1354303
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSample_bc7477() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_bc7477();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
new file mode 100644
index 0000000..8b3614e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_bc7477(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_bc7477(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
new file mode 100644
index 0000000..4a09842
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_bc7477 "textureSample_bc7477"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %25 = OpTypeSampledImage %3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpConstantNull %v4float
+%textureSample_bc7477 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %36
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v3float %arg_2
+ %28 = OpCompositeExtract %float %27 0
+ %29 = OpCompositeExtract %float %27 1
+ %30 = OpCompositeExtract %float %27 2
+ %32 = OpLoad %uint %arg_3
+ %31 = OpConvertUToF %float %32
+ %33 = OpCompositeConstruct %v4float %28 %29 %30 %31
+ %21 = OpImageSampleImplicitLod %v4float %26 %33
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSample_bc7477
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
new file mode 100644
index 0000000..48a05ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_bc7477() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
new file mode 100644
index 0000000..653e5a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_d6b281() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..40fc858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..40fc858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
new file mode 100644
index 0000000..bab02f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_d6b281() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+ textureSample_d6b281();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
new file mode 100644
index 0000000..cac3226
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_d6b281(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSample_d6b281(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
new file mode 100644
index 0000000..df39671
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
@@ -0,0 +1,66 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSample_d6b281 "textureSample_d6b281"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4float = OpTypeVector %float 4
+ %25 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %36 = OpConstantNull %v4float
+%textureSample_d6b281 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %36
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %28 = OpLoad %v2float %arg_2
+ %29 = OpCompositeExtract %float %28 0
+ %30 = OpCompositeExtract %float %28 1
+ %32 = OpLoad %uint %arg_3
+ %31 = OpConvertUToF %float %32
+ %33 = OpCompositeConstruct %v3float %29 %30 %31
+ %21 = OpImageSampleImplicitLod %v4float %26 %33
+ OpStore %res %21
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSample_d6b281
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
new file mode 100644
index 0000000..56e467d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_d6b281() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+ textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
new file mode 100644
index 0000000..328137e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_1c707e() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0812196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0812196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
new file mode 100644
index 0000000..2185407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_1c707e() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_1c707e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
new file mode 100644
index 0000000..a7de0c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_1c707e(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_1c707e(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
new file mode 100644
index 0000000..22a6cde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_1c707e "textureSampleBias_1c707e"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %v4float = OpTypeVector %float 4
+ %29 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %41 = OpConstantNull %v4float
+%textureSampleBias_1c707e = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %41
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleBias_1c707e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
new file mode 100644
index 0000000..674136f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_1c707e() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
new file mode 100644
index 0000000..2ffa8d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
@@ -0,0 +1,38 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_87915c() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ const arg_5 = vec2<i32>();
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1edf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1edf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
new file mode 100644
index 0000000..b2b2648
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_87915c() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_87915c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
new file mode 100644
index 0000000..37303ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_87915c(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8da7ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_87915c "textureSampleBias_87915c"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %v4float = OpTypeVector %float 4
+ %29 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %41 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %44 = OpConstantNull %v4float
+%textureSampleBias_87915c = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %44
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %41
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleBias_87915c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..ff54de7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -0,0 +1,16 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_87915c() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ const arg_5 = vec2<i32>();
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
new file mode 100644
index 0000000..666511e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_c6953d() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8272ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8272ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
new file mode 100644
index 0000000..aeeabb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleBias_c6953d() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleBias_c6953d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
new file mode 100644
index 0000000..b06231c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_c6953d(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleBias_c6953d(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
new file mode 100644
index 0000000..966a391
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleBias_c6953d "textureSampleBias_c6953d"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %v4float = OpTypeVector %float 4
+ %29 = OpTypeSampledImage %3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %41 = OpConstantNull %v4float
+%textureSampleBias_c6953d = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_v4float Function %41
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %31 = OpLoad %v3float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %34 = OpCompositeExtract %float %31 2
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleBias_c6953d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
new file mode 100644
index 0000000..31476a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_c6953d() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
new file mode 100644
index 0000000..25c3c54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_1912e5() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..88f73a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88f73a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl
new file mode 100644
index 0000000..794ee02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_1912e5() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompare_1912e5();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
new file mode 100644
index 0000000..223d875
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_1912e5(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_1912e5(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
new file mode 100644
index 0000000..1cd357b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_1912e5 "textureSampleCompare_1912e5"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %28 = OpTypeSampledImage %3
+ %v4float = OpTypeVector %float 4
+%textureSampleCompare_1912e5 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_float Function %24
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v3float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %34 = OpCompositeExtract %float %31 2
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleCompare_1912e5
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
new file mode 100644
index 0000000..c8a2275
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_1912e5() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
new file mode 100644
index 0000000..88b89b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
@@ -0,0 +1,38 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompare_7b5025() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ const arg_5 = vec2<i32>();
+ var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e57c768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e57c768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl
new file mode 100644
index 0000000..1fb97d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_7b5025() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleCompare_7b5025();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:10: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
new file mode 100644
index 0000000..1a601d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_7b5025(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
new file mode 100644
index 0000000..66b0add
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_7b5025 "textureSampleCompare_7b5025"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %28 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %40 = OpConstantNull %v2int
+%textureSampleCompare_7b5025 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_float Function %24
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %uint %arg_3
+ %34 = OpConvertUToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %37 = OpLoad %float %arg_4
+ %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %40
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleCompare_7b5025
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2f8e2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -0,0 +1,16 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_7b5025() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ const arg_5 = vec2<i32>();
+ var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
new file mode 100644
index 0000000..6f2ab25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_90ae56() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..048e28e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..048e28e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
new file mode 100644
index 0000000..aab30eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_90ae56() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void fragment_main() {
+ textureSampleCompare_90ae56();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
new file mode 100644
index 0000000..5b7cfbd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_90ae56(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+ textureSampleCompare_90ae56(tint_symbol_2, tint_symbol_3);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
new file mode 100644
index 0000000..ccfd3f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompare_90ae56 "textureSampleCompare_90ae56"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %fragment_main "fragment_main"
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+ %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+ %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+ %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %24 = OpConstantNull %float
+ %28 = OpTypeSampledImage %3
+ %v3float = OpTypeVector %float 3
+%textureSampleCompare_90ae56 = OpFunction %void None %8
+ %11 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+ %arg_3 = OpVariable %_ptr_Function_uint Function %20
+ %arg_4 = OpVariable %_ptr_Function_float Function %24
+ %res = OpVariable %_ptr_Function_float Function %24
+ OpStore %arg_2 %13
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %uint %arg_3
+ %34 = OpConvertUToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %37 = OpLoad %float %arg_4
+ %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37
+ OpStore %res %25
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSampleCompare_90ae56
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
new file mode 100644
index 0000000..97cb0eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_90ae56() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
new file mode 100644
index 0000000..1bcb431
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_7dc3c0() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0283909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_7dc3c0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0283909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_7dc3c0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
new file mode 100644
index 0000000..88a12ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
new file mode 100644
index 0000000..27a6c6e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_7dc3c0(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_7dc3c0(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8bacfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_7dc3c0 "textureSampleCompareLevel_7dc3c0"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %46 = OpTypeFunction %v4float
+%textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15d2d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_7dc3c0() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_7dc3c0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
new file mode 100644
index 0000000..b6cd370
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_958c87() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_958c87();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..052b573
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_958c87();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..052b573
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_958c87();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl
new file mode 100644
index 0000000..e765407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_958c87();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
new file mode 100644
index 0000000..bda2ec6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_958c87(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_958c87(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_958c87(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_958c87(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
new file mode 100644
index 0000000..6f5a6ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_958c87 "textureSampleCompareLevel_958c87"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %float_0 = OpConstant %float 0
+ %46 = OpTypeFunction %v4float
+%textureSampleCompareLevel_958c87 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
new file mode 100644
index 0000000..176df62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_958c87() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_958c87();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
new file mode 100644
index 0000000..b25925f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_bcb3dd() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ const arg_5 = vec2<i32>();
+ var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a184617
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_bcb3dd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a184617
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleCompareLevel_bcb3dd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
new file mode 100644
index 0000000..75de5c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:10: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
new file mode 100644
index 0000000..ece69aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleCompareLevel_bcb3dd(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..3900cd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %float_0 = OpConstant %float 0
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %47 = OpConstantNull %v2int
+ %49 = OpTypeFunction %v4float
+%textureSampleCompareLevel_bcb3dd = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %47
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..1a2974a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_bcb3dd() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ const arg_5 = vec2<i32>();
+ var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleCompareLevel_bcb3dd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
new file mode 100644
index 0000000..d77c4f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_7cd6de() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec2<f32>();
+ var arg_5 = vec2<f32>();
+ const arg_6 = vec2<i32>();
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_7cd6de();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9bbb852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float2 arg_4 = (0.0f).xx;
+ float2 arg_5 = (0.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_7cd6de();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9bbb852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float2 arg_4 = (0.0f).xx;
+ float2 arg_5 = (0.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_7cd6de();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_7cd6de();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
new file mode 100644
index 0000000..876815f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_7cd6de();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+void compute_main() {
+ textureSampleGrad_7cd6de();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
new file mode 100644
index 0000000..b8f980b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float2 arg_4 = float2(0.0f);
+ float2 arg_5 = float2(0.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_7cd6de(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_7cd6de(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_7cd6de(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
new file mode 100644
index 0000000..174acb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 63
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_7cd6de "textureSampleGrad_7cd6de"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %arg_5 "arg_5"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %49 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_7cd6de = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %20
+ OpStore %arg_5 %20
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %42 = OpLoad %v2float %arg_4
+ %43 = OpLoad %v2float %arg_5
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %46
+ OpStore %res %30
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
new file mode 100644
index 0000000..96e7b81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_7cd6de() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec2<f32>();
+ var arg_5 = vec2<f32>();
+ const arg_6 = vec2<i32>();
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_7cd6de();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
new file mode 100644
index 0000000..b741911
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_a09131() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec2<f32>();
+ var arg_5 = vec2<f32>();
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_a09131();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..408ec2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float2 arg_4 = (0.0f).xx;
+ float2 arg_5 = (0.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_a09131();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_a09131();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..408ec2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float2 arg_4 = (0.0f).xx;
+ float2 arg_5 = (0.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_a09131();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_a09131();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
new file mode 100644
index 0000000..ce8038c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_a09131();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ vec2 arg_4 = vec2(0.0f);
+ vec2 arg_5 = vec2(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void compute_main() {
+ textureSampleGrad_a09131();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
new file mode 100644
index 0000000..1065f83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float2 arg_4 = float2(0.0f);
+ float2 arg_5 = float2(0.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_a09131(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_a09131(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_a09131(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
new file mode 100644
index 0000000..031b5d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_a09131 "textureSampleGrad_a09131"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %arg_5 "arg_5"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_a09131 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %20
+ OpStore %arg_5 %20
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %42 = OpLoad %v2float %arg_4
+ %43 = OpLoad %v2float %arg_5
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
+ OpStore %res %30
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleGrad_a09131
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15bd3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_a09131() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec2<f32>();
+ var arg_5 = vec2<f32>();
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_a09131();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
new file mode 100644
index 0000000..0df48a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_bbb58f() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec3<f32>();
+ var arg_5 = vec3<f32>();
+ var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_bbb58f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da308d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float3 arg_4 = (0.0f).xxx;
+ float3 arg_5 = (0.0f).xxx;
+ float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_bbb58f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da308d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float3 arg_4 = (0.0f).xxx;
+ float3 arg_5 = (0.0f).xxx;
+ float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleGrad_bbb58f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleGrad_bbb58f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl
new file mode 100644
index 0000000..19810e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec3 arg_4 = vec3(0.0f);
+ vec3 arg_5 = vec3(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+vec4 vertex_main() {
+ textureSampleGrad_bbb58f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec3 arg_4 = vec3(0.0f);
+ vec3 arg_5 = vec3(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ vec3 arg_4 = vec3(0.0f);
+ vec3 arg_5 = vec3(0.0f);
+ vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void compute_main() {
+ textureSampleGrad_bbb58f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
new file mode 100644
index 0000000..53879d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float3 arg_4 = float3(0.0f);
+ float3 arg_5 = float3(0.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleGrad_bbb58f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleGrad_bbb58f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleGrad_bbb58f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
new file mode 100644
index 0000000..4905a93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleGrad_bbb58f "textureSampleGrad_bbb58f"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %arg_5 "arg_5"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleGrad_bbb58f = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_5 = OpVariable %_ptr_Function_v3float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %20
+ OpStore %arg_5 %20
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_2
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %42 = OpLoad %v3float %arg_4
+ %43 = OpLoad %v3float %arg_5
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
+ OpStore %res %30
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
new file mode 100644
index 0000000..2419db8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_bbb58f() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = vec3<f32>();
+ var arg_5 = vec3<f32>();
+ var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleGrad_bbb58f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
new file mode 100644
index 0000000..20ae0d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_265cc7() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_265cc7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b5bdc03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_265cc7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b5bdc03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_265cc7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_265cc7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
new file mode 100644
index 0000000..e6ee969
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_265cc7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+ textureSampleLevel_265cc7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
new file mode 100644
index 0000000..87765ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_265cc7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_265cc7(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_265cc7(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_265cc7(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c0eae9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_265cc7 "textureSampleLevel_265cc7"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+%textureSampleLevel_265cc7 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleLevel_265cc7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
new file mode 100644
index 0000000..d46530b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_265cc7() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_265cc7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
new file mode 100644
index 0000000..e158313
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_615583() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_615583();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cbc17e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_615583();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_615583();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cbc17e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_615583();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_615583();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl
new file mode 100644
index 0000000..1a8bebf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_615583();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+void fragment_main() {
+ textureSampleLevel_615583();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'textureLod' : no matching overloaded function found
+ERROR: 0:10: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+void compute_main() {
+ textureSampleLevel_615583();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
new file mode 100644
index 0000000..34af000
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_615583(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_615583(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_615583(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_615583(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
new file mode 100644
index 0000000..68e107d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_615583 "textureSampleLevel_615583"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+%_ptr_Function_float = OpTypePointer Function %float
+ %46 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_615583 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %43 = OpLoad %uint %arg_4
+ %42 = OpConvertSToF %float %43
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
+ %29 = OpCompositeExtract %float %30 0
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_615583
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c0d65d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_615583() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_615583();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
new file mode 100644
index 0000000..077d173
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32) -> f32
+fn textureSampleLevel_73e892() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_73e892();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e381e9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_73e892();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_73e892();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e381e9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_73e892();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_73e892();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
new file mode 100644
index 0000000..14e1df9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_73e892();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+void fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+void compute_main() {
+ textureSampleLevel_73e892();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
new file mode 100644
index 0000000..4eb86fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_73e892(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_73e892(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c0551a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_73e892 "textureSampleLevel_73e892"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %32 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_73e892 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %30 = OpLoad %14 %arg_1
+ %31 = OpLoad %11 %arg_0
+ %33 = OpSampledImage %32 %31 %30
+ %34 = OpLoad %v2float %arg_2
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertSToF %float %36
+ %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_73e892
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d25212
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_73e892() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_73e892();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
new file mode 100644
index 0000000..0a8b7ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_941a53() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_941a53();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ded6e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_941a53();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_941a53();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ded6e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_941a53();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_941a53();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl
new file mode 100644
index 0000000..8a2f1a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_941a53();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+void fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+void compute_main() {
+ textureSampleLevel_941a53();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
new file mode 100644
index 0000000..4bbcda9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_941a53(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_941a53(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_941a53(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_941a53(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6f33ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_941a53 "textureSampleLevel_941a53"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+ %46 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_941a53 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_2
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %43 = OpLoad %uint %arg_4
+ %42 = OpConvertSToF %float %43
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
+ %29 = OpCompositeExtract %float %30 0
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_941a53
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
new file mode 100644
index 0000000..02a28c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_941a53() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_941a53();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
new file mode 100644
index 0000000..f562a0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_aab3b9() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_aab3b9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..481da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_aab3b9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..481da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_aab3b9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_aab3b9();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl
new file mode 100644
index 0000000..4f9d09d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_aab3b9();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word.
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+ textureSampleLevel_aab3b9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word.
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
new file mode 100644
index 0000000..44aa130
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_aab3b9(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_aab3b9(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_aab3b9(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_aab3b9(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..155f61c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+ OpCapability Shader
+ OpCapability SampledCubeArray
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_aab3b9 "textureSampleLevel_aab3b9"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %46 = OpTypeFunction %v4float
+%textureSampleLevel_aab3b9 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..bfc6754
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_aab3b9() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_aab3b9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
new file mode 100644
index 0000000..e11d71f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: u32) -> f32
+fn textureSampleLevel_ae92a2() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_ae92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e0a41a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_ae92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e0a41a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+ float3 arg_2 = (0.0f).xxx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_ae92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_ae92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..feffd84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_ae92a2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+void fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+ vec3 arg_2 = vec3(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+void compute_main() {
+ textureSampleLevel_ae92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
new file mode 100644
index 0000000..d8dd6ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_ae92a2(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float3 arg_2 = float3(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_ae92a2(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_ae92a2(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_ae92a2(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d9df9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_ae92a2 "textureSampleLevel_ae92a2"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v3float = OpTypeVector %float 3
+ %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %32 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_ae92a2 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %30 = OpLoad %14 %arg_1
+ %31 = OpLoad %11 %arg_0
+ %33 = OpSampledImage %32 %31 %30
+ %34 = OpLoad %v3float %arg_2
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertSToF %float %36
+ %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..b44c095
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_ae92a2() {
+ var arg_2 = vec3<f32>();
+ var arg_3 = 1u;
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_ae92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
new file mode 100644
index 0000000..c4ea22f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_cdfe0f() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_cdfe0f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b8c192
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_cdfe0f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b8c192
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_cdfe0f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl
new file mode 100644
index 0000000..3c550b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_cdfe0f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:10: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLodOffset' : no matching overloaded function found
+ERROR: 0:9: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
new file mode 100644
index 0000000..a56b58c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ uint arg_4 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_cdfe0f(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_cdfe0f(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_cdfe0f(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
new file mode 100644
index 0000000..60850e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 63
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_cdfe0f "textureSampleLevel_cdfe0f"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %46 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %49 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_cdfe0f = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %uint_1
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %43 = OpLoad %uint %arg_4
+ %42 = OpConvertSToF %float %43
+ %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %46
+ %29 = OpCompositeExtract %float %30 0
+ OpStore %res %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c835321
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_cdfe0f() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1u;
+ const arg_5 = vec2<i32>();
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_cdfe0f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
new file mode 100644
index 0000000..438cfbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
@@ -0,0 +1,48 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_f3b2c8() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_f3b2c8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..86d0fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_f3b2c8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..86d0fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_f3b2c8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
new file mode 100644
index 0000000..b75e321
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_f3b2c8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
new file mode 100644
index 0000000..71b03c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_f3b2c8(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_f3b2c8(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_f3b2c8(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..d36a678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_f3b2c8 "textureSampleLevel_f3b2c8"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %32 = OpTypeSampledImage %11
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %39 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+ %42 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureSampleLevel_f3b2c8 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_float Function %8
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ %30 = OpLoad %14 %arg_1
+ %31 = OpLoad %11 %arg_0
+ %33 = OpSampledImage %32 %31 %30
+ %34 = OpLoad %v2float %arg_2
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertSToF %float %36
+ %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %39
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..7f7484a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_f3b2c8() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ const arg_4 = vec2<i32>();
+ var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_f3b2c8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
new file mode 100644
index 0000000..4589577
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_faa6d7() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.f;
+ const arg_5 = vec2<i32>();
+ var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_faa6d7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9aa6734
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_faa6d7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9aa6734
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+ float2 arg_2 = (0.0f).xx;
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureSampleLevel_faa6d7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureSampleLevel_faa6d7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
new file mode 100644
index 0000000..28b00f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+vec4 vertex_main() {
+ textureSampleLevel_faa6d7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+ vec2 arg_2 = vec2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void compute_main() {
+ textureSampleLevel_faa6d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
new file mode 100644
index 0000000..04351fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+ float2 arg_2 = float2(0.0f);
+ uint arg_3 = 1u;
+ float arg_4 = 1.0f;
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+ textureSampleLevel_faa6d7(tint_symbol_3, tint_symbol_4);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+ textureSampleLevel_faa6d7(tint_symbol_7, tint_symbol_8);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+ textureSampleLevel_faa6d7(tint_symbol_9, tint_symbol_10);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..4329382
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %arg_1 "arg_1"
+ OpName %textureSampleLevel_faa6d7 "textureSampleLevel_faa6d7"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %arg_4 "arg_4"
+ OpName %res "res"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ OpDecorate %arg_1 DescriptorSet 1
+ OpDecorate %arg_1 Binding 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+ %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+ %void = OpTypeVoid
+ %15 = OpTypeFunction %void
+ %v2float = OpTypeVector %float 2
+ %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+ %34 = OpTypeSampledImage %11
+ %v3float = OpTypeVector %float 3
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+ %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %49 = OpTypeFunction %v4float
+%textureSampleLevel_faa6d7 = OpFunction %void None %15
+ %18 = OpLabel
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_4 = OpVariable %_ptr_Function_float Function %8
+ %res = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_2 %20
+ OpStore %arg_3 %uint_1
+ OpStore %arg_4 %float_1
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_3
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %43 = OpLoad %float %arg_4
+ %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %46
+ OpStore %res %31
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %15
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..b9a723f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_faa6d7() {
+ var arg_2 = vec2<f32>();
+ var arg_3 = 1u;
+ var arg_4 = 1.0f;
+ const arg_5 = vec2<i32>();
+ var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureSampleLevel_faa6d7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
new file mode 100644
index 0000000..2a43425
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_07548b() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_07548b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56dfb6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_07548b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_07548b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_07548b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56dfb6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_07548b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_07548b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_07548b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
new file mode 100644
index 0000000..26da7f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_07548b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_07548b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_07548b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
new file mode 100644
index 0000000..05af3ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_07548b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_07548b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_07548b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
new file mode 100644
index 0000000..02f5ee8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_07548b "textureStore_07548b"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_07548b = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_07548b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_07548b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_07548b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c935ddc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
+
+fn textureStore_07548b() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_07548b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
new file mode 100644
index 0000000..9e357ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_158cf0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_158cf0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c2d4244
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_158cf0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_158cf0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c2d4244
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_158cf0();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_158cf0();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
new file mode 100644
index 0000000..3fbe7e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_158cf0();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_158cf0();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_158cf0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
new file mode 100644
index 0000000..b53dec4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 arg_3 = uint4(0u);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_158cf0(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_158cf0(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_158cf0(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..540fcce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_158cf0 "textureStore_158cf0"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %v3uint = OpTypeVector %uint 3
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_158cf0 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %26
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %v4uint %arg_3
+ OpImageWrite %30 %36 %37
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_158cf0
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_158cf0
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_158cf0
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..234e5ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_158cf0() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_158cf0();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
new file mode 100644
index 0000000..58f1750
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_1839f2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1839f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a349cc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1839f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1839f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a349cc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1839f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1839f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
new file mode 100644
index 0000000..290798d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_1839f2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_1839f2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_1839f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
new file mode 100644
index 0000000..2ab9268
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_1839f2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1839f2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1839f2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ceec9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1839f2 "textureStore_1839f2"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1839f2 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_1839f2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_1839f2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_1839f2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8dbc1c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
+
+fn textureStore_1839f2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1839f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
new file mode 100644
index 0000000..88a097b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_1a7d35() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1a7d35();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0a928d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1a7d35();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1a7d35();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0a928d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1a7d35();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1a7d35();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
new file mode 100644
index 0000000..3e00907
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_1a7d35();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_1a7d35();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_1a7d35();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
new file mode 100644
index 0000000..e5c4cd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 arg_3 = int4(0);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_1a7d35(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1a7d35(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1a7d35(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
new file mode 100644
index 0000000..72a691f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1a7d35 "textureStore_1a7d35"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %v3uint = OpTypeVector %uint 3
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1a7d35 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4int %arg_3
+ OpImageWrite %31 %37 %38
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_1a7d35
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
new file mode 100644
index 0000000..81eb9a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_1a7d35() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1a7d35();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
new file mode 100644
index 0000000..252b14a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_1dc954() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1dc954();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..63191df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1dc954();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1dc954();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63191df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1dc954();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1dc954();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl
new file mode 100644
index 0000000..3a1e8e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_1dc954();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_1dc954();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_1dc954();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
new file mode 100644
index 0000000..78aa861
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_1dc954(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1dc954(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1dc954(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d08c73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1dc954 "textureStore_1dc954"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1dc954 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_1dc954
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_1dc954
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_1dc954
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
new file mode 100644
index 0000000..498cfc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
+
+fn textureStore_1dc954() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1dc954();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
new file mode 100644
index 0000000..cb704a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_1e20f2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1e20f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d7b4a2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1e20f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1e20f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d7b4a2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_1e20f2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_1e20f2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
new file mode 100644
index 0000000..1ea1aaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_1e20f2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_1e20f2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_1e20f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
new file mode 100644
index 0000000..698070e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_1e20f2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_1e20f2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_1e20f2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..db47768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_1e20f2 "textureStore_1e20f2"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_1e20f2 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_1e20f2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..1116037
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
+
+fn textureStore_1e20f2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_1e20f2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
new file mode 100644
index 0000000..c00156f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_207fdd() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_207fdd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e5acc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_207fdd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_207fdd();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e5acc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_207fdd();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_207fdd();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
new file mode 100644
index 0000000..be45a70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_207fdd();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_207fdd();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_207fdd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
new file mode 100644
index 0000000..97a7ca9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_207fdd(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_207fdd(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_207fdd(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
new file mode 100644
index 0000000..b40adc5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_207fdd "textureStore_207fdd"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_207fdd = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_207fdd
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_207fdd
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_207fdd
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
new file mode 100644
index 0000000..703e7ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
+
+fn textureStore_207fdd() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_207fdd();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl
new file mode 100644
index 0000000..98f2ada
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_285218() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_285218();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e6d6c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_285218();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_285218();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_285218();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e6d6c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_285218();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_285218();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_285218();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl
new file mode 100644
index 0000000..ea017e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_285218();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_285218();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_285218();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
new file mode 100644
index 0000000..c0e94ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_285218(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_285218(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_285218(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_285218(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
new file mode 100644
index 0000000..6603867
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_285218 "textureStore_285218"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_285218 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_285218
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_285218
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_285218
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2e8b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
+
+fn textureStore_285218() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_285218();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
new file mode 100644
index 0000000..588630b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_2d2835() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2d2835();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b0cc940
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2d2835();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2d2835();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b0cc940
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2d2835();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2d2835();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl
new file mode 100644
index 0000000..cf424c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_2d2835();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_2d2835();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_2d2835();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
new file mode 100644
index 0000000..30f7ba5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_2d2835(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_2d2835(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_2d2835(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
new file mode 100644
index 0000000..ef33f05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_2d2835 "textureStore_2d2835"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_2d2835 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_2d2835
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_2d2835
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_2d2835
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
new file mode 100644
index 0000000..76e91c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_2d2835() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2d2835();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
new file mode 100644
index 0000000..2512a83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_2e6102() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2e6102();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae9f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2e6102();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2e6102();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae9f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_2e6102();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_2e6102();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
new file mode 100644
index 0000000..e3185e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_2e6102();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_2e6102();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_2e6102();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
new file mode 100644
index 0000000..76221f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_2e6102(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_2e6102(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_2e6102(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
new file mode 100644
index 0000000..e9c074c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_2e6102 "textureStore_2e6102"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_2e6102 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_2e6102
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_2e6102
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_2e6102
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
new file mode 100644
index 0000000..212a545
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
+
+fn textureStore_2e6102() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_2e6102();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
new file mode 100644
index 0000000..b5d2431
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_330b7c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_330b7c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a92e0d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_330b7c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_330b7c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a92e0d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_330b7c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_330b7c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
new file mode 100644
index 0000000..e6ed5cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_330b7c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_330b7c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_330b7c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
new file mode 100644
index 0000000..eca28c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_330b7c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_330b7c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_330b7c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
new file mode 100644
index 0000000..fcaad14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_330b7c "textureStore_330b7c"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_330b7c = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_330b7c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_330b7c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_330b7c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
new file mode 100644
index 0000000..9770e41
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_330b7c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_330b7c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
new file mode 100644
index 0000000..bffb6e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_3c1937() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3c1937();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..19a9b7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3c1937();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3c1937();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..19a9b7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3c1937();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3c1937();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl
new file mode 100644
index 0000000..13ee98a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_3c1937();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_3c1937();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_3c1937();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
new file mode 100644
index 0000000..678f483
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_3c1937(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_3c1937(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_3c1937(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
new file mode 100644
index 0000000..421d42f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_3c1937 "textureStore_3c1937"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_3c1937 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_3c1937
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_3c1937
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_3c1937
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
new file mode 100644
index 0000000..568e12c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
+
+fn textureStore_3c1937() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3c1937();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
new file mode 100644
index 0000000..dedb10e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_3d6f01() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3d6f01();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6e3241b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3d6f01();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3d6f01();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e3241b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_3d6f01();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_3d6f01();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl
new file mode 100644
index 0000000..ca32e2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_3d6f01();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_3d6f01();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_3d6f01();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
new file mode 100644
index 0000000..1e29e6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_3d6f01(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_3d6f01(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_3d6f01(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea91368
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_3d6f01 "textureStore_3d6f01"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_3d6f01 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_3d6f01
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
new file mode 100644
index 0000000..693801c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
+
+fn textureStore_3d6f01() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_3d6f01();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
new file mode 100644
index 0000000..29f4059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_40c455() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_40c455();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d607d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_40c455();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_40c455();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_40c455();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d607d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_40c455();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_40c455();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_40c455();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
new file mode 100644
index 0000000..4ae299e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_40c455();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_40c455();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_40c455();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
new file mode 100644
index 0000000..477b39a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_40c455(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_40c455(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_40c455(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
new file mode 100644
index 0000000..91daa0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_40c455 "textureStore_40c455"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_40c455 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_40c455
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_40c455
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_40c455
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a50679
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
+
+fn textureStore_40c455() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_40c455();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
new file mode 100644
index 0000000..b62f964
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_4288fc() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4288fc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bb76511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4288fc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4288fc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bb76511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4288fc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4288fc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
new file mode 100644
index 0000000..0b46698
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_4288fc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_4288fc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_4288fc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
new file mode 100644
index 0000000..578e1f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_4288fc(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_4288fc(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_4288fc(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..78e13c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_4288fc "textureStore_4288fc"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_4288fc = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_4288fc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_4288fc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_4288fc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..15e7b21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
+
+fn textureStore_4288fc() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4288fc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl
new file mode 100644
index 0000000..c0353f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_486500() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_486500();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..021c55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_486500();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_486500();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_486500();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..021c55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_486500();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_486500();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_486500();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
new file mode 100644
index 0000000..5dd0af7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_486500();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_486500();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_486500();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
new file mode 100644
index 0000000..0a5e6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_486500(texture3d<int, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_486500(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_486500(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_486500(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
new file mode 100644
index 0000000..7b219df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_486500 "textureStore_486500"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_486500 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_486500
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_486500
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_486500
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a03a81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
+
+fn textureStore_486500() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_486500();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
new file mode 100644
index 0000000..940719b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_4c454f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4c454f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0fcd9a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4c454f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4c454f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0fcd9a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_4c454f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_4c454f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl
new file mode 100644
index 0000000..941cf5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_4c454f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_4c454f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_4c454f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
new file mode 100644
index 0000000..03846dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 arg_3 = int4(0);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_4c454f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_4c454f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_4c454f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
new file mode 100644
index 0000000..39e9b43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_4c454f "textureStore_4c454f"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %v3uint = OpTypeVector %uint 3
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_4c454f = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4int %arg_3
+ OpImageWrite %31 %37 %38
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_4c454f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_4c454f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_4c454f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
new file mode 100644
index 0000000..59de4ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_4c454f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_4c454f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
new file mode 100644
index 0000000..bea26ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_506a71() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_506a71();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f75271e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_506a71();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_506a71();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_506a71();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f75271e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_506a71();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_506a71();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_506a71();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl
new file mode 100644
index 0000000..c8f958a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_506a71();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_506a71();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_506a71();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
new file mode 100644
index 0000000..1e20709
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_506a71(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_506a71(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_506a71(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
new file mode 100644
index 0000000..1f5a9ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_506a71 "textureStore_506a71"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_506a71 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %18
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_506a71
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_506a71
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_506a71
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
new file mode 100644
index 0000000..476f5e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
+
+fn textureStore_506a71() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_506a71();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
new file mode 100644
index 0000000..d2c793f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_52f503() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_52f503();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..04d3b35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_52f503();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_52f503();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_52f503();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04d3b35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_52f503();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_52f503();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_52f503();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
new file mode 100644
index 0000000..c606352
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_52f503();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_52f503();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_52f503();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
new file mode 100644
index 0000000..7bdcade
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_52f503(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_52f503(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_52f503(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
new file mode 100644
index 0000000..73053df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_52f503 "textureStore_52f503"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_52f503 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_52f503
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_52f503
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_52f503
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
new file mode 100644
index 0000000..e313fcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
+
+fn textureStore_52f503() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_52f503();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
new file mode 100644
index 0000000..3aaeaa0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_5841f8() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5841f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a823f25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5841f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5841f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a823f25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5841f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5841f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
new file mode 100644
index 0000000..ae1b777
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_5841f8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_5841f8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_5841f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
new file mode 100644
index 0000000..7f3b6ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_5841f8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5841f8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5841f8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..ad31cfd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5841f8 "textureStore_5841f8"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5841f8 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_5841f8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_5841f8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_5841f8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..6e57d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_5841f8() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5841f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
new file mode 100644
index 0000000..12d19f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_5bc4f3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5bc4f3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb3394f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5bc4f3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5bc4f3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fb3394f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5bc4f3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5bc4f3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl
new file mode 100644
index 0000000..cedf8d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_5bc4f3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_5bc4f3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_5bc4f3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
new file mode 100644
index 0000000..7983b81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 arg_3 = uint4(0u);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_5bc4f3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5bc4f3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5bc4f3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..6603a0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5bc4f3 "textureStore_5bc4f3"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %v3uint = OpTypeVector %uint 3
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5bc4f3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %26
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %v4uint %arg_3
+ OpImageWrite %30 %36 %37
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_5bc4f3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..1c223d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_5bc4f3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5bc4f3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
new file mode 100644
index 0000000..3cb1f9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_5f9a49() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5f9a49();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..37a52f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5f9a49();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5f9a49();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..37a52f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_5f9a49();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_5f9a49();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
new file mode 100644
index 0000000..648faf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_5f9a49();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_5f9a49();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_5f9a49();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
new file mode 100644
index 0000000..add811e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_5f9a49(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_5f9a49(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_5f9a49(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
new file mode 100644
index 0000000..435a41b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_5f9a49 "textureStore_5f9a49"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_5f9a49 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_5f9a49
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
new file mode 100644
index 0000000..951d70c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_5f9a49() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_5f9a49();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
new file mode 100644
index 0000000..94aaf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_602b5a() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_602b5a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d65e673
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_602b5a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_602b5a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d65e673
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_602b5a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_602b5a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl
new file mode 100644
index 0000000..c117bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_602b5a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_602b5a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_602b5a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
new file mode 100644
index 0000000..f5d1847
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_602b5a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_602b5a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_602b5a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
new file mode 100644
index 0000000..534c8e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_602b5a "textureStore_602b5a"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_602b5a = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_602b5a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_602b5a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_602b5a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca22b44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
+
+fn textureStore_602b5a() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_602b5a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
new file mode 100644
index 0000000..5548e40
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_699a1b() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_699a1b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68a4450
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_699a1b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_699a1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68a4450
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_699a1b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_699a1b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
new file mode 100644
index 0000000..b342728
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_699a1b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_699a1b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_699a1b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
new file mode 100644
index 0000000..57da1da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_699a1b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_699a1b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_699a1b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c1021a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_699a1b "textureStore_699a1b"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_699a1b = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_699a1b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_699a1b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_699a1b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..f40f039
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_699a1b() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_699a1b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl
new file mode 100644
index 0000000..7feec83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_726472() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_726472();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7730353
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_726472();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_726472();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_726472();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7730353
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_726472();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_726472();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_726472();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl
new file mode 100644
index 0000000..bbc6fea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_726472();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_726472();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_726472();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
new file mode 100644
index 0000000..5f2f55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_726472(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_726472(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_726472(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_726472(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
new file mode 100644
index 0000000..6670ea4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_726472 "textureStore_726472"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_726472 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_726472
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_726472
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_726472
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
new file mode 100644
index 0000000..b0866a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
+
+fn textureStore_726472() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_726472();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
new file mode 100644
index 0000000..caabbdb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_73bbbc() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_73bbbc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..689ab29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_73bbbc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_73bbbc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..689ab29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_73bbbc();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_73bbbc();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
new file mode 100644
index 0000000..59505cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_73bbbc();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_73bbbc();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_73bbbc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
new file mode 100644
index 0000000..941e50f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_73bbbc(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_73bbbc(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_73bbbc(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
new file mode 100644
index 0000000..8b04462
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_73bbbc "textureStore_73bbbc"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_73bbbc = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_73bbbc
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
new file mode 100644
index 0000000..7728131
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
+
+fn textureStore_73bbbc() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_73bbbc();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
new file mode 100644
index 0000000..1850240
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_779d14() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_779d14();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1d92629
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_779d14();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_779d14();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_779d14();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1d92629
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_779d14();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_779d14();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_779d14();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
new file mode 100644
index 0000000..3ad1db2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_779d14();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_779d14();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_779d14();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
new file mode 100644
index 0000000..0d04ed0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 arg_3 = uint4(0u);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_779d14(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_779d14(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_779d14(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
new file mode 100644
index 0000000..f61b543
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_779d14 "textureStore_779d14"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %v3uint = OpTypeVector %uint 3
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_779d14 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %26
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %v4uint %arg_3
+ OpImageWrite %30 %36 %37
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_779d14
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_779d14
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_779d14
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
new file mode 100644
index 0000000..543447b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_779d14() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_779d14();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
new file mode 100644
index 0000000..b64eb22
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_7cf6e7() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_7cf6e7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..516eb54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_7cf6e7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_7cf6e7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..516eb54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+ uint2 arg_1 = (0u).xx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_7cf6e7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_7cf6e7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
new file mode 100644
index 0000000..dc0045b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_7cf6e7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_7cf6e7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+ uvec2 arg_1 = uvec2(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_7cf6e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
new file mode 100644
index 0000000..f19febe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+ textureStore_7cf6e7(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_7cf6e7(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_7cf6e7(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..d303e8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_7cf6e7 "textureStore_7cf6e7"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_7cf6e7 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v2uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_7cf6e7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..f93f1a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
+
+fn textureStore_7cf6e7() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_7cf6e7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
new file mode 100644
index 0000000..5c1529a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8b9310() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8b9310();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..63e02b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8b9310();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8b9310();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63e02b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8b9310();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8b9310();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
new file mode 100644
index 0000000..07179e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_8b9310();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_8b9310();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_8b9310();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
new file mode 100644
index 0000000..a56cd43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_8b9310(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8b9310(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8b9310(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
new file mode 100644
index 0000000..6dcd46e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8b9310 "textureStore_8b9310"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8b9310 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_8b9310
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_8b9310
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_8b9310
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4095ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
+
+fn textureStore_8b9310() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8b9310();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
new file mode 100644
index 0000000..4798b48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_8bb287() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8bb287();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69cee8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8bb287();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8bb287();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69cee8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8bb287();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8bb287();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
new file mode 100644
index 0000000..88ef4d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_8bb287();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_8bb287();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_8bb287();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
new file mode 100644
index 0000000..f5202e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 arg_3 = int4(0);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_8bb287(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8bb287(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8bb287(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c82ad5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8bb287 "textureStore_8bb287"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %v3uint = OpTypeVector %uint 3
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8bb287 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4int %arg_3
+ OpImageWrite %31 %37 %38
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_8bb287
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_8bb287
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_8bb287
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
new file mode 100644
index 0000000..a8e7a96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_8bb287() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8bb287();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
new file mode 100644
index 0000000..d5510a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_8c76e9() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8c76e9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..94d7ce9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8c76e9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8c76e9();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..94d7ce9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8c76e9();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8c76e9();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl
new file mode 100644
index 0000000..8eff443
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_8c76e9();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_8c76e9();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_8c76e9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
new file mode 100644
index 0000000..c5331dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_8c76e9(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8c76e9(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8c76e9(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..dff91f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8c76e9 "textureStore_8c76e9"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8c76e9 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_8c76e9
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..41c78a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
+
+fn textureStore_8c76e9() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8c76e9();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
new file mode 100644
index 0000000..ea6156b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_8dc54f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8dc54f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9356f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8dc54f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8dc54f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9356f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8dc54f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8dc54f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
new file mode 100644
index 0000000..c736632
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_8dc54f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_8dc54f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_8dc54f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
new file mode 100644
index 0000000..a4b43c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_8dc54f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8dc54f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8dc54f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6c0c9d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8dc54f "textureStore_8dc54f"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8dc54f = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %18
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_8dc54f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
new file mode 100644
index 0000000..45a3bce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
+
+fn textureStore_8dc54f() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8dc54f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
new file mode 100644
index 0000000..cadc370
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8ed9f8() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8ed9f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0660af5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8ed9f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8ed9f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0660af5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_8ed9f8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_8ed9f8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
new file mode 100644
index 0000000..1f7cd6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_8ed9f8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_8ed9f8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_8ed9f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
new file mode 100644
index 0000000..bb463d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_8ed9f8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_8ed9f8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_8ed9f8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6fe75a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_8ed9f8 "textureStore_8ed9f8"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_8ed9f8 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_8ed9f8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..b650269
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
+
+fn textureStore_8ed9f8() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_8ed9f8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl
new file mode 100644
index 0000000..6548f0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_958353() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_958353();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07fc6aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_958353();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_958353();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_958353();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07fc6aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_958353();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_958353();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_958353();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl
new file mode 100644
index 0000000..8de8517
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_958353();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_958353();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_958353();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
new file mode 100644
index 0000000..bad5668
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_958353(texture1d<int, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_958353(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_958353(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_958353(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc99529
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_958353 "textureStore_958353"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_958353 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_958353
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_958353
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_958353
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
new file mode 100644
index 0000000..3da0474
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
+
+fn textureStore_958353() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_958353();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
new file mode 100644
index 0000000..404fd19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_959d94() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_959d94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..807d0de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_959d94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_959d94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_959d94();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..807d0de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_959d94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_959d94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_959d94();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl
new file mode 100644
index 0000000..f625148
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_959d94();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_959d94();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_959d94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
new file mode 100644
index 0000000..bd790af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_959d94(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_959d94(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_959d94(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
new file mode 100644
index 0000000..33e3eab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_959d94 "textureStore_959d94"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_959d94 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_959d94
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_959d94
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_959d94
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9300eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
+
+fn textureStore_959d94() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_959d94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
new file mode 100644
index 0000000..0b1037d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_95e452() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_95e452();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e602bae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_95e452();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_95e452();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_95e452();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e602bae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_95e452();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_95e452();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_95e452();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
new file mode 100644
index 0000000..e25384d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_95e452();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_95e452();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_95e452();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
new file mode 100644
index 0000000..ce3297b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_95e452(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_95e452(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_95e452(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
new file mode 100644
index 0000000..1fd3674
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_95e452 "textureStore_95e452"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_95e452 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_95e452
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_95e452
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_95e452
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
new file mode 100644
index 0000000..6eaf3fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
+
+fn textureStore_95e452() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_95e452();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
new file mode 100644
index 0000000..46cfbcb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_9f5318() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_9f5318();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68caac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_9f5318();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_9f5318();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68caac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_9f5318();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_9f5318();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl
new file mode 100644
index 0000000..7c24593
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_9f5318();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_9f5318();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_9f5318();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
new file mode 100644
index 0000000..190288b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_9f5318(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_9f5318(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_9f5318(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
new file mode 100644
index 0000000..821ca97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_9f5318 "textureStore_9f5318"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_9f5318 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_9f5318
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_9f5318
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_9f5318
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
new file mode 100644
index 0000000..1ab319c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
+
+fn textureStore_9f5318() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_9f5318();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
new file mode 100644
index 0000000..7ff74cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
+fn textureStore_a0f96e() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a0f96e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97ab824
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a0f96e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a0f96e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97ab824
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ float4 arg_3 = (0.0f).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a0f96e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a0f96e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
new file mode 100644
index 0000000..276a6f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_a0f96e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_a0f96e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ vec4 arg_3 = vec4(0.0f);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_a0f96e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
new file mode 100644
index 0000000..03c6f52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ float4 arg_3 = float4(0.0f);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+ textureStore_a0f96e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a0f96e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a0f96e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5277c6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a0f96e "textureStore_a0f96e"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %v3uint = OpTypeVector %uint 3
+ %36 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a0f96e = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %5
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %v4float %arg_3
+ OpImageWrite %28 %34 %35
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %41 = OpLabel
+ %42 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %42
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_a0f96e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9babfe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_a0f96e() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a0f96e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
new file mode 100644
index 0000000..d2c7483
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_a1352c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a1352c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9c5558
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a1352c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a1352c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f9c5558
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a1352c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a1352c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
new file mode 100644
index 0000000..8d0b050
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_a1352c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_a1352c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_a1352c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
new file mode 100644
index 0000000..275794f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 arg_3 = int4(0);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_a1352c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a1352c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a1352c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
new file mode 100644
index 0000000..60d2114
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a1352c "textureStore_a1352c"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %v3uint = OpTypeVector %uint 3
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a1352c = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4int %arg_3
+ OpImageWrite %31 %37 %38
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_a1352c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_a1352c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_a1352c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
new file mode 100644
index 0000000..7132f14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_a1352c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a1352c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
new file mode 100644
index 0000000..ded9f8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_a4c338() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a4c338();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbaa791
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a4c338();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a4c338();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fbaa791
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a4c338();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a4c338();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl
new file mode 100644
index 0000000..61ce0ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_a4c338();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_a4c338();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_a4c338();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
new file mode 100644
index 0000000..f4ae68c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_a4c338(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a4c338(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a4c338(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
new file mode 100644
index 0000000..3ff8ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a4c338 "textureStore_a4c338"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a4c338 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_a4c338
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_a4c338
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_a4c338
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
new file mode 100644
index 0000000..49ef550
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
+
+fn textureStore_a4c338() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a4c338();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
new file mode 100644
index 0000000..34851f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_a5e80d() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a5e80d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..89f734c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a5e80d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a5e80d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89f734c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a5e80d();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a5e80d();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
new file mode 100644
index 0000000..0bf3507
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_a5e80d();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_a5e80d();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_a5e80d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
new file mode 100644
index 0000000..09345d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_a5e80d(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a5e80d(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a5e80d(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
new file mode 100644
index 0000000..fc7f43e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a5e80d "textureStore_a5e80d"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a5e80d = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_a5e80d
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3976579
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
+
+fn textureStore_a5e80d() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a5e80d();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
new file mode 100644
index 0000000..ee01fa7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_a6e78f() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a6e78f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1bcd821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a6e78f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a6e78f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1bcd821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a6e78f();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a6e78f();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl
new file mode 100644
index 0000000..aa2d146
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_a6e78f();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_a6e78f();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_a6e78f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
new file mode 100644
index 0000000..c8eae4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_a6e78f(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a6e78f(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a6e78f(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
new file mode 100644
index 0000000..8799481
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a6e78f "textureStore_a6e78f"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a6e78f = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_a6e78f
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
new file mode 100644
index 0000000..5c8eedc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
+
+fn textureStore_a6e78f() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a6e78f();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
new file mode 100644
index 0000000..0613670
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_a9426c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a9426c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d8b282f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a9426c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a9426c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8b282f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_a9426c();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_a9426c();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
new file mode 100644
index 0000000..8289c23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_a9426c();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_a9426c();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_a9426c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
new file mode 100644
index 0000000..d04e4a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 arg_3 = uint4(0u);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_a9426c(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_a9426c(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_a9426c(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
new file mode 100644
index 0000000..51c831c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_a9426c "textureStore_a9426c"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %v3uint = OpTypeVector %uint 3
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_a9426c = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %26
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %v4uint %arg_3
+ OpImageWrite %30 %36 %37
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_a9426c
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_a9426c
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_a9426c
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
new file mode 100644
index 0000000..32f329d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_a9426c() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_a9426c();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
new file mode 100644
index 0000000..30430d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_aeb38a() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_aeb38a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..66013e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_aeb38a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_aeb38a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..66013e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_aeb38a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_aeb38a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
new file mode 100644
index 0000000..adbba2a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_aeb38a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_aeb38a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_aeb38a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
new file mode 100644
index 0000000..d8e7b55
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_aeb38a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_aeb38a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_aeb38a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e539c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_aeb38a "textureStore_aeb38a"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_aeb38a = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %18
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_aeb38a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
new file mode 100644
index 0000000..588457c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
+
+fn textureStore_aeb38a() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_aeb38a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
new file mode 100644
index 0000000..68a682b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
+fn textureStore_b42fd3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b42fd3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9088ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b42fd3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b42fd3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9088ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ uint4 arg_3 = (0u).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b42fd3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b42fd3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
new file mode 100644
index 0000000..55586e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_b42fd3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_b42fd3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ uvec4 arg_3 = uvec4(0u);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_b42fd3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
new file mode 100644
index 0000000..9896b03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ uint4 arg_3 = uint4(0u);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+ textureStore_b42fd3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b42fd3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b42fd3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e42c7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b42fd3 "textureStore_b42fd3"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %24 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %v3uint = OpTypeVector %uint 3
+ %38 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b42fd3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+ OpStore %arg_1 %18
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %26
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %v4uint %arg_3
+ OpImageWrite %30 %36 %37
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_b42fd3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..d150b77
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_b42fd3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b42fd3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
new file mode 100644
index 0000000..ece1d5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b70ded() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b70ded();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d754d63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b70ded();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b70ded();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d754d63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b70ded();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b70ded();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl
new file mode 100644
index 0000000..75601c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_b70ded();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_b70ded();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_b70ded();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
new file mode 100644
index 0000000..3a431a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_b70ded(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b70ded(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b70ded(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
new file mode 100644
index 0000000..a62ffee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b70ded "textureStore_b70ded"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b70ded = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_b70ded
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_b70ded
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_b70ded
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
new file mode 100644
index 0000000..890424d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
+
+fn textureStore_b70ded() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b70ded();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
new file mode 100644
index 0000000..7384312
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_b76ff3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b76ff3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8314e19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b76ff3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b76ff3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8314e19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+ uint2 arg_1 = (0u).xx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b76ff3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b76ff3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
new file mode 100644
index 0000000..70f8711
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_b76ff3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_b76ff3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+ uvec2 arg_1 = uvec2(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_b76ff3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
new file mode 100644
index 0000000..27f65cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+ textureStore_b76ff3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b76ff3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b76ff3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c8dff4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b76ff3 "textureStore_b76ff3"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b76ff3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_b76ff3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
new file mode 100644
index 0000000..31d8eb6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
+
+fn textureStore_b76ff3() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b76ff3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
new file mode 100644
index 0000000..521cf71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b77161() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b77161();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbf5804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b77161();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b77161();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b77161();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fbf5804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_b77161();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_b77161();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_b77161();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl
new file mode 100644
index 0000000..942bee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_b77161();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_b77161();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_b77161();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
new file mode 100644
index 0000000..dbc84ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_b77161(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_b77161(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_b77161(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
new file mode 100644
index 0000000..877baaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_b77161 "textureStore_b77161"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_b77161 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_b77161
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_b77161
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_b77161
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
new file mode 100644
index 0000000..77b02dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
+
+fn textureStore_b77161() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_b77161();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
new file mode 100644
index 0000000..f2dbc70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_c1f29e() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c1f29e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..36eb25d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c1f29e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c1f29e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36eb25d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c1f29e();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c1f29e();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl
new file mode 100644
index 0000000..4473606
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_c1f29e();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_c1f29e();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_c1f29e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
new file mode 100644
index 0000000..b3fdc8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_c1f29e(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_c1f29e(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_c1f29e(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
new file mode 100644
index 0000000..183f38c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_c1f29e "textureStore_c1f29e"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_c1f29e = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_c1f29e
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d3ff1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
+
+fn textureStore_c1f29e() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c1f29e();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
new file mode 100644
index 0000000..91424c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
@@ -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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
+fn textureStore_c2ca46() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c2ca46();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ab57f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c2ca46();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c2ca46();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ab57f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+ uint2 arg_1 = (0u).xx;
+ uint arg_2 = 1u;
+ int4 arg_3 = (0).xxxx;
+ arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_c2ca46();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_c2ca46();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
new file mode 100644
index 0000000..5f6b0be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+ textureStore_c2ca46();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+ textureStore_c2ca46();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+ uvec2 arg_1 = uvec2(0u);
+ uint arg_2 = 1u;
+ ivec4 arg_3 = ivec4(0);
+ imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+ textureStore_c2ca46();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
new file mode 100644
index 0000000..ea9becc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint arg_2 = 1u;
+ int4 arg_3 = int4(0);
+ tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+ textureStore_c2ca46(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_c2ca46(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_c2ca46(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
new file mode 100644
index 0000000..5992bcf1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_c2ca46 "textureStore_c2ca46"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %arg_3 "arg_3"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v2uint = OpTypeVector %uint 2
+ %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %25 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %v3uint = OpTypeVector %uint 3
+ %39 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_c2ca46 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %uint_1
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4int %arg_3
+ OpImageWrite %31 %37 %38
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_c2ca46
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
new file mode 100644
index 0000000..1028c67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_c2ca46() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = 1u;
+ var arg_3 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_c2ca46();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
new file mode 100644
index 0000000..92e3678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_cb3b0b() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_cb3b0b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6f20c68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_cb3b0b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_cb3b0b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6f20c68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_cb3b0b();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_cb3b0b();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
new file mode 100644
index 0000000..96f8c65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_cb3b0b();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_cb3b0b();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_cb3b0b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
new file mode 100644
index 0000000..4b6e161
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_cb3b0b(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_cb3b0b(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_cb3b0b(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..363baf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_cb3b0b "textureStore_cb3b0b"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_cb3b0b = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_cb3b0b
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..846d119
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
+
+fn textureStore_cb3b0b() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_cb3b0b();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
new file mode 100644
index 0000000..5b2e2f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_d26166() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d26166();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ec5059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d26166();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d26166();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d26166();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ec5059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+ uint arg_1 = 1u;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d26166();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d26166();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d26166();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl
new file mode 100644
index 0000000..dbd3c65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_d26166();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_d26166();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+ uint arg_1 = 1u;
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_d26166();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
new file mode 100644
index 0000000..22472ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+ textureStore_d26166(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_d26166(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_d26166(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
new file mode 100644
index 0000000..922800c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_d26166 "textureStore_d26166"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_d26166 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_d26166
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_d26166
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_d26166
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d51a44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
+
+fn textureStore_d26166() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d26166();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
new file mode 100644
index 0000000..14bffb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_d82b0a() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d82b0a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f01ea8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d82b0a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d82b0a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f01ea8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_d82b0a();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_d82b0a();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl
new file mode 100644
index 0000000..106b253
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_d82b0a();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_d82b0a();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_d82b0a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
new file mode 100644
index 0000000..edc5f9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_d82b0a(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_d82b0a(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_d82b0a(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e0a95c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_d82b0a "textureStore_d82b0a"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_d82b0a = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_d82b0a
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
new file mode 100644
index 0000000..db0d94f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
+
+fn textureStore_d82b0a() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_d82b0a();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
new file mode 100644
index 0000000..38c407e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_db92a2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_db92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..554bd67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_db92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_db92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..554bd67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_db92a2();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_db92a2();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..26e0bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_db92a2();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_db92a2();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_db92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
new file mode 100644
index 0000000..71a107a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_db92a2(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_db92a2(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_db92a2(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a570ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_db92a2 "textureStore_db92a2"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_db92a2 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %18
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_db92a2
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_db92a2
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_db92a2
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8754246
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
+
+fn textureStore_db92a2() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_db92a2();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
new file mode 100644
index 0000000..74eb6ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_de4b94() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_de4b94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..298f0d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_de4b94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_de4b94();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..298f0d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+ uint arg_1 = 1u;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_de4b94();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_de4b94();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl
new file mode 100644
index 0000000..e9d84ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_de4b94();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_de4b94();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+ uint arg_1 = 1u;
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_de4b94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
new file mode 100644
index 0000000..92bf211
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+ textureStore_de4b94(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_de4b94(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_de4b94(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d60d83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_de4b94 "textureStore_de4b94"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %21 = OpConstantNull %uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_de4b94 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %21
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_de4b94
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_de4b94
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_de4b94
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
new file mode 100644
index 0000000..112c6b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
+
+fn textureStore_de4b94() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_de4b94();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
new file mode 100644
index 0000000..c05dac5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_e7c6d8() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e7c6d8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..af74e51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e7c6d8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e7c6d8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..af74e51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+ uint arg_1 = 1u;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e7c6d8();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e7c6d8();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl
new file mode 100644
index 0000000..024a799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_e7c6d8();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_e7c6d8();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word.
+WARNING: 0:4: 'layout' : useless application of layout qualifier
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+ uint arg_1 = 1u;
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_e7c6d8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word.
+WARNING: 0:3: 'layout' : useless application of layout qualifier
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
new file mode 100644
index 0000000..9b202d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) {
+ uint arg_1 = 1u;
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+ textureStore_e7c6d8(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_e7c6d8(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_e7c6d8(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e7268c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability Image1D
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_e7c6d8 "textureStore_e7c6d8"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_e7c6d8 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_uint Function %20
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %uint_1
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_e7c6d8
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..7815feb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
+
+fn textureStore_e7c6d8() {
+ var arg_1 = 1u;
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e7c6d8();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
new file mode 100644
index 0000000..dfffdaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_e8cbf7() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e8cbf7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..645dff7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e8cbf7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e8cbf7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..645dff7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+ uint2 arg_1 = (0u).xx;
+ uint4 arg_2 = (0u).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_e8cbf7();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_e8cbf7();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
new file mode 100644
index 0000000..5852ebd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_e8cbf7();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_e8cbf7();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+ uvec2 arg_1 = uvec2(0u);
+ uvec4 arg_2 = uvec4(0u);
+ imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_e8cbf7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
new file mode 100644
index 0000000..92344cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) {
+ uint2 arg_1 = uint2(0u);
+ uint4 arg_2 = uint4(0u);
+ tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+ textureStore_e8cbf7(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_e8cbf7(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_e8cbf7(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..83db776
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_e8cbf7 "textureStore_e8cbf7"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %uint = OpTypeInt 32 0
+ %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %v2uint = OpTypeVector %uint 2
+ %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %v4uint = OpTypeVector %uint 4
+ %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %29 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_e8cbf7 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ OpStore %arg_1 %18
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %v2uint %arg_1
+ %28 = OpLoad %v4uint %arg_2
+ OpImageWrite %26 %27 %28
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %34 = OpLabel
+ %35 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %35
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_e8cbf7
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..f43ca9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
+
+fn textureStore_e8cbf7() {
+ var arg_1 = vec2<u32>();
+ var arg_2 = vec4<u32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_e8cbf7();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
new file mode 100644
index 0000000..1014342
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_f1e6d3() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_f1e6d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56d522a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_f1e6d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_f1e6d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56d522a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+ uint3 arg_1 = (0u).xxx;
+ int4 arg_2 = (0).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_f1e6d3();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_f1e6d3();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
new file mode 100644
index 0000000..a4e196b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_f1e6d3();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_f1e6d3();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+ uvec3 arg_1 = uvec3(0u);
+ ivec4 arg_2 = ivec4(0);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_f1e6d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
new file mode 100644
index 0000000..c32f6a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ int4 arg_2 = int4(0);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+ textureStore_f1e6d3(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_f1e6d3(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_f1e6d3(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..baf5519
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_f1e6d3 "textureStore_f1e6d3"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %int = OpTypeInt 32 1
+ %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %13 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %v4int = OpTypeVector %int 4
+ %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_f1e6d3 = OpFunction %void None %13
+ %16 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ OpStore %arg_1 %19
+ OpStore %arg_2 %23
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %13
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_f1e6d3
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..3fe60f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
+
+fn textureStore_f1e6d3() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<i32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_f1e6d3();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
new file mode 100644
index 0000000..808c43b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
@@ -0,0 +1,46 @@
+// 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.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+// test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_fcbe66() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_fcbe66();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f4a6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_fcbe66();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_fcbe66();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2f4a6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+ uint3 arg_1 = (0u).xxx;
+ float4 arg_2 = (0.0f).xxxx;
+ arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+ float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+ textureStore_fcbe66();
+ return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+ const float4 inner_result = vertex_main_inner();
+ tint_symbol wrapper_result = (tint_symbol)0;
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+ return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+ textureStore_fcbe66();
+ return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl
new file mode 100644
index 0000000..5f0b171
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+ textureStore_fcbe66();
+ return vec4(0.0f);
+}
+
+void main() {
+ gl_PointSize = 1.0;
+ vec4 inner_result = vertex_main();
+ gl_Position = inner_result;
+ gl_Position.y = -(gl_Position.y);
+ gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+ textureStore_fcbe66();
+}
+
+void main() {
+ fragment_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+ uvec3 arg_1 = uvec3(0u);
+ vec4 arg_2 = vec4(0.0f);
+ imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+ textureStore_fcbe66();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ compute_main();
+ return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated
+ERROR: 2 compilation errors. No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
new file mode 100644
index 0000000..e370bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_fcbe66(texture3d<float, access::write> tint_symbol_1) {
+ uint3 arg_1 = uint3(0u);
+ float4 arg_2 = float4(0.0f);
+ tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+ float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+ textureStore_fcbe66(tint_symbol_2);
+ return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+ float4 const inner_result = vertex_main_inner(tint_symbol_3);
+ tint_symbol wrapper_result = {};
+ wrapper_result.value = inner_result;
+ return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+ textureStore_fcbe66(tint_symbol_4);
+ return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+ textureStore_fcbe66(tint_symbol_5);
+ return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
new file mode 100644
index 0000000..e40ac5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ OpCapability StorageImageExtendedFormats
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+ OpEntryPoint Fragment %fragment_main "fragment_main"
+ OpEntryPoint GLCompute %compute_main "compute_main"
+ OpExecutionMode %fragment_main OriginUpperLeft
+ OpExecutionMode %compute_main LocalSize 1 1 1
+ OpName %value "value"
+ OpName %vertex_point_size "vertex_point_size"
+ OpName %arg_0 "arg_0"
+ OpName %textureStore_fcbe66 "textureStore_fcbe66"
+ OpName %arg_1 "arg_1"
+ OpName %arg_2 "arg_2"
+ OpName %vertex_main_inner "vertex_main_inner"
+ OpName %vertex_main "vertex_main"
+ OpName %fragment_main "fragment_main"
+ OpName %compute_main "compute_main"
+ OpDecorate %value BuiltIn Position
+ OpDecorate %vertex_point_size BuiltIn PointSize
+ OpDecorate %arg_0 NonReadable
+ OpDecorate %arg_0 DescriptorSet 1
+ OpDecorate %arg_0 Binding 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %5 = OpConstantNull %v4float
+ %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+ %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+ %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+ %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %uint = OpTypeInt 32 0
+ %v3uint = OpTypeVector %uint 3
+ %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %27 = OpTypeFunction %v4float
+ %float_1 = OpConstant %float 1
+%textureStore_fcbe66 = OpFunction %void None %12
+ %15 = OpLabel
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+ OpStore %arg_1 %18
+ OpStore %arg_2 %5
+ %24 = OpLoad %11 %arg_0
+ %25 = OpLoad %v3uint %arg_1
+ %26 = OpLoad %v4float %arg_2
+ OpImageWrite %24 %25 %26
+ OpReturn
+ OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturnValue %5
+ OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+ %32 = OpLabel
+ %33 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %33
+ OpStore %vertex_point_size %float_1
+ OpReturn
+ OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturn
+ OpFunctionEnd
+%compute_main = OpFunction %void None %12
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_fcbe66
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
new file mode 100644
index 0000000..8401058
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
+
+fn textureStore_fcbe66() {
+ var arg_1 = vec3<u32>();
+ var arg_2 = vec4<f32>();
+ textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+ textureStore_fcbe66();
+ return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+ textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+ textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
index 8e83264..866b199 100644
--- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_06794e();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000166C5129750(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000166C5129750(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
index 9874ab3..affbe8d 100644
--- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_5edd96();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F440374A40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F440374A40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
index cfb38a5..dcca576 100644
--- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_5f36bf();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002500869E2F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002500869E2F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
index cd61e2c..14a14de 100644
--- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_7be8b2();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E28C70990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E28C70990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
index 62a9408..251fa54 100644
--- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_844869();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A73CD16C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A73CD16C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
index 478d92f..e731f0c 100644
--- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_8c06ce();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FE8A7D600(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FE8A7D600(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
index ba9abbe..8827e68 100644
--- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_b9ad1f();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BE022AEC60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BE022AEC60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
index cab5786..a8c55bc 100644
--- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_d6faec();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022366B94660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022366B94660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
index d4414a3..03aad4c 100644
--- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
transpose_faeb05();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F09DB3BF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F09DB3BF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
index b061405..66c441a 100644
--- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
trunc_103ab8();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020DD35586D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020DD35586D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
index 36a52b1..0e3d94d 100644
--- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
trunc_a56109();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD3B6C86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD3B6C86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
index 2c934e2..2f7fe08 100644
--- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
trunc_cc2b0d();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023FD3F982D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023FD3F982D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
index 58aab6d..232fb88 100644
--- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
trunc_ce7c17();
return;
}
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001469F0570D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001469F0570D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-