Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +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 | //////////////////////////////////////////////////////////////////////////////// |
| 16 | // File generated by tools/src/cmd/gen |
| 17 | // using the template: |
| 18 | // test/tint/builtins/gen/gen.wgsl.tmpl |
| 19 | // |
| 20 | // Do not modify this file directly |
| 21 | //////////////////////////////////////////////////////////////////////////////// |
| 22 | |
| 23 | @group(1) @binding(0) var arg_0: texture_1d<f32>; |
| 24 | |
| 25 | // fn textureDimensions(texture: texture_1d<f32>, level: i32) -> u32 |
| 26 | fn textureDimensions_f17acd() { |
| 27 | var arg_1 = 1i; |
| 28 | var res: u32 = textureDimensions(arg_0, arg_1); |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 29 | prevent_dce = res; |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 30 | } |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 31 | @group(2) @binding(0) var<storage, read_write> prevent_dce : u32; |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 32 | |
| 33 | @vertex |
| 34 | fn vertex_main() -> @builtin(position) vec4<f32> { |
| 35 | textureDimensions_f17acd(); |
| 36 | return vec4<f32>(); |
| 37 | } |
| 38 | |
| 39 | @fragment |
| 40 | fn fragment_main() { |
| 41 | textureDimensions_f17acd(); |
| 42 | } |
| 43 | |
| 44 | @compute @workgroup_size(1) |
| 45 | fn compute_main() { |
| 46 | textureDimensions_f17acd(); |
| 47 | } |