blob: 8725cbf32cfd4e828de3ffd7e2090c08360c167a [file] [log] [blame]
Austin Engcc2516a2023-10-17 20:57:54 +00001// Copyright 2022 The Dawn & Tint Authors
Ben Claytonf50d56a2022-07-27 18:32:19 +00002//
Austin Engcc2516a2023-10-17 20:57:54 +00003// Redistribution and use in source and binary forms, with or without
4// modification, are permitted provided that the following conditions are met:
Ben Claytonf50d56a2022-07-27 18:32:19 +00005//
Austin Engcc2516a2023-10-17 20:57:54 +00006// 1. Redistributions of source code must retain the above copyright notice, this
7// list of conditions and the following disclaimer.
Ben Claytonf50d56a2022-07-27 18:32:19 +00008//
Austin Engcc2516a2023-10-17 20:57:54 +00009// 2. Redistributions in binary form must reproduce the above copyright notice,
10// this list of conditions and the following disclaimer in the documentation
11// and/or other materials provided with the distribution.
12//
13// 3. Neither the name of the copyright holder nor the names of its
14// contributors may be used to endorse or promote products derived from
15// this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Ben Claytonf50d56a2022-07-27 18:32:19 +000027
28////////////////////////////////////////////////////////////////////////////////
Ben Clayton57ded6a2023-08-22 13:22:22 +000029// File generated by 'tools/src/cmd/gen' using the template:
Ben Clayton11653892023-09-19 19:15:59 +000030// src/tint/lang/wgsl/extension_bench.cc.tmpl
Ben Claytonf50d56a2022-07-27 18:32:19 +000031//
Ben Clayton57ded6a2023-08-22 13:22:22 +000032// To regenerate run: './tools/run gen'
33//
34// Do not modify this file directly
Ben Claytonf50d56a2022-07-27 18:32:19 +000035////////////////////////////////////////////////////////////////////////////////
36
Ben Clayton11653892023-09-19 19:15:59 +000037#include "src/tint/lang/wgsl/extension.h"
Ben Claytonf50d56a2022-07-27 18:32:19 +000038
39#include <array>
40
41#include "benchmark/benchmark.h"
42
Ben Clayton11653892023-09-19 19:15:59 +000043namespace tint::wgsl {
Ben Claytonf50d56a2022-07-27 18:32:19 +000044namespace {
45
46void ExtensionParser(::benchmark::State& state) {
Ben Claytoned3389f2023-02-09 23:56:42 +000047 const char* kStrings[] = {
Ben Claytondb368f12022-10-11 18:26:18 +000048 "chromium_disableuniformiccy_analysis",
49 "chromil3_disable_unifority_analss",
50 "chromium_disable_Vniformity_analysis",
51 "chromium_disable_uniformity_analysis",
52 "chromium_dis1ble_uniformity_analysis",
53 "chromium_qqisable_unifomity_anaJysis",
54 "chrollium_disable_uniformity_analysi77",
Jiawei Shao53c0fa92023-12-08 01:24:00 +000055 "cqqromium_eppperimental_framebuffe_fetcHH",
56 "chrmium_experimvntal_frcmebufer_ftch",
57 "chromium_expebimental_framGbufer_fetch",
Ben Clayton3e56a382023-11-09 16:22:33 +000058 "chromium_experimental_framebuffer_fetch",
Jiawei Shao53c0fa92023-12-08 01:24:00 +000059 "chromium_experimental_vramebuffeii_fetch",
60 "chro8WWum_experimental_framebuffer_fetch",
61 "chromium_eperimenxxMl_framebuffer_fetch",
Ben Claytonf4686672024-01-17 11:06:59 +000062 "chromum_experimental_pixeX_loggal",
63 "chromium_expVrXmntal_ixel_local",
64 "3hromium_experimental_pixel_local",
Ben Clayton74688c92023-09-05 13:35:35 +000065 "chromium_experimental_pixel_local",
Ben Claytonf4686672024-01-17 11:06:59 +000066 "chromium_eEperimental_pixel_local",
67 "chTTomiu_experimentaPP_pixel_local",
68 "cxxromium_expddrimenal_pixel_local",
69 "c44romium_experimental_push_constant",
70 "chromium_experimental_pSSsVV_constant",
71 "chrom22Rm_experimental_pushRonstant",
dan sinclair4abf28e2022-08-02 15:55:35 +000072 "chromium_experimental_push_constant",
Ben Claytonf4686672024-01-17 11:06:59 +000073 "chromium_exp9rimFntal_ush_constant",
74 "chrmium_experimental_push_constant",
75 "cOOromium_experiVeHtal_puh_conRRtant",
76 "chromium_eperimental_sybgroups",
77 "chrorri77mGexperimllntal_subgrnnups",
78 "chromium_exp4rimen00al_subgroups",
James Price3b97fc42023-08-01 08:08:34 +000079 "chromium_experimental_subgroups",
Ben Claytonf4686672024-01-17 11:06:59 +000080 "chromium_exprimenal_ubgrouoos",
81 "chrmiumexperimenzzal_subgroups",
82 "chrmi11m_experppmeiita_subgroups",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +000083 "chXXomium_internal_graphite",
84 "chromi55m_internnal_gra99hiIIe",
85 "chSSomiuY_internal_aarHHphrrte",
Ben Claytone4d210d2024-02-26 17:08:02 +000086 "chromium_internal_graphite",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +000087 "kkhromium_nternal_rahHte",
88 "chromium_nRegnaj_graphite",
89 "chromium_ntebnal_gaphite",
90 "chromium_internal_input_atjachments",
91 "chromium_internal_inpt_attachments",
92 "chromium_nteral_iqput_attachments",
Le Hoang Quyenf9a99182024-05-22 21:02:35 +000093 "chromium_internal_input_attachments",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +000094 "chromium_internal_input_aNNtachents",
95 "chromium_internalinpt_attavvhments",
96 "chromium_internal_inut_attacQQments",
97 "chromirm_intenal_rfflaxed_unifrm_layout",
98 "chromium_internal_jelaxed_uniform_layout",
99 "chromium_interna_relNNxed_uwwiform_lay82t",
James Price0b3400c2023-02-27 18:39:20 +0000100 "chromium_internal_relaxed_uniform_layout",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +0000101 "chromium_internal_relaxed_uniform_layut",
102 "chromium_internal_relaxed_rrniform_layout",
103 "chromium_internal_relaxedGuniform_layout",
104 "dual_source_blendFFng",
105 "dEl_surce_bending",
106 "drra_source_blending",
Jiawei Shaocc43f152024-05-29 00:44:43 +0000107 "dual_source_blending",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +0000108 "dual_suce_blending",
109 "dul_DoXrcJJ_blending",
110 "dul_source_lening",
111 "k",
112 "16",
113 "J1",
Ben Claytondb368f12022-10-11 18:26:18 +0000114 "f16",
Jiawei Shaocd4bf9a2024-06-06 01:17:28 +0000115 "c16",
116 "fO6",
117 "_KKttvv",
James Price32950eb2024-06-26 11:25:37 +0000118 "xubgro5p8",
119 "suFq__ups",
120 "sqqgroups",
121 "subgroups",
122 "subgr6u33O",
123 "s96grQttupoo",
124 "sugro66ps",
125 "ubgrxupszzO166",
126 "suyygroups_f16",
127 "sHHbgroups_Z",
128 "subgroups_f16",
129 "ubgWWou44q_f16",
130 "sOObgroup_f16",
131 "suboruph_Y16",
Ben Claytonf50d56a2022-07-27 18:32:19 +0000132 };
133 for (auto _ : state) {
Ben Claytoned3389f2023-02-09 23:56:42 +0000134 for (auto* str : kStrings) {
Ben Claytonf50d56a2022-07-27 18:32:19 +0000135 auto result = ParseExtension(str);
136 benchmark::DoNotOptimize(result);
137 }
138 }
Ben Clayton47dd3012023-04-26 18:27:53 +0000139} // NOLINT(readability/fn_size)
Ben Claytonf50d56a2022-07-27 18:32:19 +0000140
141BENCHMARK(ExtensionParser);
142
143} // namespace
Ben Clayton11653892023-09-19 19:15:59 +0000144} // namespace tint::wgsl