Ben Clayton | f50d56a | 2022-07-27 18:32:19 +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: |
dan sinclair | e4039c7 | 2023-02-17 21:58:59 +0000 | [diff] [blame] | 18 | // src/tint/builtin/extension_bench.cc.tmpl |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 19 | // |
| 20 | // Do not modify this file directly |
| 21 | //////////////////////////////////////////////////////////////////////////////// |
| 22 | |
dan sinclair | e4039c7 | 2023-02-17 21:58:59 +0000 | [diff] [blame] | 23 | #include "src/tint/builtin/extension.h" |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 24 | |
| 25 | #include <array> |
| 26 | |
| 27 | #include "benchmark/benchmark.h" |
| 28 | |
dan sinclair | e4039c7 | 2023-02-17 21:58:59 +0000 | [diff] [blame] | 29 | namespace tint::builtin { |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 30 | namespace { |
| 31 | |
| 32 | void ExtensionParser(::benchmark::State& state) { |
Ben Clayton | ed3389f | 2023-02-09 23:56:42 +0000 | [diff] [blame] | 33 | const char* kStrings[] = { |
Ben Clayton | db368f1 | 2022-10-11 18:26:18 +0000 | [diff] [blame] | 34 | "chromium_disableuniformiccy_analysis", |
| 35 | "chromil3_disable_unifority_analss", |
| 36 | "chromium_disable_Vniformity_analysis", |
| 37 | "chromium_disable_uniformity_analysis", |
| 38 | "chromium_dis1ble_uniformity_analysis", |
| 39 | "chromium_qqisable_unifomity_anaJysis", |
| 40 | "chrollium_disable_uniformity_analysi77", |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 41 | "chromippHm_experqqmetal_dp4a", |
| 42 | "chrmium_expecimntal_dp4", |
| 43 | "chrmiumGexpebimental_dp4a", |
| 44 | "chromium_experimental_dp4a", |
| 45 | "chromium_exverimentiil_dp4a", |
| 46 | "chro8ium_experimenWWal_dp4a", |
| 47 | "chromiMm_eperimxxntal_dp4a", |
Ben Clayton | 94706ec | 2022-11-30 19:13:29 +0000 | [diff] [blame] | 48 | "chromium_expeggimeXtal_full_ptr_paraeters", |
| 49 | "chromium_expVrimental_full_ptr_puraXeer", |
| 50 | "chromium_experimental_full_ptr3parameters", |
| 51 | "chromium_experimental_full_ptr_parameters", |
| 52 | "chromium_experimentalEfull_ptr_parameters", |
| 53 | "chromium_experimentalfull_ptr_PPaTTameters", |
| 54 | "chromium_ddxperimental_fullptrxxparameters", |
| 55 | "c44romium_experimental_push_constant", |
| 56 | "chromium_experimental_pSSsVV_constant", |
| 57 | "chrom22Rm_experimental_pushRonstant", |
dan sinclair | 4abf28e | 2022-08-02 15:55:35 +0000 | [diff] [blame] | 58 | "chromium_experimental_push_constant", |
Ben Clayton | 94706ec | 2022-11-30 19:13:29 +0000 | [diff] [blame] | 59 | "chromium_exp9rimFntal_ush_constant", |
| 60 | "chrmium_experimental_push_constant", |
| 61 | "cOOromium_experiVeHtal_puh_conRRtant", |
James Price | 0b3400c | 2023-02-27 18:39:20 +0000 | [diff] [blame] | 62 | "chromium_internl_relaxyd_uniform_layout", |
| 63 | "chromnnum_internrr77_Gelaxell_uniform_layout", |
| 64 | "chromium_intern4l_relaxe00_uniform_layout", |
| 65 | "chromium_internal_relaxed_uniform_layout", |
| 66 | "chrmoom_internal_relaxed_uniform_lyout", |
| 67 | "chroium_internal_rlaxed_uniform_layzzut", |
| 68 | "chromium_internaii_r11axed_uppifor_layout", |
| 69 | "f1XX", |
| 70 | "55199II", |
| 71 | "frSSHHa", |
Ben Clayton | db368f1 | 2022-10-11 18:26:18 +0000 | [diff] [blame] | 72 | "f16", |
James Price | 0b3400c | 2023-02-27 18:39:20 +0000 | [diff] [blame] | 73 | "U", |
| 74 | "jV3", |
| 75 | "", |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 76 | }; |
| 77 | for (auto _ : state) { |
Ben Clayton | ed3389f | 2023-02-09 23:56:42 +0000 | [diff] [blame] | 78 | for (auto* str : kStrings) { |
Ben Clayton | f50d56a | 2022-07-27 18:32:19 +0000 | [diff] [blame] | 79 | auto result = ParseExtension(str); |
| 80 | benchmark::DoNotOptimize(result); |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | BENCHMARK(ExtensionParser); |
| 86 | |
| 87 | } // namespace |
dan sinclair | e4039c7 | 2023-02-17 21:58:59 +0000 | [diff] [blame] | 88 | } // namespace tint::builtin |