tint/intrinsics: Allow mixing of signed / unsigned integer arguments
Fixed: tint:1733 Change-Id: Id83c5c5a59df062320a9a9fde087a34b85fbaa2a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107160 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
083f68cbdf
commit
2e376a9bb0
|
@ -9,6 +9,7 @@
|
||||||
### New features
|
### New features
|
||||||
|
|
||||||
* Uniformity analysis failures are warnings again [tint:1728](crbug.com/tint/1728)
|
* Uniformity analysis failures are warnings again [tint:1728](crbug.com/tint/1728)
|
||||||
|
* You can now call texture builtins with a mix of signed and unsigned integer arguments. [tint:1733](crbug.com/tint/1733)
|
||||||
|
|
||||||
## Changes for M108
|
## Changes for M108
|
||||||
|
|
||||||
|
|
|
@ -555,26 +555,26 @@ fn unpack4x8unorm(u32) -> vec4<f32>
|
||||||
@stage("compute") fn workgroupBarrier()
|
@stage("compute") fn workgroupBarrier()
|
||||||
|
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> u32
|
fn textureDimensions<T: fiu32>(texture: texture_1d<T>) -> u32
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_1d<T>, level: C) -> u32
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_1d<T>, level: L) -> u32
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_2d<T>) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_2d<T>, level: C) -> vec2<u32>
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d<T>, level: L) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_2d_array<T>) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_2d_array<T>, level: C) -> vec2<u32>
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_2d_array<T>, level: L) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_3d<T>) -> vec3<u32>
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_3d<T>, level: C) -> vec3<u32>
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_3d<T>, level: L) -> vec3<u32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_cube<T>) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_cube<T>, level: C) -> vec2<u32>
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube<T>, level: L) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_cube_array<T>) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32, C: iu32>(texture: texture_cube_array<T>, level: C) -> vec2<u32>
|
fn textureDimensions<T: fiu32, L: iu32>(texture: texture_cube_array<T>, level: L) -> vec2<u32>
|
||||||
fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32>
|
fn textureDimensions<T: fiu32>(texture: texture_multisampled_2d<T>) -> vec2<u32>
|
||||||
fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
|
fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
|
||||||
fn textureDimensions<C: iu32>(texture: texture_depth_2d, level: C) -> vec2<u32>
|
fn textureDimensions<L: iu32>(texture: texture_depth_2d, level: L) -> vec2<u32>
|
||||||
fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
|
fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
|
||||||
fn textureDimensions<C: iu32>(texture: texture_depth_2d_array, level: C) -> vec2<u32>
|
fn textureDimensions<L: iu32>(texture: texture_depth_2d_array, level: L) -> vec2<u32>
|
||||||
fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
|
fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
|
||||||
fn textureDimensions<C: iu32>(texture: texture_depth_cube, level: C) -> vec2<u32>
|
fn textureDimensions<L: iu32>(texture: texture_depth_cube, level: L) -> vec2<u32>
|
||||||
fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
|
fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
|
||||||
fn textureDimensions<C: iu32>(texture: texture_depth_cube_array, level: C) -> vec2<u32>
|
fn textureDimensions<L: iu32>(texture: texture_depth_cube_array, level: L) -> vec2<u32>
|
||||||
fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
|
fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
|
||||||
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> u32
|
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_1d<F, A>) -> u32
|
||||||
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<u32>
|
fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_2d<F, A>) -> vec2<u32>
|
||||||
|
@ -583,22 +583,22 @@ fn textureDimensions<F: texel_format, A: write>(texture: texture_storage_3d<F, A
|
||||||
fn textureDimensions(texture: texture_external) -> vec2<u32>
|
fn textureDimensions(texture: texture_external) -> vec2<u32>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<T>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<T>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: C, @const offset: vec2<i32>) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_2d_array<T>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<T>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T>
|
||||||
fn textureGather<T: fiu32, C: iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: C) -> vec4<T>
|
fn textureGather<T: fiu32, C: iu32, A: iu32>(@const component: C, texture: texture_cube_array<T>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<T>
|
||||||
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> 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, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureGather<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32>
|
fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
|
||||||
fn textureGather<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @const offset: vec2<i32>) -> vec4<f32>
|
fn textureGather<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
|
fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
|
||||||
fn textureGather<C: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> vec4<f32>
|
fn textureGather<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
|
||||||
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32>
|
fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> 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, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureGatherCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> vec4<f32>
|
fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
|
||||||
fn textureGatherCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
|
fn textureGatherCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
|
fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32>
|
||||||
fn textureGatherCompare<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, depth_ref: f32) -> vec4<f32>
|
fn textureGatherCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> vec4<f32>
|
||||||
fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> u32
|
fn textureNumLayers<T: fiu32>(texture: texture_2d_array<T>) -> u32
|
||||||
fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> u32
|
fn textureNumLayers<T: fiu32>(texture: texture_cube_array<T>) -> u32
|
||||||
fn textureNumLayers(texture: texture_depth_2d_array) -> u32
|
fn textureNumLayers(texture: texture_depth_2d_array) -> u32
|
||||||
|
@ -619,83 +619,83 @@ fn textureNumSamples(texture: texture_depth_multisampled_2d) -> u32
|
||||||
@stage("fragment") fn textureSample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
|
@stage("fragment") fn textureSample(texture: texture_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>) -> 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<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C) -> vec4<f32>
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, @const offset: vec2<i32>) -> vec4<f32>
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
|
@stage("fragment") fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> 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_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<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C) -> vec4<f32>
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
|
@stage("fragment") fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> 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, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C) -> f32
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A) -> f32
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, @const offset: vec2<i32>) -> f32
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, @const offset: vec2<i32>) -> f32
|
||||||
@stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
|
@stage("fragment") fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
|
||||||
@stage("fragment") fn textureSample<C: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: C) -> f32
|
@stage("fragment") fn textureSample<A: iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32
|
||||||
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32>
|
@stage("fragment") fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> 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<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSampleBias<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, bias: f32) -> vec4<f32>
|
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSampleBias<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
|
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
|
@stage("fragment") fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> 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_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<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSampleBias<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, bias: f32) -> vec4<f32>
|
@stage("fragment") fn textureSampleBias<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, bias: f32) -> vec4<f32>
|
||||||
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
|
@stage("fragment") fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> 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, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
||||||
@stage("fragment") fn textureSampleCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32
|
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
|
||||||
@stage("fragment") fn textureSampleCompare<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
||||||
@stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
@stage("fragment") fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
||||||
@stage("fragment") fn textureSampleCompare<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, depth_ref: f32) -> f32
|
@stage("fragment") fn textureSampleCompare<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
|
||||||
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
|
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> 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, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
||||||
fn textureSampleCompareLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32) -> f32
|
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32) -> f32
|
||||||
fn textureSampleCompareLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: C, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: A, depth_ref: f32, @const offset: vec2<i32>) -> f32
|
||||||
fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
||||||
fn textureSampleCompareLevel<C: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: C, depth_ref: f32) -> f32
|
fn textureSampleCompareLevel<A: iu32>(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: A, depth_ref: f32) -> f32
|
||||||
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
|
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> 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<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureSampleGrad<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
|
fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
|
||||||
fn textureSampleGrad<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
fn textureSampleGrad<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
|
fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> 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_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<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
|
||||||
fn textureSampleGrad<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
|
fn textureSampleGrad<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
|
||||||
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32>
|
fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> 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<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, level: f32) -> vec4<f32>
|
fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32) -> vec4<f32>
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: C, level: f32, @const offset: vec2<i32>) -> vec4<f32>
|
fn textureSampleLevel<A: iu32>(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: A, level: f32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
|
fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> 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_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<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32>
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: C, level: f32) -> vec4<f32>
|
fn textureSampleLevel<A: iu32>(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: A, level: f32) -> vec4<f32>
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C) -> f32
|
fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: C, @const offset: vec2<i32>) -> f32
|
fn textureSampleLevel<L: iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C) -> f32
|
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: C, level: C, @const offset: vec2<i32>) -> f32
|
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: C) -> f32
|
fn textureSampleLevel<L: iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32
|
||||||
fn textureSampleLevel<C: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: C, level: C) -> f32
|
fn textureSampleLevel<A: iu32, L: iu32>(texture: texture_depth_cube_array,sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32
|
||||||
@deprecated fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
@deprecated fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
||||||
fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
||||||
fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>)
|
fn textureStore<C: iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>)
|
fn textureStore<C: iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: C, value: vec4<f32>)
|
fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<C>, value: vec4<f32>)
|
fn textureStore<C: iu32>(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<C>, value: vec4<f32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_1d<i32_texel_format, write>, coords: C, value: vec4<i32>)
|
fn textureStore<C: iu32>(texture: texture_storage_1d<i32_texel_format, write>, coords: C, value: vec4<i32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<C>, value: vec4<i32>)
|
fn textureStore<C: iu32>(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<C>, value: vec4<i32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: C, value: vec4<i32>)
|
fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<i32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<C>, value: vec4<i32>)
|
fn textureStore<C: iu32>(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<C>, value: vec4<i32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_1d<u32_texel_format, write>, coords: C, value: vec4<u32>)
|
fn textureStore<C: iu32>(texture: texture_storage_1d<u32_texel_format, write>, coords: C, value: vec4<u32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>)
|
fn textureStore<C: iu32>(texture: texture_storage_2d<u32_texel_format, write>, coords: vec2<C>, value: vec4<u32>)
|
||||||
fn textureStore<C: iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: C, value: vec4<u32>)
|
fn textureStore<C: iu32, A: iu32>(texture: texture_storage_2d_array<u32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<u32>)
|
||||||
fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
|
fn textureStore(texture: texture_storage_3d<u32_texel_format, write>, coords: vec3<i32>, value: vec4<u32>)
|
||||||
fn textureLoad<T: fiu32, C: iu32>(texture: texture_1d<T>, coords: C, level: C) -> vec4<T>
|
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_1d<T>, coords: C, level: L) -> vec4<T>
|
||||||
fn textureLoad<T: fiu32, C: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: C) -> vec4<T>
|
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_2d<T>, coords: vec2<C>, level: L) -> vec4<T>
|
||||||
fn textureLoad<T: fiu32, C: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: C, level: C) -> vec4<T>
|
fn textureLoad<T: fiu32, C: iu32, A: iu32, L: iu32>(texture: texture_2d_array<T>, coords: vec2<C>, array_index: A, level: L) -> vec4<T>
|
||||||
fn textureLoad<T: fiu32, C: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: C) -> vec4<T>
|
fn textureLoad<T: fiu32, C: iu32, L: iu32>(texture: texture_3d<T>, coords: vec3<C>, level: L) -> vec4<T>
|
||||||
fn textureLoad<T: fiu32, C: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: C) -> vec4<T>
|
fn textureLoad<T: fiu32, C: iu32, S: iu32>(texture: texture_multisampled_2d<T>, coords: vec2<C>, sample_index: S) -> vec4<T>
|
||||||
fn textureLoad<C: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: C) -> f32
|
fn textureLoad<C: iu32, L: iu32>(texture: texture_depth_2d, coords: vec2<C>, level: L) -> f32
|
||||||
fn textureLoad<C: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: C, level: C) -> f32
|
fn textureLoad<C: iu32, A: iu32, L: iu32>(texture: texture_depth_2d_array, coords: vec2<C>, array_index: A, level: L) -> f32
|
||||||
fn textureLoad<C: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: C) -> f32
|
fn textureLoad<C: iu32, S: iu32>(texture: texture_depth_multisampled_2d, coords: vec2<C>, sample_index: S) -> f32
|
||||||
fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32>
|
fn textureLoad<C: iu32>(texture: texture_external, coords: vec2<C>) -> vec4<f32>
|
||||||
|
|
||||||
@stage("fragment", "compute") fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
|
@stage("fragment", "compute") fn atomicLoad<T: iu32, S: workgroup_or_storage>(ptr<S, atomic<T>, read_write>) -> T
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -596,16 +596,16 @@ TEST_F(IntrinsicTableTest, OverloadOrderByNumberOfParameters) {
|
||||||
R"(error: no matching call to textureDimensions(bool, bool)
|
R"(error: no matching call to textureDimensions(bool, bool)
|
||||||
|
|
||||||
27 candidate functions:
|
27 candidate functions:
|
||||||
textureDimensions(texture: texture_1d<T>, level: C) -> u32 where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_1d<T>, level: L) -> u32 where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_2d<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_2d_array<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_3d<T>, level: C) -> vec3<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_cube<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_cube_array<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_2d, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_2d_array, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_cube, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_cube_array, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
|
textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
|
||||||
textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
|
textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
|
||||||
textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> where: T is f32, i32 or u32
|
textureDimensions(texture: texture_2d_array<T>) -> vec2<u32> where: T is f32, i32 or u32
|
||||||
|
@ -635,16 +635,16 @@ TEST_F(IntrinsicTableTest, OverloadOrderByMatchingParameter) {
|
||||||
R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
|
R"(error: no matching call to textureDimensions(texture_depth_2d, bool)
|
||||||
|
|
||||||
27 candidate functions:
|
27 candidate functions:
|
||||||
textureDimensions(texture: texture_depth_2d, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_2d, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_1d<T>, level: C) -> u32 where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_1d<T>, level: L) -> u32 where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_2d<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_2d<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_2d_array<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_2d_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_3d<T>, level: C) -> vec3<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_3d<T>, level: L) -> vec3<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_cube<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_cube<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_cube_array<T>, level: C) -> vec2<u32> where: T is f32, i32 or u32, C is i32 or u32
|
textureDimensions(texture: texture_cube_array<T>, level: L) -> vec2<u32> where: T is f32, i32 or u32, L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_2d_array, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_2d_array, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_cube, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_cube, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_cube_array, level: C) -> vec2<u32> where: C is i32 or u32
|
textureDimensions(texture: texture_depth_cube_array, level: L) -> vec2<u32> where: L is i32 or u32
|
||||||
textureDimensions(texture: texture_depth_2d) -> vec2<u32>
|
textureDimensions(texture: texture_depth_2d) -> vec2<u32>
|
||||||
textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
|
textureDimensions(texture: texture_1d<T>) -> u32 where: T is f32, i32 or u32
|
||||||
textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
|
textureDimensions(texture: texture_2d<T>) -> vec2<u32> where: T is f32, i32 or u32
|
||||||
|
|
|
@ -191,7 +191,7 @@ void simulate(uvec3 GlobalInvocationID) {
|
||||||
}
|
}
|
||||||
vec2 uv = (vec2(coord) / vec2(uvec2(textureSize(tint_symbol_6, 0))));
|
vec2 uv = (vec2(coord) / vec2(uvec2(textureSize(tint_symbol_6, 0))));
|
||||||
particle.position = vec3((((uv - 0.5f) * 3.0f) * vec2(1.0f, -1.0f)), 0.0f);
|
particle.position = vec3((((uv - 0.5f) * 3.0f) * vec2(1.0f, -1.0f)), 0.0f);
|
||||||
particle.color = texelFetch(tint_symbol_6, ivec2(coord), int(0u));
|
particle.color = texelFetch(tint_symbol_6, ivec2(coord), 0);
|
||||||
float tint_symbol_1 = rand();
|
float tint_symbol_1 = rand();
|
||||||
particle.velocity.x = ((tint_symbol_1 - 0.5f) * 0.100000001f);
|
particle.velocity.x = ((tint_symbol_1 - 0.5f) * 0.100000001f);
|
||||||
float tint_symbol_2 = rand();
|
float tint_symbol_2 = rand();
|
||||||
|
|
|
@ -26,8 +26,8 @@ void main_inner(uint3 GlobalInvocationID) {
|
||||||
if ((uniforms[0].x == 1u)) {
|
if ((uniforms[0].x == 1u)) {
|
||||||
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
||||||
}
|
}
|
||||||
float4 srcColor = src.Load(uint3(srcTexCoord, 0u));
|
float4 srcColor = src.Load(uint3(srcTexCoord, uint(0)));
|
||||||
float4 dstColor = tint_symbol.Load(uint3(dstTexCoord, 0u));
|
float4 dstColor = tint_symbol.Load(uint3(dstTexCoord, uint(0)));
|
||||||
bool success = true;
|
bool success = true;
|
||||||
uint4 srcColorBits = uint4(0u, 0u, 0u, 0u);
|
uint4 srcColorBits = uint4(0u, 0u, 0u, 0u);
|
||||||
uint4 dstColorBits = uint4(dstColor);
|
uint4 dstColorBits = uint4(dstColor);
|
||||||
|
|
|
@ -26,8 +26,8 @@ void main_inner(uint3 GlobalInvocationID) {
|
||||||
if ((uniforms[0].x == 1u)) {
|
if ((uniforms[0].x == 1u)) {
|
||||||
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
||||||
}
|
}
|
||||||
float4 srcColor = src.Load(uint3(srcTexCoord, 0u));
|
float4 srcColor = src.Load(uint3(srcTexCoord, uint(0)));
|
||||||
float4 dstColor = tint_symbol.Load(uint3(dstTexCoord, 0u));
|
float4 dstColor = tint_symbol.Load(uint3(dstTexCoord, uint(0)));
|
||||||
bool success = true;
|
bool success = true;
|
||||||
uint4 srcColorBits = uint4(0u, 0u, 0u, 0u);
|
uint4 srcColorBits = uint4(0u, 0u, 0u, 0u);
|
||||||
uint4 dstColorBits = uint4(dstColor);
|
uint4 dstColorBits = uint4(dstColor);
|
||||||
|
|
|
@ -24,8 +24,8 @@ void tint_symbol_1(uvec3 GlobalInvocationID) {
|
||||||
if ((uniforms.dstTextureFlipY == 1u)) {
|
if ((uniforms.dstTextureFlipY == 1u)) {
|
||||||
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
srcTexCoord.y = ((size.y - dstTexCoord.y) - 1u);
|
||||||
}
|
}
|
||||||
vec4 srcColor = texelFetch(src_1, ivec2(srcTexCoord), int(0u));
|
vec4 srcColor = texelFetch(src_1, ivec2(srcTexCoord), 0);
|
||||||
vec4 dstColor = texelFetch(dst_1, ivec2(dstTexCoord), int(0u));
|
vec4 dstColor = texelFetch(dst_1, ivec2(dstTexCoord), 0);
|
||||||
bool success = true;
|
bool success = true;
|
||||||
uvec4 srcColorBits = uvec4(0u, 0u, 0u, 0u);
|
uvec4 srcColorBits = uvec4(0u, 0u, 0u, 0u);
|
||||||
uvec4 dstColorBits = uvec4(dstColor);
|
uvec4 dstColorBits = uvec4(dstColor);
|
||||||
|
|
|
@ -36,8 +36,8 @@ void tint_symbol_inner(uint3 GlobalInvocationID, texture2d<float, access::sample
|
||||||
if (((*(tint_symbol_3)).dstTextureFlipY == 1u)) {
|
if (((*(tint_symbol_3)).dstTextureFlipY == 1u)) {
|
||||||
srcTexCoord[1] = ((size[1] - dstTexCoord[1]) - 1u);
|
srcTexCoord[1] = ((size[1] - dstTexCoord[1]) - 1u);
|
||||||
}
|
}
|
||||||
float4 srcColor = tint_symbol_2.read(uint2(srcTexCoord), 0u);
|
float4 srcColor = tint_symbol_2.read(uint2(srcTexCoord), 0);
|
||||||
float4 dstColor = tint_symbol_4.read(uint2(dstTexCoord), 0u);
|
float4 dstColor = tint_symbol_4.read(uint2(dstTexCoord), 0);
|
||||||
bool success = true;
|
bool success = true;
|
||||||
uint4 srcColorBits = 0u;
|
uint4 srcColorBits = 0u;
|
||||||
uint4 dstColorBits = uint4(dstColor);
|
uint4 dstColorBits = uint4(dstColor);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 133
|
; Bound: 134
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability ImageQuery
|
OpCapability ImageQuery
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%59 = OpConstantNull %uint
|
%59 = OpConstantNull %int
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%62 = OpConstantNull %v4float
|
%62 = OpConstantNull %v4float
|
||||||
%true = OpConstantTrue %bool
|
%true = OpConstantTrue %bool
|
||||||
|
@ -92,10 +92,11 @@
|
||||||
%v4uint = OpTypeVector %uint 4
|
%v4uint = OpTypeVector %uint 4
|
||||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
%74 = OpConstantNull %v4uint
|
%74 = OpConstantNull %v4uint
|
||||||
|
%78 = OpConstantNull %uint
|
||||||
%uint_3 = OpConstant %uint 3
|
%uint_3 = OpConstant %uint 3
|
||||||
%_ptr_Function_float = OpTypePointer Function %float
|
%_ptr_Function_float = OpTypePointer Function %float
|
||||||
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
%128 = OpTypeFunction %void
|
%129 = OpTypeFunction %void
|
||||||
%ConvertToFp16FloatValue = OpFunction %uint None %17
|
%ConvertToFp16FloatValue = OpFunction %uint None %17
|
||||||
%fp32 = OpFunctionParameter %float
|
%fp32 = OpFunctionParameter %float
|
||||||
%20 = OpLabel
|
%20 = OpLabel
|
||||||
|
@ -112,8 +113,8 @@
|
||||||
%success = OpVariable %_ptr_Function_bool Function %70
|
%success = OpVariable %_ptr_Function_bool Function %70
|
||||||
%srcColorBits = OpVariable %_ptr_Function_v4uint Function %74
|
%srcColorBits = OpVariable %_ptr_Function_v4uint Function %74
|
||||||
%dstColorBits = OpVariable %_ptr_Function_v4uint Function %74
|
%dstColorBits = OpVariable %_ptr_Function_v4uint Function %74
|
||||||
%i = OpVariable %_ptr_Function_uint Function %59
|
%i = OpVariable %_ptr_Function_uint Function %78
|
||||||
%outputIndex = OpVariable %_ptr_Function_uint Function %59
|
%outputIndex = OpVariable %_ptr_Function_uint Function %78
|
||||||
%29 = OpLoad %7 %src
|
%29 = OpLoad %7 %src
|
||||||
%27 = OpImageQuerySizeLod %v2uint %29 %int_0
|
%27 = OpImageQuerySizeLod %v2uint %29 %int_0
|
||||||
OpStore %size %27
|
OpStore %size %27
|
||||||
|
@ -149,77 +150,77 @@
|
||||||
%76 = OpLoad %v4float %dstColor
|
%76 = OpLoad %v4float %dstColor
|
||||||
%75 = OpConvertFToU %v4uint %76
|
%75 = OpConvertFToU %v4uint %76
|
||||||
OpStore %dstColorBits %75
|
OpStore %dstColorBits %75
|
||||||
OpStore %i %59
|
OpStore %i %78
|
||||||
OpBranch %79
|
OpBranch %80
|
||||||
%79 = OpLabel
|
%80 = OpLabel
|
||||||
OpLoopMerge %80 %81 None
|
OpLoopMerge %81 %82 None
|
||||||
|
OpBranch %83
|
||||||
|
%83 = OpLabel
|
||||||
|
%85 = OpLoad %uint %i
|
||||||
|
%87 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3
|
||||||
|
%88 = OpLoad %uint %87
|
||||||
|
%89 = OpULessThan %bool %85 %88
|
||||||
|
%84 = OpLogicalNot %bool %89
|
||||||
|
OpSelectionMerge %90 None
|
||||||
|
OpBranchConditional %84 %91 %90
|
||||||
|
%91 = OpLabel
|
||||||
|
OpBranch %81
|
||||||
|
%90 = OpLabel
|
||||||
|
%93 = OpLoad %uint %i
|
||||||
|
%95 = OpAccessChain %_ptr_Function_float %srcColor %93
|
||||||
|
%96 = OpLoad %float %95
|
||||||
|
%92 = OpFunctionCall %uint %ConvertToFp16FloatValue %96
|
||||||
|
%97 = OpLoad %uint %i
|
||||||
|
%98 = OpAccessChain %_ptr_Function_uint %srcColorBits %97
|
||||||
|
OpStore %98 %92
|
||||||
|
%99 = OpLoad %bool %success
|
||||||
|
OpSelectionMerge %100 None
|
||||||
|
OpBranchConditional %99 %101 %100
|
||||||
|
%101 = OpLabel
|
||||||
|
%102 = OpLoad %uint %i
|
||||||
|
%103 = OpAccessChain %_ptr_Function_uint %srcColorBits %102
|
||||||
|
%104 = OpLoad %uint %103
|
||||||
|
%105 = OpLoad %uint %i
|
||||||
|
%106 = OpAccessChain %_ptr_Function_uint %dstColorBits %105
|
||||||
|
%107 = OpLoad %uint %106
|
||||||
|
%108 = OpIEqual %bool %104 %107
|
||||||
|
OpBranch %100
|
||||||
|
%100 = OpLabel
|
||||||
|
%109 = OpPhi %bool %99 %90 %108 %101
|
||||||
|
OpStore %success %109
|
||||||
OpBranch %82
|
OpBranch %82
|
||||||
%82 = OpLabel
|
%82 = OpLabel
|
||||||
%84 = OpLoad %uint %i
|
%110 = OpLoad %uint %i
|
||||||
%86 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3
|
%111 = OpIAdd %uint %110 %uint_1
|
||||||
%87 = OpLoad %uint %86
|
OpStore %i %111
|
||||||
%88 = OpULessThan %bool %84 %87
|
|
||||||
%83 = OpLogicalNot %bool %88
|
|
||||||
OpSelectionMerge %89 None
|
|
||||||
OpBranchConditional %83 %90 %89
|
|
||||||
%90 = OpLabel
|
|
||||||
OpBranch %80
|
OpBranch %80
|
||||||
%89 = OpLabel
|
|
||||||
%92 = OpLoad %uint %i
|
|
||||||
%94 = OpAccessChain %_ptr_Function_float %srcColor %92
|
|
||||||
%95 = OpLoad %float %94
|
|
||||||
%91 = OpFunctionCall %uint %ConvertToFp16FloatValue %95
|
|
||||||
%96 = OpLoad %uint %i
|
|
||||||
%97 = OpAccessChain %_ptr_Function_uint %srcColorBits %96
|
|
||||||
OpStore %97 %91
|
|
||||||
%98 = OpLoad %bool %success
|
|
||||||
OpSelectionMerge %99 None
|
|
||||||
OpBranchConditional %98 %100 %99
|
|
||||||
%100 = OpLabel
|
|
||||||
%101 = OpLoad %uint %i
|
|
||||||
%102 = OpAccessChain %_ptr_Function_uint %srcColorBits %101
|
|
||||||
%103 = OpLoad %uint %102
|
|
||||||
%104 = OpLoad %uint %i
|
|
||||||
%105 = OpAccessChain %_ptr_Function_uint %dstColorBits %104
|
|
||||||
%106 = OpLoad %uint %105
|
|
||||||
%107 = OpIEqual %bool %103 %106
|
|
||||||
OpBranch %99
|
|
||||||
%99 = OpLabel
|
|
||||||
%108 = OpPhi %bool %98 %89 %107 %100
|
|
||||||
OpStore %success %108
|
|
||||||
OpBranch %81
|
|
||||||
%81 = OpLabel
|
%81 = OpLabel
|
||||||
%109 = OpLoad %uint %i
|
%112 = OpCompositeExtract %uint %GlobalInvocationID 1
|
||||||
%110 = OpIAdd %uint %109 %uint_1
|
%114 = OpAccessChain %_ptr_Function_uint %size %uint_0
|
||||||
OpStore %i %110
|
%115 = OpLoad %uint %114
|
||||||
OpBranch %79
|
%116 = OpIMul %uint %112 %115
|
||||||
%80 = OpLabel
|
%117 = OpCompositeExtract %uint %GlobalInvocationID 0
|
||||||
%111 = OpCompositeExtract %uint %GlobalInvocationID 1
|
%118 = OpIAdd %uint %116 %117
|
||||||
%113 = OpAccessChain %_ptr_Function_uint %size %uint_0
|
OpStore %outputIndex %118
|
||||||
%114 = OpLoad %uint %113
|
%120 = OpLoad %bool %success
|
||||||
%115 = OpIMul %uint %111 %114
|
OpSelectionMerge %121 None
|
||||||
%116 = OpCompositeExtract %uint %GlobalInvocationID 0
|
OpBranchConditional %120 %122 %123
|
||||||
%117 = OpIAdd %uint %115 %116
|
|
||||||
OpStore %outputIndex %117
|
|
||||||
%119 = OpLoad %bool %success
|
|
||||||
OpSelectionMerge %120 None
|
|
||||||
OpBranchConditional %119 %121 %122
|
|
||||||
%121 = OpLabel
|
|
||||||
%123 = OpLoad %uint %outputIndex
|
|
||||||
%125 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %123
|
|
||||||
OpStore %125 %uint_1
|
|
||||||
OpBranch %120
|
|
||||||
%122 = OpLabel
|
%122 = OpLabel
|
||||||
%126 = OpLoad %uint %outputIndex
|
%124 = OpLoad %uint %outputIndex
|
||||||
%127 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %126
|
%126 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %124
|
||||||
OpStore %127 %59
|
OpStore %126 %uint_1
|
||||||
OpBranch %120
|
OpBranch %121
|
||||||
%120 = OpLabel
|
%123 = OpLabel
|
||||||
|
%127 = OpLoad %uint %outputIndex
|
||||||
|
%128 = OpAccessChain %_ptr_StorageBuffer_uint %output %uint_0 %127
|
||||||
|
OpStore %128 %78
|
||||||
|
OpBranch %121
|
||||||
|
%121 = OpLabel
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%main = OpFunction %void None %128
|
%main = OpFunction %void None %129
|
||||||
%130 = OpLabel
|
%131 = OpLabel
|
||||||
%132 = OpLoad %v3uint %GlobalInvocationID_1
|
%133 = OpLoad %v3uint %GlobalInvocationID_1
|
||||||
%131 = OpFunctionCall %void %main_inner %132
|
%132 = OpFunctionCall %void %main_inner %133
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
|
||||||
fn textureGather_17baac() {
|
fn textureGather_17baac() {
|
||||||
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_17baac() {
|
void textureGather_17baac() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_17baac() {
|
void textureGather_17baac() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_17baac() {
|
void textureGather_17baac() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 46
|
; Bound: 48
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -47,8 +47,10 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%32 = OpTypeFunction %v4float
|
%34 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_17baac = OpFunction %void None %15
|
%textureGather_17baac = OpFunction %void None %15
|
||||||
%18 = OpLabel
|
%18 = OpLabel
|
||||||
|
@ -58,29 +60,29 @@
|
||||||
%23 = OpSampledImage %22 %21 %20
|
%23 = OpSampledImage %22 %21 %20
|
||||||
%26 = OpConvertUToF %float %uint_1
|
%26 = OpConvertUToF %float %uint_1
|
||||||
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
||||||
%19 = OpImageGather %v4float %23 %29 %uint_1
|
%19 = OpImageGather %v4float %23 %29 %int_1
|
||||||
OpStore %res %19
|
OpStore %res %19
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %32
|
%vertex_main_inner = OpFunction %v4float None %34
|
||||||
%34 = OpLabel
|
%36 = OpLabel
|
||||||
%35 = OpFunctionCall %void %textureGather_17baac
|
%37 = OpFunctionCall %void %textureGather_17baac
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %15
|
%vertex_main = OpFunction %void None %15
|
||||||
%37 = OpLabel
|
%39 = OpLabel
|
||||||
%38 = OpFunctionCall %v4float %vertex_main_inner
|
%40 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %38
|
OpStore %value %40
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %15
|
%fragment_main = OpFunction %void None %15
|
||||||
%41 = OpLabel
|
%43 = OpLabel
|
||||||
%42 = OpFunctionCall %void %textureGather_17baac
|
%44 = OpFunctionCall %void %textureGather_17baac
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %15
|
%compute_main = OpFunction %void None %15
|
||||||
%44 = OpLabel
|
%46 = OpLabel
|
||||||
%45 = OpFunctionCall %void %textureGather_17baac
|
%47 = OpFunctionCall %void %textureGather_17baac
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_17baac() {
|
fn textureGather_17baac() {
|
||||||
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
|
||||||
|
fn textureGather_24b0bd() {
|
||||||
|
var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_24b0bd() {
|
||||||
|
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_24b0bd();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_24b0bd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_24b0bd() {
|
||||||
|
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_24b0bd();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_24b0bd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_24b0bd() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_24b0bd() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_24b0bd() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_24b0bd(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_24b0bd(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_24b0bd(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_24b0bd(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -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_24b0bd "textureGather_24b0bd"
|
||||||
|
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
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
|
%34 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_24b0bd = 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 %uint_1
|
||||||
|
OpStore %res %19
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %34
|
||||||
|
%36 = OpLabel
|
||||||
|
%37 = OpFunctionCall %void %textureGather_24b0bd
|
||||||
|
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_24b0bd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %15
|
||||||
|
%46 = OpLabel
|
||||||
|
%47 = OpFunctionCall %void %textureGather_24b0bd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -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_24b0bd() {
|
||||||
|
var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_24b0bd();
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
|
||||||
|
fn textureGather_445793() {
|
||||||
|
var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_445793();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_445793() {
|
||||||
|
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_445793();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_445793();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_445793() {
|
||||||
|
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_445793();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_445793();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_445793() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_445793() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_445793() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_445793(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_445793(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_445793(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_445793(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 50
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
|
OpName %value "value"
|
||||||
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
|
OpName %arg_1 "arg_1"
|
||||||
|
OpName %arg_2 "arg_2"
|
||||||
|
OpName %textureGather_445793 "textureGather_445793"
|
||||||
|
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
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
|
%35 = OpConstantNull %v4int
|
||||||
|
%36 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_445793 = 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 %uint_1
|
||||||
|
OpStore %res %20
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
|
%38 = OpLabel
|
||||||
|
%39 = OpFunctionCall %void %textureGather_445793
|
||||||
|
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_445793
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %16
|
||||||
|
%48 = OpLabel
|
||||||
|
%49 = OpFunctionCall %void %textureGather_445793
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
||||||
|
@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
|
||||||
|
|
||||||
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
|
fn textureGather_445793() {
|
||||||
|
var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_445793();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_445793();
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
|
||||||
fn textureGather_4e8ac5() {
|
fn textureGather_4e8ac5() {
|
||||||
var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_4e8ac5() {
|
void textureGather_4e8ac5() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_4e8ac5() {
|
void textureGather_4e8ac5() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_4e8ac5() {
|
void textureGather_4e8ac5() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 49
|
; Bound: 50
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -49,41 +49,42 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
%34 = OpConstantNull %v4int
|
%35 = OpConstantNull %v4int
|
||||||
%35 = OpTypeFunction %v4float
|
%36 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_4e8ac5 = OpFunction %void None %16
|
%textureGather_4e8ac5 = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4int Function %34
|
%res = OpVariable %_ptr_Function_v4int Function %35
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%28 = OpConvertUToF %float %uint_1
|
%28 = OpConvertUToF %float %uint_1
|
||||||
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
||||||
%20 = OpImageGather %v4int %25 %31 %uint_1
|
%20 = OpImageGather %v4int %25 %31 %int_1
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %35
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
%37 = OpLabel
|
%38 = OpLabel
|
||||||
%38 = OpFunctionCall %void %textureGather_4e8ac5
|
%39 = OpFunctionCall %void %textureGather_4e8ac5
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%40 = OpLabel
|
%41 = OpLabel
|
||||||
%41 = OpFunctionCall %v4float %vertex_main_inner
|
%42 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %41
|
OpStore %value %42
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%44 = OpLabel
|
%45 = OpLabel
|
||||||
%45 = OpFunctionCall %void %textureGather_4e8ac5
|
%46 = OpFunctionCall %void %textureGather_4e8ac5
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%47 = OpLabel
|
%48 = OpLabel
|
||||||
%48 = OpFunctionCall %void %textureGather_4e8ac5
|
%49 = OpFunctionCall %void %textureGather_4e8ac5
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_4e8ac5() {
|
fn textureGather_4e8ac5() {
|
||||||
var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
fn textureGather_59372a() {
|
fn textureGather_59372a() {
|
||||||
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_59372a() {
|
void textureGather_59372a() {
|
||||||
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_59372a() {
|
void textureGather_59372a() {
|
||||||
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp sampler2DArray arg_1_arg_2;
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_59372a() {
|
void textureGather_59372a() {
|
||||||
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 49
|
; Bound: 50
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -48,10 +48,11 @@
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
%32 = OpConstantNull %v2int
|
%33 = OpConstantNull %v2int
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%35 = OpTypeFunction %v4float
|
%36 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_59372a = OpFunction %void None %15
|
%textureGather_59372a = OpFunction %void None %15
|
||||||
%18 = OpLabel
|
%18 = OpLabel
|
||||||
|
@ -61,29 +62,29 @@
|
||||||
%23 = OpSampledImage %22 %21 %20
|
%23 = OpSampledImage %22 %21 %20
|
||||||
%26 = OpConvertUToF %float %uint_1
|
%26 = OpConvertUToF %float %uint_1
|
||||||
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
||||||
%19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32
|
%19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %33
|
||||||
OpStore %res %19
|
OpStore %res %19
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %35
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
%37 = OpLabel
|
%38 = OpLabel
|
||||||
%38 = OpFunctionCall %void %textureGather_59372a
|
%39 = OpFunctionCall %void %textureGather_59372a
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %15
|
%vertex_main = OpFunction %void None %15
|
||||||
%40 = OpLabel
|
%41 = OpLabel
|
||||||
%41 = OpFunctionCall %v4float %vertex_main_inner
|
%42 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %41
|
OpStore %value %42
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %15
|
%fragment_main = OpFunction %void None %15
|
||||||
%44 = OpLabel
|
%45 = OpLabel
|
||||||
%45 = OpFunctionCall %void %textureGather_59372a
|
%46 = OpFunctionCall %void %textureGather_59372a
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %15
|
%compute_main = OpFunction %void None %15
|
||||||
%47 = OpLabel
|
%48 = OpLabel
|
||||||
%48 = OpFunctionCall %void %textureGather_59372a
|
%49 = OpFunctionCall %void %textureGather_59372a
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_59372a() {
|
fn textureGather_59372a() {
|
||||||
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
|
// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
|
||||||
fn textureGather_788010() {
|
fn textureGather_788010() {
|
||||||
var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -5,7 +5,7 @@ SKIP: FAILED
|
||||||
uniform highp isamplerCubeArray arg_1_arg_2;
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_788010() {
|
void textureGather_788010() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -34,7 +34,7 @@ precision mediump float;
|
||||||
uniform highp isamplerCubeArray arg_1_arg_2;
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_788010() {
|
void textureGather_788010() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -57,7 +57,7 @@ ERROR: 2 compilation errors. No code generated.
|
||||||
uniform highp isamplerCubeArray arg_1_arg_2;
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_788010() {
|
void textureGather_788010() {
|
||||||
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 48
|
; Bound: 49
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability SampledCubeArray
|
OpCapability SampledCubeArray
|
||||||
|
@ -49,41 +49,42 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
%33 = OpConstantNull %v4int
|
%34 = OpConstantNull %v4int
|
||||||
%34 = OpTypeFunction %v4float
|
%35 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_788010 = OpFunction %void None %16
|
%textureGather_788010 = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4int Function %33
|
%res = OpVariable %_ptr_Function_v4int Function %34
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%27 = OpConvertUToF %float %uint_1
|
%27 = OpConvertUToF %float %uint_1
|
||||||
%30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
%30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
||||||
%20 = OpImageGather %v4int %25 %30 %uint_1
|
%20 = OpImageGather %v4int %25 %30 %int_1
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %34
|
%vertex_main_inner = OpFunction %v4float None %35
|
||||||
%36 = OpLabel
|
%37 = OpLabel
|
||||||
%37 = OpFunctionCall %void %textureGather_788010
|
%38 = OpFunctionCall %void %textureGather_788010
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%39 = OpLabel
|
%40 = OpLabel
|
||||||
%40 = OpFunctionCall %v4float %vertex_main_inner
|
%41 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %40
|
OpStore %value %41
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%43 = OpLabel
|
%44 = OpLabel
|
||||||
%44 = OpFunctionCall %void %textureGather_788010
|
%45 = OpFunctionCall %void %textureGather_788010
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%46 = OpLabel
|
%47 = OpLabel
|
||||||
%47 = OpFunctionCall %void %textureGather_788010
|
%48 = OpFunctionCall %void %textureGather_788010
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_788010() {
|
fn textureGather_788010() {
|
||||||
var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
|
// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
|
||||||
fn textureGather_829357() {
|
fn textureGather_829357() {
|
||||||
var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -5,7 +5,7 @@ SKIP: FAILED
|
||||||
uniform highp samplerCubeArray arg_1_arg_2;
|
uniform highp samplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_829357() {
|
void textureGather_829357() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -34,7 +34,7 @@ precision mediump float;
|
||||||
uniform highp samplerCubeArray arg_1_arg_2;
|
uniform highp samplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_829357() {
|
void textureGather_829357() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -57,7 +57,7 @@ ERROR: 2 compilation errors. No code generated.
|
||||||
uniform highp samplerCubeArray arg_1_arg_2;
|
uniform highp samplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_829357() {
|
void textureGather_829357() {
|
||||||
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 45
|
; Bound: 47
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability SampledCubeArray
|
OpCapability SampledCubeArray
|
||||||
|
@ -47,8 +47,10 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%31 = OpTypeFunction %v4float
|
%33 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_829357 = OpFunction %void None %15
|
%textureGather_829357 = OpFunction %void None %15
|
||||||
%18 = OpLabel
|
%18 = OpLabel
|
||||||
|
@ -58,29 +60,29 @@
|
||||||
%23 = OpSampledImage %22 %21 %20
|
%23 = OpSampledImage %22 %21 %20
|
||||||
%25 = OpConvertUToF %float %uint_1
|
%25 = OpConvertUToF %float %uint_1
|
||||||
%28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
|
%28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
|
||||||
%19 = OpImageGather %v4float %23 %28 %uint_1
|
%19 = OpImageGather %v4float %23 %28 %int_1
|
||||||
OpStore %res %19
|
OpStore %res %19
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %31
|
%vertex_main_inner = OpFunction %v4float None %33
|
||||||
%33 = OpLabel
|
%35 = OpLabel
|
||||||
%34 = OpFunctionCall %void %textureGather_829357
|
%36 = OpFunctionCall %void %textureGather_829357
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %15
|
%vertex_main = OpFunction %void None %15
|
||||||
%36 = OpLabel
|
%38 = OpLabel
|
||||||
%37 = OpFunctionCall %v4float %vertex_main_inner
|
%39 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %37
|
OpStore %value %39
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %15
|
%fragment_main = OpFunction %void None %15
|
||||||
%40 = OpLabel
|
%42 = OpLabel
|
||||||
%41 = OpFunctionCall %void %textureGather_829357
|
%43 = OpFunctionCall %void %textureGather_829357
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %15
|
%compute_main = OpFunction %void None %15
|
||||||
%43 = OpLabel
|
%45 = OpLabel
|
||||||
%44 = OpFunctionCall %void %textureGather_829357
|
%46 = OpFunctionCall %void %textureGather_829357
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_829357() {
|
fn textureGather_829357() {
|
||||||
var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32>
|
||||||
|
fn textureGather_831549() {
|
||||||
|
var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_831549();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_831549() {
|
||||||
|
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_831549();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_831549();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_831549() {
|
||||||
|
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_831549();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_831549();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_831549() {
|
||||||
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_831549() {
|
||||||
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp sampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_831549() {
|
||||||
|
vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_831549(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_831549(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_831549(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_831549(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 50
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
|
OpName %value "value"
|
||||||
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
|
OpName %arg_1 "arg_1"
|
||||||
|
OpName %arg_2 "arg_2"
|
||||||
|
OpName %textureGather_831549 "textureGather_831549"
|
||||||
|
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
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%v2int = OpTypeVector %int 2
|
||||||
|
%33 = OpConstantNull %v2int
|
||||||
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
|
%36 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_831549 = 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 %uint_1 ConstOffset %33
|
||||||
|
OpStore %res %19
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
|
%38 = OpLabel
|
||||||
|
%39 = OpFunctionCall %void %textureGather_831549
|
||||||
|
OpReturnValue %5
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %15
|
||||||
|
%41 = OpLabel
|
||||||
|
%42 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
|
OpStore %value %42
|
||||||
|
OpStore %vertex_point_size %float_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %15
|
||||||
|
%45 = OpLabel
|
||||||
|
%46 = OpFunctionCall %void %textureGather_831549
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %15
|
||||||
|
%48 = OpLabel
|
||||||
|
%49 = OpFunctionCall %void %textureGather_831549
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -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_831549() {
|
||||||
|
var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_831549();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_831549();
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
|
||||||
|
fn textureGather_92ea47() {
|
||||||
|
var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_92ea47();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<uint4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_92ea47() {
|
||||||
|
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_92ea47();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_92ea47();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<uint4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_92ea47() {
|
||||||
|
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_92ea47();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_92ea47();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_92ea47() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_92ea47() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_92ea47() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_92ea47(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_92ea47(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_92ea47(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_92ea47(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 50
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
|
OpName %value "value"
|
||||||
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
|
OpName %arg_1 "arg_1"
|
||||||
|
OpName %arg_2 "arg_2"
|
||||||
|
OpName %textureGather_92ea47 "textureGather_92ea47"
|
||||||
|
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
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
|
%35 = OpConstantNull %v4uint
|
||||||
|
%36 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_92ea47 = OpFunction %void None %16
|
||||||
|
%19 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v4uint Function %35
|
||||||
|
%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 %uint_1
|
||||||
|
OpStore %res %20
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
|
%38 = OpLabel
|
||||||
|
%39 = OpFunctionCall %void %textureGather_92ea47
|
||||||
|
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_92ea47
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %16
|
||||||
|
%48 = OpLabel
|
||||||
|
%49 = OpFunctionCall %void %textureGather_92ea47
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -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_92ea47() {
|
||||||
|
var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_92ea47();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_92ea47();
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<i32>
|
||||||
|
fn textureGather_9ab41e() {
|
||||||
|
var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_9ab41e() {
|
||||||
|
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_9ab41e();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_9ab41e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
Texture2DArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_9ab41e() {
|
||||||
|
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_9ab41e();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_9ab41e();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_9ab41e() {
|
||||||
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_9ab41e() {
|
||||||
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_9ab41e() {
|
||||||
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_9ab41e(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_9ab41e(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_9ab41e(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_9ab41e(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 52
|
||||||
|
; Schema: 0
|
||||||
|
OpCapability Shader
|
||||||
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
|
OpName %value "value"
|
||||||
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
|
OpName %arg_1 "arg_1"
|
||||||
|
OpName %arg_2 "arg_2"
|
||||||
|
OpName %textureGather_9ab41e "textureGather_9ab41e"
|
||||||
|
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
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%v2int = OpTypeVector %int 2
|
||||||
|
%34 = OpConstantNull %v2int
|
||||||
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
|
%37 = OpConstantNull %v4int
|
||||||
|
%38 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_9ab41e = OpFunction %void None %16
|
||||||
|
%19 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v4int Function %37
|
||||||
|
%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 %uint_1 ConstOffset %34
|
||||||
|
OpStore %res %20
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %38
|
||||||
|
%40 = OpLabel
|
||||||
|
%41 = OpFunctionCall %void %textureGather_9ab41e
|
||||||
|
OpReturnValue %5
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main = OpFunction %void None %16
|
||||||
|
%43 = OpLabel
|
||||||
|
%44 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
|
OpStore %value %44
|
||||||
|
OpStore %vertex_point_size %float_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %16
|
||||||
|
%47 = OpLabel
|
||||||
|
%48 = OpFunctionCall %void %textureGather_9ab41e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %16
|
||||||
|
%50 = OpLabel
|
||||||
|
%51 = OpFunctionCall %void %textureGather_9ab41e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
||||||
|
@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
|
||||||
|
|
||||||
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
|
fn textureGather_9ab41e() {
|
||||||
|
var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_9ab41e();
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
|
||||||
fn textureGather_a0372b() {
|
fn textureGather_a0372b() {
|
||||||
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_a0372b() {
|
void textureGather_a0372b() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_a0372b() {
|
void textureGather_a0372b() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_a0372b() {
|
void textureGather_a0372b() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 48
|
; Bound: 50
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -48,41 +48,43 @@
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
%33 = OpConstantNull %v4uint
|
%35 = OpConstantNull %v4uint
|
||||||
%34 = OpTypeFunction %v4float
|
%36 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_a0372b = OpFunction %void None %16
|
%textureGather_a0372b = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4uint Function %33
|
%res = OpVariable %_ptr_Function_v4uint Function %35
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%28 = OpConvertUToF %float %uint_1
|
%28 = OpConvertUToF %float %uint_1
|
||||||
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
||||||
%20 = OpImageGather %v4uint %25 %30 %uint_1
|
%20 = OpImageGather %v4uint %25 %30 %int_1
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %34
|
%vertex_main_inner = OpFunction %v4float None %36
|
||||||
%36 = OpLabel
|
%38 = OpLabel
|
||||||
%37 = OpFunctionCall %void %textureGather_a0372b
|
%39 = OpFunctionCall %void %textureGather_a0372b
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%39 = OpLabel
|
%41 = OpLabel
|
||||||
%40 = OpFunctionCall %v4float %vertex_main_inner
|
%42 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %40
|
OpStore %value %42
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%43 = OpLabel
|
%45 = OpLabel
|
||||||
%44 = OpFunctionCall %void %textureGather_a0372b
|
%46 = OpFunctionCall %void %textureGather_a0372b
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%46 = OpLabel
|
%48 = OpLabel
|
||||||
%47 = OpFunctionCall %void %textureGather_a0372b
|
%49 = OpFunctionCall %void %textureGather_a0372b
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_a0372b() {
|
fn textureGather_a0372b() {
|
||||||
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
|
var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32>
|
||||||
|
fn textureGather_aaf6bd() {
|
||||||
|
var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_aaf6bd() {
|
||||||
|
int4 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_aaf6bd();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_aaf6bd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<int4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_aaf6bd() {
|
||||||
|
int4 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_aaf6bd();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_aaf6bd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
SKIP: FAILED
|
||||||
|
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_aaf6bd() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = vertex_main();
|
||||||
|
gl_Position = inner_result;
|
||||||
|
gl_Position.y = -(gl_Position.y);
|
||||||
|
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Error parsing GLSL shader:
|
||||||
|
ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
|
||||||
|
ERROR: 0:3: '' : compilation terminated
|
||||||
|
ERROR: 2 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#version 310 es
|
||||||
|
precision mediump float;
|
||||||
|
|
||||||
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_aaf6bd() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
fragment_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Error parsing GLSL shader:
|
||||||
|
ERROR: 0:4: 'isamplerCubeArray' : Reserved word.
|
||||||
|
ERROR: 0:4: '' : compilation terminated
|
||||||
|
ERROR: 2 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp isamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_aaf6bd() {
|
||||||
|
ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
void main() {
|
||||||
|
compute_main();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Error parsing GLSL shader:
|
||||||
|
ERROR: 0:3: 'isamplerCubeArray' : Reserved word.
|
||||||
|
ERROR: 0:3: '' : compilation terminated
|
||||||
|
ERROR: 2 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_aaf6bd(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
|
||||||
|
int4 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<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
|
||||||
|
textureGather_aaf6bd(tint_symbol_3, tint_symbol_4);
|
||||||
|
return float4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
|
||||||
|
float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
|
||||||
|
tint_symbol wrapper_result = {};
|
||||||
|
wrapper_result.value = inner_result;
|
||||||
|
return wrapper_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
|
||||||
|
textureGather_aaf6bd(tint_symbol_7, tint_symbol_8);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
|
||||||
|
textureGather_aaf6bd(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 49
|
||||||
|
; 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_aaf6bd "textureGather_aaf6bd"
|
||||||
|
OpName %res "res"
|
||||||
|
OpName %vertex_main_inner "vertex_main_inner"
|
||||||
|
OpName %vertex_main "vertex_main"
|
||||||
|
OpName %fragment_main "fragment_main"
|
||||||
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %value BuiltIn Position
|
||||||
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
|
OpDecorate %arg_1 DescriptorSet 1
|
||||||
|
OpDecorate %arg_1 Binding 1
|
||||||
|
OpDecorate %arg_2 DescriptorSet 1
|
||||||
|
OpDecorate %arg_2 Binding 2
|
||||||
|
%float = OpTypeFloat 32
|
||||||
|
%v4float = OpTypeVector %float 4
|
||||||
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
%5 = OpConstantNull %v4float
|
||||||
|
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||||
|
%_ptr_Output_float = OpTypePointer Output %float
|
||||||
|
%8 = OpConstantNull %float
|
||||||
|
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
|
%11 = OpTypeImage %int Cube 0 1 0 1 Unknown
|
||||||
|
%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
|
||||||
|
%arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
|
%15 = OpTypeSampler
|
||||||
|
%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
|
||||||
|
%arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%16 = OpTypeFunction %void
|
||||||
|
%v4int = OpTypeVector %int 4
|
||||||
|
%24 = OpTypeSampledImage %11
|
||||||
|
%float_0 = OpConstant %float 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
|
%34 = OpConstantNull %v4int
|
||||||
|
%35 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_aaf6bd = OpFunction %void None %16
|
||||||
|
%19 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v4int Function %34
|
||||||
|
%22 = OpLoad %15 %arg_2
|
||||||
|
%23 = OpLoad %11 %arg_1
|
||||||
|
%25 = OpSampledImage %24 %23 %22
|
||||||
|
%27 = OpConvertSToF %float %int_1
|
||||||
|
%29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
||||||
|
%20 = OpImageGather %v4int %25 %29 %uint_1
|
||||||
|
OpStore %res %20
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %35
|
||||||
|
%37 = OpLabel
|
||||||
|
%38 = OpFunctionCall %void %textureGather_aaf6bd
|
||||||
|
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_aaf6bd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %16
|
||||||
|
%47 = OpLabel
|
||||||
|
%48 = OpFunctionCall %void %textureGather_aaf6bd
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
||||||
|
@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
|
||||||
|
|
||||||
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
|
fn textureGather_aaf6bd() {
|
||||||
|
var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_aaf6bd();
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
|
||||||
fn textureGather_bd33b6() {
|
fn textureGather_bd33b6() {
|
||||||
var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_bd33b6() {
|
void textureGather_bd33b6() {
|
||||||
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_bd33b6() {
|
void textureGather_bd33b6() {
|
||||||
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp isampler2DArray arg_1_arg_2;
|
uniform highp isampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_bd33b6() {
|
void textureGather_bd33b6() {
|
||||||
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 51
|
; Bound: 52
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -49,43 +49,44 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
%33 = OpConstantNull %v2int
|
%34 = OpConstantNull %v2int
|
||||||
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
%_ptr_Function_v4int = OpTypePointer Function %v4int
|
||||||
%36 = OpConstantNull %v4int
|
%37 = OpConstantNull %v4int
|
||||||
%37 = OpTypeFunction %v4float
|
%38 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_bd33b6 = OpFunction %void None %16
|
%textureGather_bd33b6 = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4int Function %36
|
%res = OpVariable %_ptr_Function_v4int Function %37
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%28 = OpConvertUToF %float %uint_1
|
%28 = OpConvertUToF %float %uint_1
|
||||||
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
%31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
||||||
%20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33
|
%20 = OpImageGather %v4int %25 %31 %int_1 ConstOffset %34
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %37
|
%vertex_main_inner = OpFunction %v4float None %38
|
||||||
%39 = OpLabel
|
%40 = OpLabel
|
||||||
%40 = OpFunctionCall %void %textureGather_bd33b6
|
%41 = OpFunctionCall %void %textureGather_bd33b6
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%42 = OpLabel
|
%43 = OpLabel
|
||||||
%43 = OpFunctionCall %v4float %vertex_main_inner
|
%44 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %43
|
OpStore %value %44
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%46 = OpLabel
|
%47 = OpLabel
|
||||||
%47 = OpFunctionCall %void %textureGather_bd33b6
|
%48 = OpFunctionCall %void %textureGather_bd33b6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%49 = OpLabel
|
%50 = OpLabel
|
||||||
%50 = OpFunctionCall %void %textureGather_bd33b6
|
%51 = OpFunctionCall %void %textureGather_bd33b6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_bd33b6() {
|
fn textureGather_bd33b6() {
|
||||||
var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
|
// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
|
||||||
fn textureGather_be276f() {
|
fn textureGather_be276f() {
|
||||||
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -5,7 +5,7 @@ SKIP: FAILED
|
||||||
uniform highp usamplerCubeArray arg_1_arg_2;
|
uniform highp usamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_be276f() {
|
void textureGather_be276f() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -34,7 +34,7 @@ precision mediump float;
|
||||||
uniform highp usamplerCubeArray arg_1_arg_2;
|
uniform highp usamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_be276f() {
|
void textureGather_be276f() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -57,7 +57,7 @@ ERROR: 2 compilation errors. No code generated.
|
||||||
uniform highp usamplerCubeArray arg_1_arg_2;
|
uniform highp usamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_be276f() {
|
void textureGather_be276f() {
|
||||||
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 47
|
; Bound: 49
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability SampledCubeArray
|
OpCapability SampledCubeArray
|
||||||
|
@ -48,41 +48,43 @@
|
||||||
%24 = OpTypeSampledImage %11
|
%24 = OpTypeSampledImage %11
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
%32 = OpConstantNull %v4uint
|
%34 = OpConstantNull %v4uint
|
||||||
%33 = OpTypeFunction %v4float
|
%35 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_be276f = OpFunction %void None %16
|
%textureGather_be276f = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4uint Function %32
|
%res = OpVariable %_ptr_Function_v4uint Function %34
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%27 = OpConvertUToF %float %uint_1
|
%27 = OpConvertUToF %float %uint_1
|
||||||
%29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
%29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
||||||
%20 = OpImageGather %v4uint %25 %29 %uint_1
|
%20 = OpImageGather %v4uint %25 %29 %int_1
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %33
|
%vertex_main_inner = OpFunction %v4float None %35
|
||||||
%35 = OpLabel
|
%37 = OpLabel
|
||||||
%36 = OpFunctionCall %void %textureGather_be276f
|
%38 = OpFunctionCall %void %textureGather_be276f
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%38 = OpLabel
|
%40 = OpLabel
|
||||||
%39 = OpFunctionCall %v4float %vertex_main_inner
|
%41 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %39
|
OpStore %value %41
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%42 = OpLabel
|
%44 = OpLabel
|
||||||
%43 = OpFunctionCall %void %textureGather_be276f
|
%45 = OpFunctionCall %void %textureGather_be276f
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%45 = OpLabel
|
%47 = OpLabel
|
||||||
%46 = OpFunctionCall %void %textureGather_be276f
|
%48 = OpFunctionCall %void %textureGather_be276f
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_be276f() {
|
fn textureGather_be276f() {
|
||||||
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
|
var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
|
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
|
||||||
fn textureGather_ce5578() {
|
fn textureGather_ce5578() {
|
||||||
var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_ce5578() {
|
void textureGather_ce5578() {
|
||||||
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -25,7 +25,7 @@ precision mediump float;
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_ce5578() {
|
void textureGather_ce5578() {
|
||||||
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
||||||
uniform highp usampler2DArray arg_1_arg_2;
|
uniform highp usampler2DArray arg_1_arg_2;
|
||||||
|
|
||||||
void textureGather_ce5578() {
|
void textureGather_ce5578() {
|
||||||
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
|
uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 51
|
; Bound: 52
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
|
@ -49,43 +49,44 @@
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
%33 = OpConstantNull %v2int
|
%34 = OpConstantNull %v2int
|
||||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
%36 = OpConstantNull %v4uint
|
%37 = OpConstantNull %v4uint
|
||||||
%37 = OpTypeFunction %v4float
|
%38 = OpTypeFunction %v4float
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%textureGather_ce5578 = OpFunction %void None %16
|
%textureGather_ce5578 = OpFunction %void None %16
|
||||||
%19 = OpLabel
|
%19 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4uint Function %36
|
%res = OpVariable %_ptr_Function_v4uint Function %37
|
||||||
%22 = OpLoad %15 %arg_2
|
%22 = OpLoad %15 %arg_2
|
||||||
%23 = OpLoad %11 %arg_1
|
%23 = OpLoad %11 %arg_1
|
||||||
%25 = OpSampledImage %24 %23 %22
|
%25 = OpSampledImage %24 %23 %22
|
||||||
%28 = OpConvertUToF %float %uint_1
|
%28 = OpConvertUToF %float %uint_1
|
||||||
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
|
||||||
%20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33
|
%20 = OpImageGather %v4uint %25 %30 %int_1 ConstOffset %34
|
||||||
OpStore %res %20
|
OpStore %res %20
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %37
|
%vertex_main_inner = OpFunction %v4float None %38
|
||||||
%39 = OpLabel
|
%40 = OpLabel
|
||||||
%40 = OpFunctionCall %void %textureGather_ce5578
|
%41 = OpFunctionCall %void %textureGather_ce5578
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %16
|
%vertex_main = OpFunction %void None %16
|
||||||
%42 = OpLabel
|
%43 = OpLabel
|
||||||
%43 = OpFunctionCall %v4float %vertex_main_inner
|
%44 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %43
|
OpStore %value %44
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %16
|
%fragment_main = OpFunction %void None %16
|
||||||
%46 = OpLabel
|
%47 = OpLabel
|
||||||
%47 = OpFunctionCall %void %textureGather_ce5578
|
%48 = OpFunctionCall %void %textureGather_ce5578
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %16
|
%compute_main = OpFunction %void None %16
|
||||||
%49 = OpLabel
|
%50 = OpLabel
|
||||||
%50 = OpFunctionCall %void %textureGather_ce5578
|
%51 = OpFunctionCall %void %textureGather_ce5578
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@group(1) @binding(2) var arg_2 : sampler;
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
fn textureGather_ce5578() {
|
fn textureGather_ce5578() {
|
||||||
var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
|
||||||
|
fn textureGather_d4b5c6() {
|
||||||
|
var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<uint4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_d4b5c6() {
|
||||||
|
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_d4b5c6();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_d4b5c6();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<uint4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_d4b5c6() {
|
||||||
|
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_d4b5c6();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_d4b5c6();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
SKIP: FAILED
|
||||||
|
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp usamplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_d4b5c6() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_d4b5c6() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
||||||
|
|
||||||
|
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_d4b5c6() {
|
||||||
|
uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_d4b5c6(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_d4b5c6(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_d4b5c6(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_d4b5c6(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
|
; Bound: 49
|
||||||
|
; 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_d4b5c6 "textureGather_d4b5c6"
|
||||||
|
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
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||||
|
%34 = OpConstantNull %v4uint
|
||||||
|
%35 = OpTypeFunction %v4float
|
||||||
|
%float_1 = OpConstant %float 1
|
||||||
|
%textureGather_d4b5c6 = 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
|
||||||
|
%27 = OpConvertSToF %float %int_1
|
||||||
|
%30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
|
||||||
|
%20 = OpImageGather %v4uint %25 %30 %uint_1
|
||||||
|
OpStore %res %20
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vertex_main_inner = OpFunction %v4float None %35
|
||||||
|
%37 = OpLabel
|
||||||
|
%38 = OpFunctionCall %void %textureGather_d4b5c6
|
||||||
|
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_d4b5c6
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %16
|
||||||
|
%47 = OpLabel
|
||||||
|
%48 = OpFunctionCall %void %textureGather_d4b5c6
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
||||||
|
@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
|
||||||
|
|
||||||
|
@group(1) @binding(2) var arg_2 : sampler;
|
||||||
|
|
||||||
|
fn textureGather_d4b5c6() {
|
||||||
|
var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_d4b5c6();
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Copyright 2022 The Tint Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// File generated by tools/src/cmd/gen
|
||||||
|
// using the template:
|
||||||
|
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||||
|
//
|
||||||
|
// Do not modify this file directly
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
|
||||||
|
@group(1) @binding(2) var arg_2: sampler;
|
||||||
|
|
||||||
|
// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
|
||||||
|
fn textureGather_d98d59() {
|
||||||
|
var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@vertex
|
||||||
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||||
|
textureGather_d98d59();
|
||||||
|
return vec4<f32>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@fragment
|
||||||
|
fn fragment_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
}
|
||||||
|
|
||||||
|
@compute @workgroup_size(1)
|
||||||
|
fn compute_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_d98d59() {
|
||||||
|
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_d98d59();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_d98d59();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
TextureCubeArray<float4> arg_1 : register(t1, space1);
|
||||||
|
SamplerState arg_2 : register(s2, space1);
|
||||||
|
|
||||||
|
void textureGather_d98d59() {
|
||||||
|
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_d98d59();
|
||||||
|
return (0.0f).xxxx;
|
||||||
|
}
|
||||||
|
|
||||||
|
tint_symbol vertex_main() {
|
||||||
|
const 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_d98d59();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[numthreads(1, 1, 1)]
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
SKIP: FAILED
|
||||||
|
|
||||||
|
#version 310 es
|
||||||
|
|
||||||
|
uniform highp samplerCubeArray arg_1_arg_2;
|
||||||
|
|
||||||
|
void textureGather_d98d59() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 vertex_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
return vec4(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_PointSize = 1.0;
|
||||||
|
vec4 inner_result = 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_d98d59() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
}
|
||||||
|
|
||||||
|
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_d98d59() {
|
||||||
|
vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1)), int(1u));
|
||||||
|
}
|
||||||
|
|
||||||
|
void compute_main() {
|
||||||
|
textureGather_d98d59();
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <metal_stdlib>
|
||||||
|
|
||||||
|
using namespace metal;
|
||||||
|
void textureGather_d98d59(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_d98d59(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_d98d59(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_d98d59(tint_symbol_9, tint_symbol_10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue