tint: Add builtin tests for arguments passed by var

Change-Id: I81b69d23e40675d7f525e6369afec9aa0659d043
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92321
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton 2022-06-02 14:36:10 +00:00 committed by Dawn LUCI CQ
parent 913a1aaf62
commit c0af5c5c9c
5031 changed files with 211402 additions and 10539 deletions

View File

@ -496,22 +496,22 @@ fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d
fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_2d_array<F, A>) -> vec2<i32>
fn textureDimensions<F: texel_format, A: write_only>(texture: texture_storage_3d<F, A>) -> vec3<i32>
fn textureDimensions(texture: texture_external) -> vec2<i32>
fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
fn textureGather<T: fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T>
fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T>
fn textureGather<T: fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T>
fn textureGather<T: fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
fn textureGather<T: fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T>
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(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> 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, offset: vec2<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(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 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32>
fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> i32
@ -533,59 +533,59 @@ fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> i32
fn textureNumSamples(texture: texture_depth_multisampled_2d) -> i32
@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>, offset: vec2<i32>) -> 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, offset: vec2<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(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> 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(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> 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, offset: vec2<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(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 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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, offset: vec3<i32>) -> 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 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, offset: vec2<i32>) -> 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, 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, @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
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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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 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>, offset: vec2<i32>) -> 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>, 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>, @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>, offset: vec3<i32>) -> 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 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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, offset: vec3<i32>) -> 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, offset: vec2<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, offset: vec2<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(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>

View File

@ -13601,16 +13601,16 @@ constexpr IntrinsicInfo kBuiltins[] = {
},
{
/* [83] */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<T> */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<T> */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
/* fn textureGather<T : fiu32>(component: i32, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<T> */
/* 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(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> 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, offset: vec2<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(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> */
/* num overloads */ 12,
@ -13619,9 +13619,9 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [84] */
/* 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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> */
/* num overloads */ 6,
@ -13663,17 +13663,17 @@ constexpr IntrinsicInfo kBuiltins[] = {
/* [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>, offset: vec2<i32>) -> 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, offset: vec2<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(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
/* fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, offset: vec3<i32>) -> 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(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 */
/* fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> f32 */
/* fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @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 */
/* num overloads */ 15,
@ -13682,11 +13682,11 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [89] */
/* 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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, offset: vec3<i32>) -> 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> */
/* num overloads */ 8,
@ -13695,9 +13695,9 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [90] */
/* 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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 */
/* num overloads */ 6,
@ -13706,9 +13706,9 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [91] */
/* 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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 */
/* num overloads */ 6,
@ -13717,11 +13717,11 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [92] */
/* 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>, offset: vec2<i32>) -> 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>, 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>, @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>, offset: vec3<i32>) -> 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> */
/* num overloads */ 8,
@ -13730,17 +13730,17 @@ constexpr IntrinsicInfo kBuiltins[] = {
{
/* [93] */
/* 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, offset: vec2<i32>) -> 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, offset: vec2<i32>) -> 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(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, offset: vec3<i32>) -> 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, offset: vec2<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, offset: vec2<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(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */

View File

@ -1,7 +1,7 @@
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/builtin-gen to generate the wgsl files in the
./literal/... subdirectories
./literal/... and ./var/... subdirectories
See:
* tools/cmd/intrinsic-gen/gen for structures used by this template
@ -19,24 +19,30 @@ See:
{{- /* Generate a ./literal/<function>/<permuataion-hash>.wgsl file using
the Permutation macro defined below */ -}}
{{- $file := printf "./literal/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
{{- $content := Eval "Permutation" . -}}
{{- $content := Eval "Permutation" "Overload" . "Mode" "literal" -}}
{{- WriteFile $file $content -}}
{{- /* Generate a ./var/<function>/<permuataion-hash>.wgsl file using
the Permutation macro defined below */ -}}
{{- $file := printf "./var/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
{{- $content := Eval "Permutation" "Overload" . "Mode" "var" -}}
{{- WriteFile $file $content -}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- /* ------------------------------------------------------------------ */ -}}
{{- define "Permutation" -}}
{{- /* Emits the body of the intrinsic permuation .wgsl file */ -}}
{{- /* ------------------------------------------------------------------ */ -}}
{{- $builtin := .Intrinsic.Name -}}
{{- $permutation := printf "%v_%v" $builtin .Hash -}}
{{- $overload := .Overload -}}
{{- $mode := .Mode -}}
{{- $builtin := $overload.Intrinsic.Name -}}
{{- $permutation := printf "%v_%v" $builtin $overload.Hash -}}
{{- $args := Map -}}
{{- /* Generate RW storage buffer parameters */ -}}
{{- $sb_rw_fields := Eval "EmitBufferFields" "overload" .
{{- $sb_rw_fields := Eval "EmitBufferFields" "overload" $overload
"var_name" "sb_rw"
"storage" "storage"
"access" "read_write"
@ -49,7 +55,7 @@ struct SB_RW {
{{ end -}}
{{- /* Generate RO storage buffer parameters */ -}}
{{- $sb_ro_fields := Eval "EmitBufferFields" "overload" .
{{- $sb_ro_fields := Eval "EmitBufferFields" "overload" $overload
"var_name" "sb_ro"
"storage" "storage"
"access" "read"
@ -62,7 +68,7 @@ struct SB_RO {
{{ end -}}
{{- /* Generate uniform buffer parameters */ -}}
{{- $ub_fields := Eval "EmitBufferFields" "overload" .
{{- $ub_fields := Eval "EmitBufferFields" "overload" $overload
"var_name" "ub"
"storage" "uniform"
"access" "read"
@ -75,7 +81,7 @@ struct UB {
{{ end -}}
{{- /* Generate module-scoped handle variables */ -}}
{{- range $i, $p := .Parameters }}
{{- range $i, $p := $overload.Parameters }}
{{- $class := Eval "StorageClass" $p.Type -}}
{{- if eq "ptr" $p.Type.Target.Name -}}
{{- $el_type := Eval "Type" (index $p.Type.TemplateArguments 1)}}
@ -109,12 +115,15 @@ struct UB {
// {{$.Overload}}
fn {{$permutation}}() {
{{/* Build the parameters either as 'var' or inline values */ -}}
{{- range $i, $p := .Parameters -}}
{{- range $i, $p := $overload.Parameters -}}
{{- $class := Eval "StorageClass" $p.Type -}}
{{- if eq "function" $class -}}
{{- if eq "ptr" $p.Type.Target.Name -}}
{{- /*indent*/}} var arg_{{$i}}: {{template "Type" index $p.Type.TemplateArguments 1}};
{{ $args.Put $i (printf "&arg_%v" $i) -}}
{{- else if and (not $p.IsConst) (eq "var" $mode) -}}
{{- /*indent*/}} var arg_{{$i}} = {{Eval "ArgumentValue" $p}};
{{ $args.Put $i (printf "arg_%v" $i) -}}
{{- else -}}
{{- $args.Put $i (Eval "ArgumentValue" $p) -}}
{{- end -}}
@ -123,18 +132,18 @@ fn {{$permutation}}() {
{{- /* Make the call to the intrinsic */ -}}
{{- /*indent*/}} {{/*indent*/ -}}
{{- if .ReturnType -}}
var res{{if IsDeclarable .ReturnType}}: {{template "Type" .ReturnType}}{{end}} = {{/* preserve space after = */ -}}
{{- if $overload.ReturnType -}}
var res{{if IsDeclarable $overload.ReturnType}}: {{template "Type" $overload.ReturnType}}{{end}} = {{/* preserve space after = */ -}}
{{- end -}}
{{$builtin}}(
{{- range $i, $p := .Parameters -}}
{{- range $i, $p := $overload.Parameters -}}
{{- if $i -}}, {{end}}{{$args.Get $i -}}
{{- end -}}
);
}
{{/*new line*/ -}}
{{- if .CanBeUsedInStage.Vertex }}
{{- if $overload.CanBeUsedInStage.Vertex }}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
{{$permutation}}();
@ -142,14 +151,14 @@ fn vertex_main() -> @builtin(position) vec4<f32> {
}
{{ end -}}
{{- if .CanBeUsedInStage.Fragment }}
{{- if $overload.CanBeUsedInStage.Fragment }}
@stage(fragment)
fn fragment_main() {
{{$permutation}}();
}
{{ end -}}
{{- if .CanBeUsedInStage.Compute }}
{{- if $overload.CanBeUsedInStage.Compute }}
@stage(compute) @workgroup_size(1)
fn compute_main() {
{{$permutation}}();

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
fn textureGather_01305f() {
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_01305f();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_01305f();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_01305f();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_01305f() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_01305f();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_01305f() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_01305f();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_01305f() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_01305f();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2DArray<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_01305f() {
uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_01305f();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_01305f();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_01305f();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_01305f(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_01305f(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_01305f(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_01305f(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,89 +0,0 @@
; 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_01305f "textureGather_01305f"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%34 = OpConstantNull %v4uint
%35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_01305f = 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
%28 = OpConvertSToF %float %int_1
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
%20 = OpImageGather %v4uint %25 %31 %int_1
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %35
%37 = OpLabel
%38 = OpFunctionCall %void %textureGather_01305f
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_01305f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%47 = OpLabel
%48 = OpFunctionCall %void %textureGather_01305f
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_01305f() {
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_01305f();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_01305f();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_01305f();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<f32>
fn textureGather_06030a() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_06030a();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_06030a();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_06030a();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_06030a() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
vec4 vertex_main() {
textureGather_06030a();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_06030a() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void fragment_main() {
textureGather_06030a();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_06030a() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void compute_main() {
textureGather_06030a();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_06030a() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_06030a();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_06030a();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_06030a();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_06030a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_06030a(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_06030a(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_06030a(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,88 +0,0 @@
; 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_06030a "textureGather_06030a"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
%31 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_06030a = 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 = OpConvertSToF %float %int_1
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
%19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %31
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34
%36 = OpLabel
%37 = OpFunctionCall %void %textureGather_06030a
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_06030a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%46 = OpLabel
%47 = OpFunctionCall %void %textureGather_06030a
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_06030a() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_06030a();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_06030a();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_06030a();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
fn textureGather_15d79c() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_15d79c();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_15d79c();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_15d79c();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp sampler2D arg_1_arg_2;
void textureGather_15d79c() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
vec4 vertex_main() {
textureGather_15d79c();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_15d79c() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
void fragment_main() {
textureGather_15d79c();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2D arg_1_arg_2;
void textureGather_15d79c() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
void compute_main() {
textureGather_15d79c();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2D<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_15d79c() {
float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_15d79c();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_15d79c();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_15d79c();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_15d79c(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_15d79c(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_15d79c(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_15d79c(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,86 +0,0 @@
; 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_15d79c "textureGather_15d79c"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
%29 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_15d79c = 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 %int_1 ConstOffset %29
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %textureGather_15d79c
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_15d79c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%44 = OpLabel
%45 = OpFunctionCall %void %textureGather_15d79c
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_2d<f32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_15d79c() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_15d79c();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_15d79c();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_15d79c();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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 textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_1f7f6b() {
var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_1f7f6b();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_1f7f6b();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_1f7f6b();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0));
}
vec4 vertex_main() {
textureGather_1f7f6b();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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 textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0));
}
void fragment_main() {
textureGather_1f7f6b();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0));
}
void compute_main() {
textureGather_1f7f6b();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2D arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
void textureGather_1f7f6b() {
float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_1f7f6b();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_1f7f6b();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_1f7f6b();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_1f7f6b(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0));
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
textureGather_1f7f6b(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)]]) {
textureGather_1f7f6b(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)]]) {
textureGather_1f7f6b(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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 %textureGather_1f7f6b "textureGather_1f7f6b"
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
%22 = OpTypeSampledImage %11
%v2float = OpTypeVector %float 2
%25 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2
%29 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_1f7f6b = 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
%19 = OpImageGather %v4float %23 %25 %int_0 ConstOffset %29
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %textureGather_1f7f6b
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_1f7f6b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%44 = OpLabel
%45 = OpFunctionCall %void %textureGather_1f7f6b
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,23 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d;
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_1f7f6b() {
var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_1f7f6b();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_1f7f6b();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_1f7f6b();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32) -> vec4<f32>
fn textureGather_22e930() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_22e930();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_22e930();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_22e930();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_22e930();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_22e930();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_22e930();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_22e930() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_22e930();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_22e930();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_22e930();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_22e930(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_22e930(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_22e930(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_22e930(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_22e930 "textureGather_22e930"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_22e930 = 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 = OpConvertSToF %float %int_1
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
%19 = OpImageGather %v4float %23 %29 %int_1
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %textureGather_22e930
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_22e930
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%44 = OpLabel
%45 = OpFunctionCall %void %textureGather_22e930
OpReturn
OpFunctionEnd

View File

@ -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_22e930() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_22e930();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_22e930();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_22e930();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32) -> vec4<u32>
fn textureGather_2cc066() {
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_2cc066();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_2cc066();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_2cc066();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_2cc066() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_2cc066();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_2cc066() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_2cc066();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_2cc066() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_2cc066();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2DArray<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_2cc066() {
uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_2cc066();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_2cc066();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_2cc066();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_2cc066(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_2cc066(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_2cc066(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_2cc066(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_2cc066 "textureGather_2cc066"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%34 = OpConstantNull %v4uint
%35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_2cc066 = 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
%28 = OpConvertSToF %float %int_1
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
%20 = OpImageGather %v4uint %25 %31 %int_1
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %35
%37 = OpLabel
%38 = OpFunctionCall %void %textureGather_2cc066
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_2cc066
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%47 = OpLabel
%48 = OpFunctionCall %void %textureGather_2cc066
OpReturn
OpFunctionEnd

View File

@ -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_2cc066() {
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_2cc066();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_2cc066();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_2cc066();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
fn textureGather_3112e8() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3112e8();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3112e8();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3112e8();
}

View File

@ -1,78 +0,0 @@
SKIP: FAILED
#version 310 es
uniform highp samplerCubeArray arg_1_arg_2;
void textureGather_3112e8() {
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_3112e8();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_3112e8() {
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_3112e8();
}
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_3112e8() {
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_3112e8();
}
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.

View File

@ -1,33 +0,0 @@
TextureCubeArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_3112e8() {
float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_3112e8();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_3112e8();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_3112e8();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_3112e8(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, 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_3112e8(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_3112e8(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_3112e8(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,86 +0,0 @@
; 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_3112e8 "textureGather_3112e8"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%31 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_3112e8 = 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 = OpConvertSToF %float %int_1
%28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
%19 = OpImageGather %v4float %23 %28 %int_1
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %31
%33 = OpLabel
%34 = OpFunctionCall %void %textureGather_3112e8
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_3112e8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%43 = OpLabel
%44 = OpFunctionCall %void %textureGather_3112e8
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_3112e8() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3112e8();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3112e8();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3112e8();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_32c4e8() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_32c4e8();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_32c4e8();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_32c4e8();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp samplerCube arg_1_arg_2;
void textureGather_32c4e8() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
vec4 vertex_main() {
textureGather_32c4e8();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_32c4e8() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
void fragment_main() {
textureGather_32c4e8();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp samplerCube arg_1_arg_2;
void textureGather_32c4e8() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
void compute_main() {
textureGather_32c4e8();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
TextureCube<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_32c4e8() {
float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_32c4e8();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_32c4e8();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_32c4e8();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_32c4e8(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_32c4e8(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_32c4e8(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_32c4e8(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_32c4e8 "textureGather_32c4e8"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_32c4e8 = 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 %int_1
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %textureGather_32c4e8
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_32c4e8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%42 = OpLabel
%43 = OpFunctionCall %void %textureGather_32c4e8
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,23 @@
@group(1) @binding(1) var arg_1 : texture_cube<f32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_32c4e8() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_32c4e8();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_32c4e8();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_32c4e8();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
fn textureGather_3b32cc() {
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3b32cc();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3b32cc();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3b32cc();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp usamplerCube arg_1_arg_2;
void textureGather_3b32cc() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
vec4 vertex_main() {
textureGather_3b32cc();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_3b32cc() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
void fragment_main() {
textureGather_3b32cc();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp usamplerCube arg_1_arg_2;
void textureGather_3b32cc() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1);
}
void compute_main() {
textureGather_3b32cc();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
TextureCube<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_3b32cc() {
uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_3b32cc();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_3b32cc();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_3b32cc();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_3b32cc(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_3b32cc(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_3b32cc(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_3b32cc(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_3b32cc "textureGather_3b32cc"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%32 = OpConstantNull %v4uint
%33 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_3b32cc = 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
%20 = OpImageGather %v4uint %25 %27 %int_1
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %33
%35 = OpLabel
%36 = OpFunctionCall %void %textureGather_3b32cc
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_3b32cc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%45 = OpLabel
%46 = OpFunctionCall %void %textureGather_3b32cc
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,23 @@
@group(1) @binding(1) var arg_1 : texture_cube<u32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_3b32cc() {
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3b32cc();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3b32cc();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3b32cc();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
fn textureGather_3c527e() {
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3c527e();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3c527e();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3c527e();
}

View File

@ -1,78 +0,0 @@
SKIP: FAILED
#version 310 es
uniform highp usamplerCubeArray arg_1_arg_2;
void textureGather_3c527e() {
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_3c527e();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_3c527e() {
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_3c527e();
}
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_3c527e() {
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_3c527e();
}
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.

View File

@ -1,33 +0,0 @@
TextureCubeArray<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_3c527e() {
uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_3c527e();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_3c527e();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_3c527e();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_3c527e(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, 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_3c527e(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_3c527e(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_3c527e(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,89 +0,0 @@
; 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_3c527e "textureGather_3c527e"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%33 = OpConstantNull %v4uint
%34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_3c527e = 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
%27 = OpConvertSToF %float %int_1
%30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
%20 = OpImageGather %v4uint %25 %30 %int_1
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34
%36 = OpLabel
%37 = OpFunctionCall %void %textureGather_3c527e
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_3c527e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%46 = OpLabel
%47 = OpFunctionCall %void %textureGather_3c527e
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_3c527e() {
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_3c527e();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_3c527e();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_3c527e();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
fn textureGather_49b07f() {
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_49b07f();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_49b07f();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_49b07f();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp usampler2D arg_1_arg_2;
void textureGather_49b07f() {
uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
vec4 vertex_main() {
textureGather_49b07f();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_49b07f() {
uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
void fragment_main() {
textureGather_49b07f();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp usampler2D arg_1_arg_2;
void textureGather_49b07f() {
uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1);
}
void compute_main() {
textureGather_49b07f();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2D<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_49b07f() {
uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_49b07f();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_49b07f();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_49b07f();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_49b07f(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_49b07f(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_49b07f(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_49b07f(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_49b07f "textureGather_49b07f"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 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_49b07f = 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 %int_1 ConstOffset %31
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %35
%37 = OpLabel
%38 = OpFunctionCall %void %textureGather_49b07f
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_49b07f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%47 = OpLabel
%48 = OpFunctionCall %void %textureGather_49b07f
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,23 @@
@group(1) @binding(1) var arg_1 : texture_2d<u32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_49b07f() {
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_49b07f();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_49b07f();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_49b07f();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_4b8103() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_4b8103();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_4b8103();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_4b8103();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_4b8103() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
vec4 vertex_main() {
textureGather_4b8103();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_4b8103() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void fragment_main() {
textureGather_4b8103();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_4b8103() {
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void compute_main() {
textureGather_4b8103();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_4b8103() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_4b8103();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_4b8103();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_4b8103();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_4b8103(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_4b8103(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_4b8103(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_4b8103(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_4b8103 "textureGather_4b8103"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
%31 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_4b8103 = 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 = OpConvertSToF %float %int_1
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
%19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %31
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34
%36 = OpLabel
%37 = OpFunctionCall %void %textureGather_4b8103
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_4b8103
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%46 = OpLabel
%47 = OpFunctionCall %void %textureGather_4b8103
OpReturn
OpFunctionEnd

View File

@ -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_4b8103() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_4b8103();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_4b8103();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_4b8103();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, offset: vec2<i32>) -> vec4<i32>
fn textureGather_4f2350() {
var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_4f2350();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_4f2350();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_4f2350();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_4f2350() {
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
vec4 vertex_main() {
textureGather_4f2350();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_4f2350() {
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void fragment_main() {
textureGather_4f2350();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_4f2350() {
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1);
}
void compute_main() {
textureGather_4f2350();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2DArray<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_4f2350() {
int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_4f2350();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_4f2350();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_4f2350();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_4f2350(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_4f2350(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_4f2350(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_4f2350(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,90 +0,0 @@
; 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_4f2350 "textureGather_4f2350"
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
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
%32 = OpConstantNull %v2int
%_ptr_Function_v4int = OpTypePointer Function %v4int
%35 = OpConstantNull %v4int
%36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_4f2350 = OpFunction %void None %16
%19 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %35
%22 = OpLoad %15 %arg_2
%23 = OpLoad %11 %arg_1
%25 = OpSampledImage %24 %23 %22
%28 = OpConvertSToF %float %int_1
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
%20 = OpImageGather %v4int %25 %30 %int_1 ConstOffset %32
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %36
%38 = OpLabel
%39 = OpFunctionCall %void %textureGather_4f2350
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_4f2350
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%48 = OpLabel
%49 = OpFunctionCall %void %textureGather_4f2350
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_4f2350() {
var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_4f2350();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_4f2350();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_4f2350();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
fn textureGather_51cf0b() {
var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_51cf0b();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_51cf0b();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_51cf0b();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_51cf0b() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
vec4 vertex_main() {
textureGather_51cf0b();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_51cf0b() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void fragment_main() {
textureGather_51cf0b();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_51cf0b() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1);
}
void compute_main() {
textureGather_51cf0b();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2DArray<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_51cf0b() {
int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_51cf0b();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_51cf0b();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_51cf0b();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_51cf0b(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_51cf0b(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_51cf0b(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_51cf0b(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,88 +0,0 @@
; 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_51cf0b "textureGather_51cf0b"
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
%int_1 = OpConstant %int 1
%_ptr_Function_v4int = OpTypePointer Function %v4int
%33 = OpConstantNull %v4int
%34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_51cf0b = 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
%28 = OpConvertSToF %float %int_1
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
%20 = OpImageGather %v4int %25 %30 %int_1
OpStore %res %20
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34
%36 = OpLabel
%37 = OpFunctionCall %void %textureGather_51cf0b
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_51cf0b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%46 = OpLabel
%47 = OpFunctionCall %void %textureGather_51cf0b
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_51cf0b() {
var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1);
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_51cf0b();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_51cf0b();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_51cf0b();
}

View File

@ -0,0 +1,47 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather_5266da() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_5266da();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_5266da();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_5266da();
}

View File

@ -0,0 +1,55 @@
#version 310 es
uniform highp sampler2D arg_1_arg_2;
void textureGather_5266da() {
vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1);
}
vec4 vertex_main() {
textureGather_5266da();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_5266da() {
vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1);
}
void fragment_main() {
textureGather_5266da();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2D arg_1_arg_2;
void textureGather_5266da() {
vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1);
}
void compute_main() {
textureGather_5266da();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
Texture2D<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1);
void textureGather_5266da() {
float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_5266da();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_5266da();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_5266da();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_5266da(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_5266da(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_5266da(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_5266da(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -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_5266da "textureGather_5266da"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_5266da = 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 %int_1
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %textureGather_5266da
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_5266da
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%42 = OpLabel
%43 = OpFunctionCall %void %textureGather_5266da
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,23 @@
@group(1) @binding(1) var arg_1 : texture_2d<f32>;
@group(1) @binding(2) var arg_2 : sampler;
fn textureGather_5266da() {
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_5266da();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_5266da();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_5266da();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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: i32, offset: vec2<i32>) -> vec4<f32>
fn textureGather_53ece6() {
var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_53ece6();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_53ece6();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_53ece6();
}

View File

@ -1,55 +0,0 @@
#version 310 es
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_53ece6() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0));
}
vec4 vertex_main() {
textureGather_53ece6();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = 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_53ece6() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0));
}
void fragment_main() {
textureGather_53ece6();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_53ece6() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0));
}
void compute_main() {
textureGather_53ece6();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -1,33 +0,0 @@
Texture2DArray arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
void textureGather_53ece6() {
float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx);
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
textureGather_53ece6();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const 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_53ece6();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
textureGather_53ece6();
return;
}

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
using namespace metal;
void textureGather_53ece6(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, 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_53ece6(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_53ece6(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_53ece6(tint_symbol_9, tint_symbol_10);
return;
}

View File

@ -1,89 +0,0 @@
; 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 %textureGather_53ece6 "textureGather_53ece6"
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
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2
%32 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_53ece6 = 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 = OpConvertSToF %float %int_1
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
%19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %32
OpStore %res %19
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %35
%37 = OpLabel
%38 = OpFunctionCall %void %textureGather_53ece6
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_53ece6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%47 = OpLabel
%48 = OpFunctionCall %void %textureGather_53ece6
OpReturn
OpFunctionEnd

View File

@ -1,23 +0,0 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_53ece6() {
var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1, vec2<i32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_53ece6();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_53ece6();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_53ece6();
}

View File

@ -1,47 +0,0 @@
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/intrinsic-gen
// using the template:
// test/tint/builtins/gen/gen.wgsl.tmpl
// and the intrinsic defintion file:
// src/tint/intrinsics.def
//
// 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(component: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_57bfc6() {
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
textureGather_57bfc6();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
textureGather_57bfc6();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
textureGather_57bfc6();
}

Some files were not shown because too many files have changed in this diff Show More