Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 1 | // Copyright 2022 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 | 57ded6a | 2023-08-22 13:22:22 +0000 | [diff] [blame] | 16 | // File generated by 'tools/src/cmd/gen' using the template: |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 17 | // test/tint/builtins/gen/gen.wgsl.tmpl |
| 18 | // |
Ben Clayton | 57ded6a | 2023-08-22 13:22:22 +0000 | [diff] [blame] | 19 | // To regenerate run: './tools/run gen' |
| 20 | // |
| 21 | // Do not modify this file directly |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 22 | //////////////////////////////////////////////////////////////////////////////// |
| 23 | |
| 24 | |
| 25 | enable f16; |
| 26 | |
| 27 | // fn asinh(vec<4, f16>) -> vec<4, f16> |
| 28 | fn asinh_95ab2b() { |
dan sinclair | d9b68eb | 2022-11-10 00:32:12 +0000 | [diff] [blame] | 29 | var arg_0 = vec4<f16>(1.h); |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 30 | var res: vec4<f16> = asinh(arg_0); |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 31 | prevent_dce = res; |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 32 | } |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 33 | @group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f16>; |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 34 | |
| 35 | @vertex |
| 36 | fn vertex_main() -> @builtin(position) vec4<f32> { |
| 37 | asinh_95ab2b(); |
| 38 | return vec4<f32>(); |
| 39 | } |
| 40 | |
| 41 | @fragment |
| 42 | fn fragment_main() { |
| 43 | asinh_95ab2b(); |
| 44 | } |
| 45 | |
| 46 | @compute @workgroup_size(1) |
| 47 | fn compute_main() { |
| 48 | asinh_95ab2b(); |
| 49 | } |