James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame^] | 1 | // Copyright 2023 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 | |
| 24 | enable chromium_experimental_read_write_storage_texture; |
| 25 | @group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>; |
| 26 | |
| 27 | // fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32> |
| 28 | fn textureLoad_936952() { |
| 29 | var arg_1 = vec2<i32>(1i); |
| 30 | var arg_2 = 1i; |
| 31 | var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2); |
| 32 | prevent_dce = res; |
| 33 | } |
| 34 | @group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>; |
| 35 | |
| 36 | @vertex |
| 37 | fn vertex_main() -> @builtin(position) vec4<f32> { |
| 38 | textureLoad_936952(); |
| 39 | return vec4<f32>(); |
| 40 | } |
| 41 | |
| 42 | @fragment |
| 43 | fn fragment_main() { |
| 44 | textureLoad_936952(); |
| 45 | } |
| 46 | |
| 47 | @compute @workgroup_size(1) |
| 48 | fn compute_main() { |
| 49 | textureLoad_936952(); |
| 50 | } |