Ben Clayton | b85e692 | 2022-02-02 23:07:11 +0000 | [diff] [blame] | 1 | // Copyright 2021 The Tint Authors. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | //////////////////////////////////////////////////////////////////////////////// |
Ben Clayton | e132516 | 2022-05-06 15:13:01 +0000 | [diff] [blame] | 16 | // File generated by tools/intrinsic-gen |
Ben Clayton | b85e692 | 2022-02-02 23:07:11 +0000 | [diff] [blame] | 17 | // using the template: |
Ben Clayton | 1fcb2a7 | 2022-02-22 20:24:59 +0000 | [diff] [blame] | 18 | // test/tint/builtins/builtins.wgsl.tmpl |
Ben Clayton | e132516 | 2022-05-06 15:13:01 +0000 | [diff] [blame] | 19 | // and the intrinsic defintion file: |
| 20 | // src/tint/intrinsics.def |
Ben Clayton | b85e692 | 2022-02-02 23:07:11 +0000 | [diff] [blame] | 21 | // |
| 22 | // Do not modify this file directly |
| 23 | //////////////////////////////////////////////////////////////////////////////// |
| 24 | |
| 25 | @group(1) @binding(0) var arg_0: texture_3d<f32>; |
| 26 | @group(1) @binding(1) var arg_1: sampler; |
| 27 | |
| 28 | // fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32> |
| 29 | fn textureSampleLevel_9bd37b() { |
| 30 | var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0, vec3<i32>()); |
| 31 | } |
| 32 | |
| 33 | @stage(vertex) |
| 34 | fn vertex_main() -> @builtin(position) vec4<f32> { |
| 35 | textureSampleLevel_9bd37b(); |
| 36 | return vec4<f32>(); |
| 37 | } |
| 38 | |
| 39 | @stage(fragment) |
| 40 | fn fragment_main() { |
| 41 | textureSampleLevel_9bd37b(); |
| 42 | } |
| 43 | |
| 44 | @stage(compute) @workgroup_size(1) |
| 45 | fn compute_main() { |
| 46 | textureSampleLevel_9bd37b(); |
| 47 | } |